diff options
author | Chocobozzz <me@florianbigard.com> | 2022-03-14 11:16:54 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-03-14 11:36:38 +0100 |
commit | 9597920ee3d4ac99803e7107983ddf98a9dfb3c4 (patch) | |
tree | 62c98909b4eb30ece3c0f58c26c8555e6bef1e31 /client/src/assets/player/p2p-media-loader | |
parent | 9af2accee68082e4e1160a4e4a7036451262be02 (diff) | |
download | PeerTube-9597920ee3d4ac99803e7107983ddf98a9dfb3c4.tar.gz PeerTube-9597920ee3d4ac99803e7107983ddf98a9dfb3c4.tar.zst PeerTube-9597920ee3d4ac99803e7107983ddf98a9dfb3c4.zip |
Reorganize player manager options builder
Diffstat (limited to 'client/src/assets/player/p2p-media-loader')
-rw-r--r-- | client/src/assets/player/p2p-media-loader/hls-plugin.ts | 2 | ||||
-rw-r--r-- | client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/client/src/assets/player/p2p-media-loader/hls-plugin.ts b/client/src/assets/player/p2p-media-loader/hls-plugin.ts index ae31bcfe1..ccee2d90f 100644 --- a/client/src/assets/player/p2p-media-loader/hls-plugin.ts +++ b/client/src/assets/player/p2p-media-loader/hls-plugin.ts | |||
@@ -24,7 +24,7 @@ const registerSourceHandler = function (vjs: typeof videojs) { | |||
24 | const html5 = vjs.getTech('Html5') | 24 | const html5 = vjs.getTech('Html5') |
25 | 25 | ||
26 | if (!html5) { | 26 | if (!html5) { |
27 | console.error('Not supported version if video.js') | 27 | console.error('No Hml5 tech found in videojs') |
28 | return | 28 | return |
29 | } | 29 | } |
30 | 30 | ||
diff --git a/client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts b/client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts index f8e5e2d6b..1d7a39b4e 100644 --- a/client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts +++ b/client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts | |||
@@ -111,9 +111,7 @@ class P2pMediaLoaderPlugin extends Plugin { | |||
111 | private initializePlugin () { | 111 | private initializePlugin () { |
112 | initHlsJsPlayer(this.hlsjs) | 112 | initHlsJsPlayer(this.hlsjs) |
113 | 113 | ||
114 | // FIXME: typings | 114 | this.p2pEngine = this.options.loader.getEngine() |
115 | const options = (this.player.tech(true).options_ as any) | ||
116 | this.p2pEngine = options.hlsjsConfig.loader.getEngine() | ||
117 | 115 | ||
118 | this.p2pEngine.on(Events.SegmentError, (segment: Segment, err) => { | 116 | this.p2pEngine.on(Events.SegmentError, (segment: Segment, err) => { |
119 | console.error('Segment error.', segment, err) | 117 | console.error('Segment error.', segment, err) |