aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-10-28 15:32:06 +0200
committerChocobozzz <me@florianbigard.com>2022-10-28 15:32:06 +0200
commit0b8e50aa8de04ca457ea556990de5c1b330fe2ac (patch)
tree4c89c4c0f890dfaca96411a471fed767c171af93 /client/src/assets/player/shared
parent814e9e07ba65446af8446dbbd2f0d70c85fd1b33 (diff)
downloadPeerTube-0b8e50aa8de04ca457ea556990de5c1b330fe2ac.tar.gz
PeerTube-0b8e50aa8de04ca457ea556990de5c1b330fe2ac.tar.zst
PeerTube-0b8e50aa8de04ca457ea556990de5c1b330fe2ac.zip
Fix HLS fallback
Diffstat (limited to 'client/src/assets/player/shared')
-rw-r--r--client/src/assets/player/shared/p2p-media-loader/p2p-media-loader-plugin.ts11
1 files changed, 10 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 2ed09c61c..0757aa5de 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
@@ -54,7 +54,16 @@ class P2pMediaLoaderPlugin extends Plugin {
54 if (message) { 54 if (message) {
55 logger.warn(message) 55 logger.warn(message)
56 56
57 player.ready(() => player.trigger('error', new Error(message))) 57 const error: MediaError = {
58 code: MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED,
59 message,
60 MEDIA_ERR_ABORTED: MediaError.MEDIA_ERR_ABORTED,
61 MEDIA_ERR_DECODE: MediaError.MEDIA_ERR_DECODE,
62 MEDIA_ERR_NETWORK: MediaError.MEDIA_ERR_NETWORK,
63 MEDIA_ERR_SRC_NOT_SUPPORTED: MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED
64 }
65
66 player.ready(() => player.error(error))
58 return 67 return
59 } 68 }
60 } else { 69 } else {