diff options
author | Chocobozzz <me@florianbigard.com> | 2022-10-21 11:27:39 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2022-10-24 14:48:24 +0200 |
commit | 326f36929a2bc37185e9188ee4eff17b52a329e5 (patch) | |
tree | 806af38a7d22c992a91d5bbf948cad7f517c1879 /client/src/assets/player/shared/p2p-media-loader | |
parent | 9ab330b90decf4edf152ff8e1d2948c065766b2c (diff) | |
download | PeerTube-326f36929a2bc37185e9188ee4eff17b52a329e5.tar.gz PeerTube-326f36929a2bc37185e9188ee4eff17b52a329e5.tar.zst PeerTube-326f36929a2bc37185e9188ee4eff17b52a329e5.zip |
Don't fallback to HLS with private videos
Diffstat (limited to 'client/src/assets/player/shared/p2p-media-loader')
-rw-r--r-- | client/src/assets/player/shared/p2p-media-loader/p2p-media-loader-plugin.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/client/src/assets/player/shared/p2p-media-loader/p2p-media-loader-plugin.ts b/client/src/assets/player/shared/p2p-media-loader/p2p-media-loader-plugin.ts index 3c4482f2e..2ed09c61c 100644 --- a/client/src/assets/player/shared/p2p-media-loader/p2p-media-loader-plugin.ts +++ b/client/src/assets/player/shared/p2p-media-loader/p2p-media-loader-plugin.ts | |||
@@ -44,8 +44,14 @@ class P2pMediaLoaderPlugin extends Plugin { | |||
44 | if (!(videojs as any).Html5Hlsjs) { | 44 | if (!(videojs as any).Html5Hlsjs) { |
45 | logger.warn('HLS.js does not seem to be supported. Try to fallback to built in HLS.') | 45 | logger.warn('HLS.js does not seem to be supported. Try to fallback to built in HLS.') |
46 | 46 | ||
47 | let message: string | ||
47 | if (!player.canPlayType('application/vnd.apple.mpegurl')) { | 48 | if (!player.canPlayType('application/vnd.apple.mpegurl')) { |
48 | const message = 'Cannot fallback to built-in HLS' | 49 | message = 'Cannot fallback to built-in HLS' |
50 | } else if (options.requiresAuth) { | ||
51 | message = 'Video requires auth which is not compatible to build-in HLS player' | ||
52 | } | ||
53 | |||
54 | if (message) { | ||
49 | logger.warn(message) | 55 | logger.warn(message) |
50 | 56 | ||
51 | player.ready(() => player.trigger('error', new Error(message))) | 57 | player.ready(() => player.trigger('error', new Error(message))) |