Skip to content

Commit

Permalink
Merge pull request #1578 from wahajdar/fix/onReady-event-m3u8
Browse files Browse the repository at this point in the history
Suggested Fix: onReady event firing with m3u8
  • Loading branch information
towerz committed Feb 27, 2018
2 parents 67656d0 + 6383843 commit d2b5e67
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/playbacks/hls/hls.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,14 @@ export default class HLS extends HTML5VideoPlayback {
this._hls.on(HLSJS.Events.SUBTITLE_TRACK_LOADED, (evt, data) => this._onSubtitleLoaded(evt, data))
this._hls.on(HLSJS.Events.SUBTITLE_TRACKS_UPDATED, () => this._ccTracksUpdated = true)
this._hls.attachMedia(this.el)
}

render() {
this._ready()
return super.render()
}

_ready() {
if (!this._hls)
return

this._isReadyState = true
this.trigger(Events.PLAYBACK_READY, this.name)
}
Expand Down

0 comments on commit d2b5e67

Please sign in to comment.