}
if (mode === 'p2p-media-loader') {
- const { streamrootHls } = PeertubePlayerManager.addP2PMediaLoaderOptions(plugins, options, p2pMediaLoaderModule)
+ const { hlsjs } = PeertubePlayerManager.addP2PMediaLoaderOptions(plugins, options, p2pMediaLoaderModule)
- html5 = streamrootHls.html5
+ html5 = hlsjs.html5
}
if (mode === 'webtorrent') {
: undefined, // Undefined so the player knows it has to check the local storage
autoplay: autoplay === true
- ? 'any' // Use 'any' instead of true to get notifier by videojs if autoplay fails
+ ? 'play' // Use 'any' instead of true to get notifier by videojs if autoplay fails
: autoplay,
poster: commonOptions.poster,
swarmId: p2pMediaLoaderOptions.playlistUrl
}
}
- const streamrootHls = {
+ const hlsjs = {
levelLabelHandler: (level: { height: number, width: number }) => {
const file = p2pMediaLoaderOptions.videoFiles.find(f => f.resolution.id === level.height)
}
}
- const toAssign = { p2pMediaLoader, streamrootHls }
+ const toAssign = { p2pMediaLoader, hlsjs }
Object.assign(plugins, toAssign)
return toAssign