aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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'