diff options
Diffstat (limited to 'client/src/assets/player/peertube-player-manager.ts')
-rw-r--r-- | client/src/assets/player/peertube-player-manager.ts | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/client/src/assets/player/peertube-player-manager.ts b/client/src/assets/player/peertube-player-manager.ts index 6a6d63462..dcfa3a593 100644 --- a/client/src/assets/player/peertube-player-manager.ts +++ b/client/src/assets/player/peertube-player-manager.ts | |||
@@ -18,14 +18,21 @@ import './videojs-components/settings-menu-item' | |||
18 | import './videojs-components/settings-panel' | 18 | import './videojs-components/settings-panel' |
19 | import './videojs-components/settings-panel-child' | 19 | import './videojs-components/settings-panel-child' |
20 | import './videojs-components/theater-button' | 20 | import './videojs-components/theater-button' |
21 | import './playlist/playlist-plugin' | ||
21 | import videojs from 'video.js' | 22 | import videojs from 'video.js' |
22 | import { VideoFile } from '@shared/models' | ||
23 | import { isDefaultLocale } from '@shared/core-utils/i18n' | 23 | import { isDefaultLocale } from '@shared/core-utils/i18n' |
24 | import { VideoFile } from '@shared/models' | ||
24 | import { RedundancyUrlManager } from './p2p-media-loader/redundancy-url-manager' | 25 | import { RedundancyUrlManager } from './p2p-media-loader/redundancy-url-manager' |
25 | import { segmentUrlBuilderFactory } from './p2p-media-loader/segment-url-builder' | 26 | import { segmentUrlBuilderFactory } from './p2p-media-loader/segment-url-builder' |
26 | import { segmentValidatorFactory } from './p2p-media-loader/segment-validator' | 27 | import { segmentValidatorFactory } from './p2p-media-loader/segment-validator' |
27 | import { getStoredP2PEnabled } from './peertube-player-local-storage' | 28 | import { getStoredP2PEnabled } from './peertube-player-local-storage' |
28 | import { P2PMediaLoaderPluginOptions, UserWatching, VideoJSCaption, VideoJSPluginOptions } from './peertube-videojs-typings' | 29 | import { |
30 | P2PMediaLoaderPluginOptions, | ||
31 | PlaylistPluginOptions, | ||
32 | UserWatching, | ||
33 | VideoJSCaption, | ||
34 | VideoJSPluginOptions | ||
35 | } from './peertube-videojs-typings' | ||
29 | import { TranslationsManager } from './translations-manager' | 36 | import { TranslationsManager } from './translations-manager' |
30 | import { buildVideoEmbed, buildVideoLink, copyToClipboard, getRtcConfig, isIOS, isSafari } from './utils' | 37 | import { buildVideoEmbed, buildVideoLink, copyToClipboard, getRtcConfig, isIOS, isSafari } from './utils' |
31 | 38 | ||
@@ -71,6 +78,9 @@ export interface CommonOptions extends CustomizationOptions { | |||
71 | 78 | ||
72 | autoplay: boolean | 79 | autoplay: boolean |
73 | nextVideo?: Function | 80 | nextVideo?: Function |
81 | |||
82 | playlist?: PlaylistPluginOptions | ||
83 | |||
74 | videoDuration: number | 84 | videoDuration: number |
75 | enableHotkeys: boolean | 85 | enableHotkeys: boolean |
76 | inactivityTimeout: number | 86 | inactivityTimeout: number |
@@ -203,6 +213,10 @@ export class PeertubePlayerManager { | |||
203 | } | 213 | } |
204 | } | 214 | } |
205 | 215 | ||
216 | if (commonOptions.playlist) { | ||
217 | plugins.playlist = commonOptions.playlist | ||
218 | } | ||
219 | |||
206 | if (commonOptions.enableHotkeys === true) { | 220 | if (commonOptions.enableHotkeys === true) { |
207 | PeertubePlayerManager.addHotkeysOptions(plugins) | 221 | PeertubePlayerManager.addHotkeysOptions(plugins) |
208 | } | 222 | } |