Skip to content

Commit

Permalink
feat: listen MANIFEST_PARSED event to update _manifestParsed flag val…
Browse files Browse the repository at this point in the history
…ue to true
  • Loading branch information
joaopaulovieira committed Jan 31, 2021
1 parent 8fda934 commit 1590770
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hls.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export default class HlsjsPlayback extends HTML5Video {
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.MANIFEST_PARSED, () => this._manifestParsed = true)
this._hls.on(HLSJS.Events.LEVEL_LOADED, (evt, data) => this._updatePlaybackType(evt, data))
this._hls.on(HLSJS.Events.LEVEL_UPDATED, (evt, data) => this._onLevelUpdated(evt, data))
this._hls.on(HLSJS.Events.LEVEL_SWITCHING, (evt,data) => this._onLevelSwitch(evt, data))
Expand Down

0 comments on commit 1590770

Please sign in to comment.