aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/assets')
-rw-r--r--client/src/assets/player/videojs-components/theater-button.ts11
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 () {