Skip to content

Commit

Permalink
Merge pull request #12 from clappr/avoid-invalid-references-noise
Browse files Browse the repository at this point in the history
Prevent access of invalid references
  • Loading branch information
jhonatangcavalcanti authored Jan 25, 2021
2 parents c9e67cb + 97d1c3d commit e874fd1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/hls.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ export default class HlsjsPlayback extends HTML5Video {
_setup() {
this._ccIsSetup = false
this._ccTracksUpdated = false
this._hls && this._hls.destroy()
this._hls = new HLSJS(assign({}, this.options.playback.hlsjsConfig))
this._hls.once(HLSJS.Events.MEDIA_ATTACHED, () => this._hls.loadSource(this.options.src))
this._hls.on(HLSJS.Events.LEVEL_LOADED, (evt, data) => this._updatePlaybackType(evt, data))
Expand Down

0 comments on commit e874fd1

Please sign in to comment.