diff options
Diffstat (limited to 'client/src/assets/player/p2p-media-loader')
-rw-r--r-- | client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts | 8 |
1 files changed, 8 insertions, 0 deletions
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 022a9c16f..4dbfda300 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 | |||
@@ -40,6 +40,14 @@ class P2pMediaLoaderPlugin extends Plugin { | |||
40 | 40 | ||
41 | this.options = options | 41 | this.options = options |
42 | 42 | ||
43 | if (!videojs.Html5Hlsjs) { | ||
44 | const message = 'HLS.js does not seem to be supported.' | ||
45 | console.warn(message) | ||
46 | |||
47 | player.ready(() => player.trigger('error', new Error(message))) | ||
48 | return | ||
49 | } | ||
50 | |||
43 | videojs.Html5Hlsjs.addHook('beforeinitialize', (videojsPlayer: any, hlsjs: any) => { | 51 | videojs.Html5Hlsjs.addHook('beforeinitialize', (videojsPlayer: any, hlsjs: any) => { |
44 | this.hlsjs = hlsjs | 52 | this.hlsjs = hlsjs |
45 | }) | 53 | }) |