From e84203f2955006d9134c5596f1c8dbd65c20069c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 24 Feb 2021 10:22:34 +0100 Subject: Fix subtitles load on safari --- client/src/assets/player/p2p-media-loader/hls-plugin.ts | 7 +------ 1 file changed, 1 insertion(+), 6 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 37242befe..672a85d0b 100644 --- a/client/src/assets/player/p2p-media-loader/hls-plugin.ts +++ b/client/src/assets/player/p2p-media-loader/hls-plugin.ts @@ -102,9 +102,8 @@ class Html5Hlsjs { private dvrDuration: number = null private edgeMargin: number = null - private handlers: { [ id in 'play' | 'addtrack' | 'playing' | 'textTracksChange' | 'audioTracksChange' ]: EventListener } = { + private handlers: { [ id in 'play' | 'playing' | 'textTracksChange' | 'audioTracksChange' ]: EventListener } = { play: null, - addtrack: null, playing: null, textTracksChange: null, audioTracksChange: null @@ -177,7 +176,6 @@ class Html5Hlsjs { // See comment for `initialize` method. dispose () { this.videoElement.removeEventListener('play', this.handlers.play) - this.videoElement.textTracks.removeEventListener('addtrack', this.handlers.addtrack) this.videoElement.removeEventListener('playing', this.handlers.playing) this.player.textTracks().removeEventListener('change', this.handlers.textTracksChange) @@ -622,9 +620,6 @@ class Html5Hlsjs { this.hls.attachMedia(this.videoElement) - this.handlers.addtrack = this._updateTextTrackList.bind(this) - this.videoElement.textTracks.addEventListener('addtrack', this.handlers.addtrack) - this.hls.loadSource(this.source.src) } -- cgit v1.2.3