aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/peertube-player-manager.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-01-31 11:39:50 +0100
committerChocobozzz <me@florianbigard.com>2020-01-31 14:13:00 +0100
commit83fcadac86da0bc6120a5b93850bb9a7fc069fba (patch)
treec05e52c22d27d24c84f00630ad58427cf092ed2c /client/src/assets/player/peertube-player-manager.ts
parente40afb5bc486ff2ce1e5f0a21df7e4e32c344b47 (diff)
downloadPeerTube-83fcadac86da0bc6120a5b93850bb9a7fc069fba.tar.gz
PeerTube-83fcadac86da0bc6120a5b93850bb9a7fc069fba.tar.zst
PeerTube-83fcadac86da0bc6120a5b93850bb9a7fc069fba.zip
Move streamroot plugin in core project
To avoid an already bundled HLS.js library, and adapt some parts of the code
Diffstat (limited to 'client/src/assets/player/peertube-player-manager.ts')
-rw-r--r--client/src/assets/player/peertube-player-manager.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/client/src/assets/player/peertube-player-manager.ts b/client/src/assets/player/peertube-player-manager.ts
index 4e6387a53..dbf631a5e 100644
--- a/client/src/assets/player/peertube-player-manager.ts
+++ b/client/src/assets/player/peertube-player-manager.ts
@@ -211,9 +211,9 @@ export class PeertubePlayerManager {
211 } 211 }
212 212
213 if (mode === 'p2p-media-loader') { 213 if (mode === 'p2p-media-loader') {
214 const { streamrootHls } = PeertubePlayerManager.addP2PMediaLoaderOptions(plugins, options, p2pMediaLoaderModule) 214 const { hlsjs } = PeertubePlayerManager.addP2PMediaLoaderOptions(plugins, options, p2pMediaLoaderModule)
215 215
216 html5 = streamrootHls.html5 216 html5 = hlsjs.html5
217 } 217 }
218 218
219 if (mode === 'webtorrent') { 219 if (mode === 'webtorrent') {
@@ -303,7 +303,7 @@ export class PeertubePlayerManager {
303 swarmId: p2pMediaLoaderOptions.playlistUrl 303 swarmId: p2pMediaLoaderOptions.playlistUrl
304 } 304 }
305 } 305 }
306 const streamrootHls = { 306 const hlsjs = {
307 levelLabelHandler: (level: { height: number, width: number }) => { 307 levelLabelHandler: (level: { height: number, width: number }) => {
308 const file = p2pMediaLoaderOptions.videoFiles.find(f => f.resolution.id === level.height) 308 const file = p2pMediaLoaderOptions.videoFiles.find(f => f.resolution.id === level.height)
309 309
@@ -322,7 +322,7 @@ export class PeertubePlayerManager {
322 } 322 }
323 } 323 }
324 324
325 const toAssign = { p2pMediaLoader, streamrootHls } 325 const toAssign = { p2pMediaLoader, hlsjs }
326 Object.assign(plugins, toAssign) 326 Object.assign(plugins, toAssign)
327 327
328 return toAssign 328 return toAssign