Fix subtitles load on safari

pull/3778/head
Chocobozzz 2021-02-24 10:22:34 +01:00
parent 2abaa3f27e
commit e84203f295
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 1 additions and 6 deletions

View File

@ -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)
}