diff options
-rw-r--r-- | client/src/assets/player/shared/manager-options/hls-options-builder.ts | 10 | ||||
-rw-r--r-- | client/src/assets/player/shared/manager-options/manager-options-builder.ts | 6 |
2 files changed, 9 insertions, 7 deletions
diff --git a/client/src/assets/player/shared/manager-options/hls-options-builder.ts b/client/src/assets/player/shared/manager-options/hls-options-builder.ts index e7f664fd4..1262cf4e8 100644 --- a/client/src/assets/player/shared/manager-options/hls-options-builder.ts +++ b/client/src/assets/player/shared/manager-options/hls-options-builder.ts | |||
@@ -46,13 +46,14 @@ export class HLSOptionsBuilder { | |||
46 | if (file.fps >= 50) label += file.fps | 46 | if (file.fps >= 50) label += file.fps |
47 | 47 | ||
48 | return label | 48 | return label |
49 | }, | ||
50 | html5: { | ||
51 | hlsjsConfig: this.getHLSJSOptions(loader) | ||
52 | } | 49 | } |
53 | } | 50 | } |
54 | 51 | ||
55 | return { p2pMediaLoader, hlsjs } | 52 | const html5 = { |
53 | hlsjsConfig: this.getHLSJSOptions(loader) | ||
54 | } | ||
55 | |||
56 | return { p2pMediaLoader, hlsjs, html5 } | ||
56 | } | 57 | } |
57 | 58 | ||
58 | // --------------------------------------------------------------------------- | 59 | // --------------------------------------------------------------------------- |
@@ -73,7 +74,6 @@ export class HLSOptionsBuilder { | |||
73 | 74 | ||
74 | return { | 75 | return { |
75 | loader: { | 76 | loader: { |
76 | |||
77 | trackerAnnounce, | 77 | trackerAnnounce, |
78 | rtcConfig: getRtcConfig(), | 78 | rtcConfig: getRtcConfig(), |
79 | 79 | ||
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 | ||