diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-11 16:49:56 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-11 16:49:56 +0200 |
commit | 054a103b286277708a3a807a52da6cca12e1b0ce (patch) | |
tree | c52421b96951be9c4fbf654ab0c4b759aeb9aff9 /client/src/assets/player/utils.ts | |
parent | 54a3a12ed2d972386c12d59717eedfadd7203767 (diff) | |
download | PeerTube-054a103b286277708a3a807a52da6cca12e1b0ce.tar.gz PeerTube-054a103b286277708a3a807a52da6cca12e1b0ce.tar.zst PeerTube-054a103b286277708a3a807a52da6cca12e1b0ce.zip |
Add theatre mode
Diffstat (limited to 'client/src/assets/player/utils.ts')
-rw-r--r-- | client/src/assets/player/utils.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/client/src/assets/player/utils.ts b/client/src/assets/player/utils.ts index 4eaf53720..b7cd40aa2 100644 --- a/client/src/assets/player/utils.ts +++ b/client/src/assets/player/utils.ts | |||
@@ -51,6 +51,13 @@ function getAverageBandwidth () { | |||
51 | return undefined | 51 | return undefined |
52 | } | 52 | } |
53 | 53 | ||
54 | function getStoredTheater () { | ||
55 | const value = getLocalStorage('theater-enabled') | ||
56 | if (value !== null && value !== undefined) return value === 'true' | ||
57 | |||
58 | return undefined | ||
59 | } | ||
60 | |||
54 | function saveVolumeInStore (value: number) { | 61 | function saveVolumeInStore (value: number) { |
55 | return setLocalStorage('volume', value.toString()) | 62 | return setLocalStorage('volume', value.toString()) |
56 | } | 63 | } |
@@ -59,6 +66,10 @@ function saveMuteInStore (value: boolean) { | |||
59 | return setLocalStorage('mute', value.toString()) | 66 | return setLocalStorage('mute', value.toString()) |
60 | } | 67 | } |
61 | 68 | ||
69 | function saveTheaterInStore (enabled: boolean) { | ||
70 | return setLocalStorage('theater-enabled', enabled.toString()) | ||
71 | } | ||
72 | |||
62 | function saveAverageBandwidth (value: number) { | 73 | function saveAverageBandwidth (value: number) { |
63 | return setLocalStorage('average-bandwidth', value.toString()) | 74 | return setLocalStorage('average-bandwidth', value.toString()) |
64 | } | 75 | } |
@@ -133,6 +144,8 @@ export { | |||
133 | videoFileMaxByResolution, | 144 | videoFileMaxByResolution, |
134 | videoFileMinByResolution, | 145 | videoFileMinByResolution, |
135 | copyToClipboard, | 146 | copyToClipboard, |
147 | getStoredTheater, | ||
148 | saveTheaterInStore, | ||
136 | isMobile, | 149 | isMobile, |
137 | bytes | 150 | bytes |
138 | } | 151 | } |