Fix missing p2p media loader config for hls
This commit is contained in:
parent
57e4e1c1a9
commit
e71e2d8a8f
|
@ -46,13 +46,14 @@ export class HLSOptionsBuilder {
|
||||||
if (file.fps >= 50) label += file.fps
|
if (file.fps >= 50) label += file.fps
|
||||||
|
|
||||||
return label
|
return label
|
||||||
},
|
|
||||||
html5: {
|
|
||||||
hlsjsConfig: this.getHLSJSOptions(loader)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return { p2pMediaLoader, hlsjs }
|
const html5 = {
|
||||||
|
hlsjsConfig: this.getHLSJSOptions(loader)
|
||||||
|
}
|
||||||
|
|
||||||
|
return { p2pMediaLoader, hlsjs, html5 }
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
@ -73,7 +74,6 @@ export class HLSOptionsBuilder {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
loader: {
|
loader: {
|
||||||
|
|
||||||
trackerAnnounce,
|
trackerAnnounce,
|
||||||
rtcConfig: getRtcConfig(),
|
rtcConfig: getRtcConfig(),
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import videojs from 'video.js'
|
||||||
import { copyToClipboard } from '@root-helpers/utils'
|
import { copyToClipboard } from '@root-helpers/utils'
|
||||||
import { buildVideoOrPlaylistEmbed } from '@root-helpers/video'
|
import { buildVideoOrPlaylistEmbed } from '@root-helpers/video'
|
||||||
import { isIOS, isSafari } from '@root-helpers/web-browser'
|
import { isIOS, isSafari } from '@root-helpers/web-browser'
|
||||||
import { buildVideoLink, decorateVideoLink } from '@shared/core-utils'
|
import { buildVideoLink, decorateVideoLink, pick } from '@shared/core-utils'
|
||||||
import { isDefaultLocale } from '@shared/core-utils/i18n'
|
import { isDefaultLocale } from '@shared/core-utils/i18n'
|
||||||
import { VideoJSPluginOptions } from '../../types'
|
import { VideoJSPluginOptions } from '../../types'
|
||||||
import { CommonOptions, PeertubePlayerManagerOptions, PlayerMode } from '../../types/manager-options'
|
import { CommonOptions, PeertubePlayerManagerOptions, PlayerMode } from '../../types/manager-options'
|
||||||
|
@ -49,8 +49,10 @@ export class ManagerOptionsBuilder {
|
||||||
|
|
||||||
if (this.mode === 'p2p-media-loader') {
|
if (this.mode === 'p2p-media-loader') {
|
||||||
const hlsOptionsBuilder = new HLSOptionsBuilder(this.options, this.p2pMediaLoaderModule)
|
const hlsOptionsBuilder = new HLSOptionsBuilder(this.options, this.p2pMediaLoaderModule)
|
||||||
|
const options = hlsOptionsBuilder.getPluginOptions()
|
||||||
|
|
||||||
Object.assign(plugins, hlsOptionsBuilder.getPluginOptions())
|
Object.assign(plugins, pick(options, [ 'hlsjs', 'p2pMediaLoader' ]))
|
||||||
|
Object.assign(html5, options.html5)
|
||||||
} else if (this.mode === 'webtorrent') {
|
} else if (this.mode === 'webtorrent') {
|
||||||
const webtorrentOptionsBuilder = new WebTorrentOptionsBuilder(this.options, this.getAutoPlayValue(autoplay, alreadyPlayed))
|
const webtorrentOptionsBuilder = new WebTorrentOptionsBuilder(this.options, this.getAutoPlayValue(autoplay, alreadyPlayed))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue