diff options
Diffstat (limited to 'client/src/assets/player/shared/manager-options/manager-options-builder.ts')
-rw-r--r-- | client/src/assets/player/shared/manager-options/manager-options-builder.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/client/src/assets/player/shared/manager-options/manager-options-builder.ts b/client/src/assets/player/shared/manager-options/manager-options-builder.ts index 5dab1f7a9..29e851c1c 100644 --- a/client/src/assets/player/shared/manager-options/manager-options-builder.ts +++ b/client/src/assets/player/shared/manager-options/manager-options-builder.ts | |||
@@ -2,7 +2,7 @@ import videojs from 'video.js' | |||
2 | import { copyToClipboard } from '@root-helpers/utils' | 2 | import { copyToClipboard } from '@root-helpers/utils' |
3 | import { buildVideoOrPlaylistEmbed } from '@root-helpers/video' | 3 | import { buildVideoOrPlaylistEmbed } from '@root-helpers/video' |
4 | import { isIOS, isSafari } from '@root-helpers/web-browser' | 4 | import { isIOS, isSafari } from '@root-helpers/web-browser' |
5 | import { buildVideoLink, decorateVideoLink } from '@shared/core-utils' | 5 | import { buildVideoLink, decorateVideoLink, pick } from '@shared/core-utils' |
6 | import { isDefaultLocale } from '@shared/core-utils/i18n' | 6 | import { isDefaultLocale } from '@shared/core-utils/i18n' |
7 | import { VideoJSPluginOptions } from '../../types' | 7 | import { VideoJSPluginOptions } from '../../types' |
8 | import { CommonOptions, PeertubePlayerManagerOptions, PlayerMode } from '../../types/manager-options' | 8 | import { CommonOptions, PeertubePlayerManagerOptions, PlayerMode } from '../../types/manager-options' |
@@ -49,8 +49,10 @@ export class ManagerOptionsBuilder { | |||
49 | 49 | ||
50 | if (this.mode === 'p2p-media-loader') { | 50 | if (this.mode === 'p2p-media-loader') { |
51 | const hlsOptionsBuilder = new HLSOptionsBuilder(this.options, this.p2pMediaLoaderModule) | 51 | const hlsOptionsBuilder = new HLSOptionsBuilder(this.options, this.p2pMediaLoaderModule) |
52 | const options = hlsOptionsBuilder.getPluginOptions() | ||
52 | 53 | ||
53 | Object.assign(plugins, hlsOptionsBuilder.getPluginOptions()) | 54 | Object.assign(plugins, pick(options, [ 'hlsjs', 'p2pMediaLoader' ])) |
55 | Object.assign(html5, options.html5) | ||
54 | } else if (this.mode === 'webtorrent') { | 56 | } else if (this.mode === 'webtorrent') { |
55 | const webtorrentOptionsBuilder = new WebTorrentOptionsBuilder(this.options, this.getAutoPlayValue(autoplay, alreadyPlayed)) | 57 | const webtorrentOptionsBuilder = new WebTorrentOptionsBuilder(this.options, this.getAutoPlayValue(autoplay, alreadyPlayed)) |
56 | 58 | ||