aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-04-03 17:33:39 +0200
committerChocobozzz <me@florianbigard.com>2018-04-03 17:33:39 +0200
commitb891f9bc612217b5b6f08a886c7d12eca260b9c8 (patch)
tree2457cc69161a47a1c07a77aaf0ef2c65beb47dfe /client/src/assets
parent33d7855229f45d73a767566f1dbcb87709211ebf (diff)
downloadPeerTube-b891f9bc612217b5b6f08a886c7d12eca260b9c8.tar.gz
PeerTube-b891f9bc612217b5b6f08a886c7d12eca260b9c8.tar.zst
PeerTube-b891f9bc612217b5b6f08a886c7d12eca260b9c8.zip
Fix watch page video change
Diffstat (limited to 'client/src/assets')
-rw-r--r--client/src/assets/player/peertube-videojs-plugin.ts4
-rw-r--r--client/src/assets/player/resolution-menu-button.ts3
-rw-r--r--client/src/assets/player/resolution-menu-item.ts4
-rw-r--r--client/src/assets/player/settings-menu-button.ts2
4 files changed, 6 insertions, 7 deletions
diff --git a/client/src/assets/player/peertube-videojs-plugin.ts b/client/src/assets/player/peertube-videojs-plugin.ts
index 425c8c7a0..10c31cc0f 100644
--- a/client/src/assets/player/peertube-videojs-plugin.ts
+++ b/client/src/assets/player/peertube-videojs-plugin.ts
@@ -215,7 +215,7 @@ class PeerTubePlugin extends Plugin {
215 this.player.posterImage.hide() 215 this.player.posterImage.hide()
216 this.updateVideoFile(undefined, () => this.player.play()) 216 this.updateVideoFile(undefined, () => this.player.play())
217 } else { 217 } else {
218 // Proxify first play 218 // Proxy first play
219 const oldPlay = this.player.play.bind(this.player) 219 const oldPlay = this.player.play.bind(this.player)
220 this.player.play = () => { 220 this.player.play = () => {
221 this.updateVideoFile(undefined, () => oldPlay) 221 this.updateVideoFile(undefined, () => oldPlay)
@@ -308,7 +308,7 @@ class PeerTubePlugin extends Plugin {
308 this.player.options_.inactivityTimeout = 0 308 this.player.options_.inactivityTimeout = 0
309 } 309 }
310 const enableInactivity = () => { 310 const enableInactivity = () => {
311 // this.player.options_.inactivityTimeout = saveInactivityTimeout 311 this.player.options_.inactivityTimeout = saveInactivityTimeout
312 } 312 }
313 313
314 const settingsDialog = this.player.children_.find(c => c.name_ === 'SettingsDialog') 314 const settingsDialog = this.player.children_.find(c => c.name_ === 'SettingsDialog')
diff --git a/client/src/assets/player/resolution-menu-button.ts b/client/src/assets/player/resolution-menu-button.ts
index c927b084d..712e71192 100644
--- a/client/src/assets/player/resolution-menu-button.ts
+++ b/client/src/assets/player/resolution-menu-button.ts
@@ -35,8 +35,7 @@ class ResolutionMenuButton extends MenuButton {
35 } 35 }
36 36
37 createMenu () { 37 createMenu () {
38 const menu = new Menu(this.player()) 38 const menu = new Menu(this.player_)
39
40 for (const videoFile of this.player_.peertube().videoFiles) { 39 for (const videoFile of this.player_.peertube().videoFiles) {
41 menu.addChild(new ResolutionMenuItem( 40 menu.addChild(new ResolutionMenuItem(
42 this.player_, 41 this.player_,
diff --git a/client/src/assets/player/resolution-menu-item.ts b/client/src/assets/player/resolution-menu-item.ts
index 95e0ed1f8..8ad834c59 100644
--- a/client/src/assets/player/resolution-menu-item.ts
+++ b/client/src/assets/player/resolution-menu-item.ts
@@ -13,7 +13,7 @@ class ResolutionMenuItem extends MenuItem {
13 this.label = options.label 13 this.label = options.label
14 this.id = options.id 14 this.id = options.id
15 15
16 player.peertube().on('videoFileUpdate', () => this.update()) 16 player.peertube().on('videoFileUpdate', () => this.updateSelection())
17 } 17 }
18 18
19 handleClick (event) { 19 handleClick (event) {
@@ -22,7 +22,7 @@ class ResolutionMenuItem extends MenuItem {
22 this.player_.peertube().updateResolution(this.id) 22 this.player_.peertube().updateResolution(this.id)
23 } 23 }
24 24
25 update () { 25 updateSelection () {
26 this.selected(this.player_.peertube().getCurrentResolutionId() === this.id) 26 this.selected(this.player_.peertube().getCurrentResolutionId() === this.id)
27 } 27 }
28} 28}
diff --git a/client/src/assets/player/settings-menu-button.ts b/client/src/assets/player/settings-menu-button.ts
index c48e1382c..bf6ac145a 100644
--- a/client/src/assets/player/settings-menu-button.ts
+++ b/client/src/assets/player/settings-menu-button.ts
@@ -33,7 +33,7 @@ class SettingsButton extends Button {
33 this.buildMenu() 33 this.buildMenu()
34 this.bindEvents() 34 this.bindEvents()
35 35
36 // Prepare dialog 36 // Prepare the dialog
37 this.player().one('play', () => this.hideDialog()) 37 this.player().one('play', () => this.hideDialog())
38 } 38 }
39 39