aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-01-29 14:03:30 +0100
committerChocobozzz <me@florianbigard.com>2021-01-29 14:05:41 +0100
commitd0dd9813d563ecd3f7ec6342d922a1534e182bd8 (patch)
tree18cb0a075094846f98092aebdcf86c0c5ba04898 /client/src/assets
parent789951460bf724ac6a2f18097878fc735269ea71 (diff)
downloadPeerTube-d0dd9813d563ecd3f7ec6342d922a1534e182bd8.tar.gz
PeerTube-d0dd9813d563ecd3f7ec6342d922a1534e182bd8.tar.zst
PeerTube-d0dd9813d563ecd3f7ec6342d922a1534e182bd8.zip
Fix hls error handling
Diffstat (limited to 'client/src/assets')
-rw-r--r--client/src/assets/player/p2p-media-loader/hls-plugin.ts5
1 files changed, 4 insertions, 1 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 4283fc7dd..38a940229 100644
--- a/client/src/assets/player/p2p-media-loader/hls-plugin.ts
+++ b/client/src/assets/player/p2p-media-loader/hls-plugin.ts
@@ -124,8 +124,11 @@ class Html5Hlsjs {
124 124
125 this.videoElement.addEventListener('error', event => { 125 this.videoElement.addEventListener('error', event => {
126 let errorTxt: string 126 let errorTxt: string
127 const mediaError = (event.currentTarget as HTMLVideoElement).error 127 const mediaError = ((event.currentTarget || event.target) as HTMLVideoElement).error
128 128
129 if (!mediaError) return
130
131 console.log(mediaError)
129 switch (mediaError.code) { 132 switch (mediaError.code) {
130 case mediaError.MEDIA_ERR_ABORTED: 133 case mediaError.MEDIA_ERR_ABORTED:
131 errorTxt = 'You aborted the video playback' 134 errorTxt = 'You aborted the video playback'