aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/standalone/videos/embed.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-04-02 18:30:26 +0200
committerChocobozzz <me@florianbigard.com>2019-04-02 18:30:26 +0200
commitc47106315ae3c403239cda29c49b4bba51ddccb2 (patch)
tree526d2f3ba284dde6bc8d83699c0a78e86d7860eb /client/src/standalone/videos/embed.ts
parentf421fa06ada7bb01d91142cc8211a65e2b390d7b (diff)
downloadPeerTube-c47106315ae3c403239cda29c49b4bba51ddccb2.tar.gz
PeerTube-c47106315ae3c403239cda29c49b4bba51ddccb2.tar.zst
PeerTube-c47106315ae3c403239cda29c49b4bba51ddccb2.zip
tslint update
Diffstat (limited to 'client/src/standalone/videos/embed.ts')
-rw-r--r--client/src/standalone/videos/embed.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts
index b55b4bace..626d55a7c 100644
--- a/client/src/standalone/videos/embed.ts
+++ b/client/src/standalone/videos/embed.ts
@@ -40,7 +40,7 @@ class PeerTubeEmbedApi {
40 } 40 }
41 41
42 private constructChannel () { 42 private constructChannel () {
43 let channel = Channel.build({ window: window.parent, origin: '*', scope: this.embed.scope }) 43 const channel = Channel.build({ window: window.parent, origin: '*', scope: this.embed.scope })
44 44
45 channel.bind('play', (txn, params) => this.embed.player.play()) 45 channel.bind('play', (txn, params) => this.embed.player.play())
46 channel.bind('pause', (txn, params) => this.embed.player.pause()) 46 channel.bind('pause', (txn, params) => this.embed.player.pause())
@@ -82,8 +82,8 @@ class PeerTubeEmbedApi {
82 let currentState: 'playing' | 'paused' | 'unstarted' = 'unstarted' 82 let currentState: 'playing' | 'paused' | 'unstarted' = 'unstarted'
83 83
84 setInterval(() => { 84 setInterval(() => {
85 let position = this.element.currentTime 85 const position = this.element.currentTime
86 let volume = this.element.volume 86 const volume = this.element.volume
87 87
88 this.channel.notify({ 88 this.channel.notify({
89 method: 'playbackStatusUpdate', 89 method: 'playbackStatusUpdate',
@@ -114,8 +114,8 @@ class PeerTubeEmbedApi {
114 } 114 }
115 115
116 private loadWebTorrentResolutions () { 116 private loadWebTorrentResolutions () {
117 let resolutions = [] 117 const resolutions = []
118 let currentResolutionId = this.embed.player.webtorrent().getCurrentResolutionId() 118 const currentResolutionId = this.embed.player.webtorrent().getCurrentResolutionId()
119 119
120 for (const videoFile of this.embed.player.webtorrent().videoFiles) { 120 for (const videoFile of this.embed.player.webtorrent().videoFiles) {
121 let label = videoFile.resolution.label 121 let label = videoFile.resolution.label
@@ -235,7 +235,7 @@ class PeerTubeEmbed {
235 235
236 private loadParams () { 236 private loadParams () {
237 try { 237 try {
238 let params = new URL(window.location.toString()).searchParams 238 const params = new URL(window.location.toString()).searchParams
239 239
240 this.autoplay = this.getParamToggle(params, 'autoplay') 240 this.autoplay = this.getParamToggle(params, 'autoplay')
241 this.controls = this.getParamToggle(params, 'controls') 241 this.controls = this.getParamToggle(params, 'controls')