diff options
author | Chocobozzz <me@florianbigard.com> | 2019-03-18 10:26:53 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-03-18 11:17:59 +0100 |
commit | 9a18a6252071cf21b18f82a24bb63078abb75bc1 (patch) | |
tree | d910e05e8f25b9c91cd325c7478e9283d503c98f /client/src/assets | |
parent | 397d78fb3e55aeeedf3591d7be9d7a30849d9e82 (diff) | |
download | PeerTube-9a18a6252071cf21b18f82a24bb63078abb75bc1.tar.gz PeerTube-9a18a6252071cf21b18f82a24bb63078abb75bc1.tar.zst PeerTube-9a18a6252071cf21b18f82a24bb63078abb75bc1.zip |
Handle theater mode for playlists
Diffstat (limited to 'client/src/assets')
-rw-r--r-- | client/src/assets/player/videojs-components/theater-button.ts | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/client/src/assets/player/videojs-components/theater-button.ts b/client/src/assets/player/videojs-components/theater-button.ts index 1e11a9546..bf383cf34 100644 --- a/client/src/assets/player/videojs-components/theater-button.ts +++ b/client/src/assets/player/videojs-components/theater-button.ts | |||
@@ -16,8 +16,11 @@ class TheaterButton extends Button { | |||
16 | const enabled = getStoredTheater() | 16 | const enabled = getStoredTheater() |
17 | if (enabled === true) { | 17 | if (enabled === true) { |
18 | this.player_.addClass(TheaterButton.THEATER_MODE_CLASS) | 18 | this.player_.addClass(TheaterButton.THEATER_MODE_CLASS) |
19 | |||
19 | this.handleTheaterChange() | 20 | this.handleTheaterChange() |
20 | } | 21 | } |
22 | |||
23 | this.player_.theaterEnabled = enabled | ||
21 | } | 24 | } |
22 | 25 | ||
23 | buildCSSClass () { | 26 | buildCSSClass () { |
@@ -25,13 +28,17 @@ class TheaterButton extends Button { | |||
25 | } | 28 | } |
26 | 29 | ||
27 | handleTheaterChange () { | 30 | handleTheaterChange () { |
28 | if (this.isTheaterEnabled()) { | 31 | const theaterEnabled = this.isTheaterEnabled() |
32 | |||
33 | if (theaterEnabled) { | ||
29 | this.controlText('Normal mode') | 34 | this.controlText('Normal mode') |
30 | } else { | 35 | } else { |
31 | this.controlText('Theater mode') | 36 | this.controlText('Theater mode') |
32 | } | 37 | } |
33 | 38 | ||
34 | saveTheaterInStore(this.isTheaterEnabled()) | 39 | saveTheaterInStore(theaterEnabled) |
40 | |||
41 | this.player_.trigger('theaterChange', theaterEnabled) | ||
35 | } | 42 | } |
36 | 43 | ||
37 | handleClick () { | 44 | handleClick () { |