From b891f9bc612217b5b6f08a886c7d12eca260b9c8 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 3 Apr 2018 17:33:39 +0200 Subject: Fix watch page video change --- client/src/assets/player/peertube-videojs-plugin.ts | 4 ++-- client/src/assets/player/resolution-menu-button.ts | 3 +-- client/src/assets/player/resolution-menu-item.ts | 4 ++-- client/src/assets/player/settings-menu-button.ts | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) (limited to 'client/src/assets') 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 { this.player.posterImage.hide() this.updateVideoFile(undefined, () => this.player.play()) } else { - // Proxify first play + // Proxy first play const oldPlay = this.player.play.bind(this.player) this.player.play = () => { this.updateVideoFile(undefined, () => oldPlay) @@ -308,7 +308,7 @@ class PeerTubePlugin extends Plugin { this.player.options_.inactivityTimeout = 0 } const enableInactivity = () => { - // this.player.options_.inactivityTimeout = saveInactivityTimeout + this.player.options_.inactivityTimeout = saveInactivityTimeout } 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 { } createMenu () { - const menu = new Menu(this.player()) - + const menu = new Menu(this.player_) for (const videoFile of this.player_.peertube().videoFiles) { menu.addChild(new ResolutionMenuItem( 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 { this.label = options.label this.id = options.id - player.peertube().on('videoFileUpdate', () => this.update()) + player.peertube().on('videoFileUpdate', () => this.updateSelection()) } handleClick (event) { @@ -22,7 +22,7 @@ class ResolutionMenuItem extends MenuItem { this.player_.peertube().updateResolution(this.id) } - update () { + updateSelection () { this.selected(this.player_.peertube().getCurrentResolutionId() === this.id) } } 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 { this.buildMenu() this.bindEvents() - // Prepare dialog + // Prepare the dialog this.player().one('play', () => this.hideDialog()) } -- cgit v1.2.3