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/peertube-player.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/peertube-player.ts')
-rw-r--r-- | client/src/assets/player/peertube-player.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/client/src/assets/player/peertube-player.ts b/client/src/assets/player/peertube-player.ts index eb75091de..afc8e0881 100644 --- a/client/src/assets/player/peertube-player.ts +++ b/client/src/assets/player/peertube-player.ts | |||
@@ -10,6 +10,7 @@ import './settings-menu-button' | |||
10 | import './webtorrent-info-button' | 10 | import './webtorrent-info-button' |
11 | import './peertube-videojs-plugin' | 11 | import './peertube-videojs-plugin' |
12 | import './peertube-load-progress-bar' | 12 | import './peertube-load-progress-bar' |
13 | import './theater-button' | ||
13 | import { videojsUntyped } from './peertube-videojs-typings' | 14 | import { videojsUntyped } from './peertube-videojs-typings' |
14 | import { buildVideoEmbed, buildVideoLink, copyToClipboard } from './utils' | 15 | import { buildVideoEmbed, buildVideoLink, copyToClipboard } from './utils' |
15 | import { getCompleteLocale, getShortLocale, is18nLocale, isDefaultLocale } from '../../../../shared/models/i18n/i18n' | 16 | import { getCompleteLocale, getShortLocale, is18nLocale, isDefaultLocale } from '../../../../shared/models/i18n/i18n' |
@@ -28,6 +29,7 @@ function getVideojsOptions (options: { | |||
28 | peertubeLink: boolean, | 29 | peertubeLink: boolean, |
29 | poster: string, | 30 | poster: string, |
30 | startTime: number | 31 | startTime: number |
32 | theaterMode: boolean | ||
31 | }) { | 33 | }) { |
32 | const videojsOptions = { | 34 | const videojsOptions = { |
33 | controls: true, | 35 | controls: true, |
@@ -63,6 +65,7 @@ function getVideojsOptions (options: { | |||
63 | 65 | ||
64 | function getControlBarChildren (options: { | 66 | function getControlBarChildren (options: { |
65 | peertubeLink: boolean | 67 | peertubeLink: boolean |
68 | theaterMode: boolean | ||
66 | }) { | 69 | }) { |
67 | const children = { | 70 | const children = { |
68 | 'playToggle': {}, | 71 | 'playToggle': {}, |
@@ -105,6 +108,12 @@ function getControlBarChildren (options: { | |||
105 | }) | 108 | }) |
106 | } | 109 | } |
107 | 110 | ||
111 | if (options.theaterMode === true) { | ||
112 | Object.assign(children, { | ||
113 | 'theaterButton': {} | ||
114 | }) | ||
115 | } | ||
116 | |||
108 | Object.assign(children, { | 117 | Object.assign(children, { |
109 | 'fullscreenToggle': {} | 118 | 'fullscreenToggle': {} |
110 | }) | 119 | }) |