aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-02-24 10:22:34 +0100
committerChocobozzz <me@florianbigard.com>2021-02-24 10:22:34 +0100
commite84203f2955006d9134c5596f1c8dbd65c20069c (patch)
tree92763bc78456597199b61e842680671c38093a9b /client/src/assets
parent2abaa3f27ec9870749a3a6f001922740e26c3830 (diff)
downloadPeerTube-e84203f2955006d9134c5596f1c8dbd65c20069c.tar.gz
PeerTube-e84203f2955006d9134c5596f1c8dbd65c20069c.tar.zst
PeerTube-e84203f2955006d9134c5596f1c8dbd65c20069c.zip
Fix subtitles load on safari
Diffstat (limited to 'client/src/assets')
-rw-r--r--client/src/assets/player/p2p-media-loader/hls-plugin.ts7
1 files changed, 1 insertions, 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 {
102 private dvrDuration: number = null 102 private dvrDuration: number = null
103 private edgeMargin: number = null 103 private edgeMargin: number = null
104 104
105 private handlers: { [ id in 'play' | 'addtrack' | 'playing' | 'textTracksChange' | 'audioTracksChange' ]: EventListener } = { 105 private handlers: { [ id in 'play' | 'playing' | 'textTracksChange' | 'audioTracksChange' ]: EventListener } = {
106 play: null, 106 play: null,
107 addtrack: null,
108 playing: null, 107 playing: null,
109 textTracksChange: null, 108 textTracksChange: null,
110 audioTracksChange: null 109 audioTracksChange: null
@@ -177,7 +176,6 @@ class Html5Hlsjs {
177 // See comment for `initialize` method. 176 // See comment for `initialize` method.
178 dispose () { 177 dispose () {
179 this.videoElement.removeEventListener('play', this.handlers.play) 178 this.videoElement.removeEventListener('play', this.handlers.play)
180 this.videoElement.textTracks.removeEventListener('addtrack', this.handlers.addtrack)
181 this.videoElement.removeEventListener('playing', this.handlers.playing) 179 this.videoElement.removeEventListener('playing', this.handlers.playing)
182 180
183 this.player.textTracks().removeEventListener('change', this.handlers.textTracksChange) 181 this.player.textTracks().removeEventListener('change', this.handlers.textTracksChange)
@@ -622,9 +620,6 @@ class Html5Hlsjs {
622 620
623 this.hls.attachMedia(this.videoElement) 621 this.hls.attachMedia(this.videoElement)
624 622
625 this.handlers.addtrack = this._updateTextTrackList.bind(this)
626 this.videoElement.textTracks.addEventListener('addtrack', this.handlers.addtrack)
627
628 this.hls.loadSource(this.source.src) 623 this.hls.loadSource(this.source.src)
629 } 624 }
630 625