Skip to content

Commit

Permalink
playlist-loader: also fire LEVEL_LOADED event on playlist without var…
Browse files Browse the repository at this point in the history
…iant manifest

related to video-dev#615
  • Loading branch information
mangui committed Aug 19, 2016
1 parent 5e6f5a4 commit 75f404c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/loader/playlist-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,16 +339,16 @@ class PlaylistLoader extends EventHandler {
if (string.indexOf('#EXTINF:') > 0) {
let isLevel = (type !== 'audioTrack'),
levelDetails = this.parseLevelPlaylist(string, url, level || id || 0, isLevel ? 'main' : 'audio');
levelDetails.tload = stats.tload;
if (type === 'manifest') {
// first request, stream manifest (no master playlist), fire manifest loaded event with level details
hls.trigger(Event.MANIFEST_LOADED, {levels: [{url: url, details : levelDetails}], url: url, stats: stats});
}
stats.tparsed = performance.now();
if (isLevel) {
hls.trigger(Event.LEVEL_LOADED, {details: levelDetails, level: level || 0, id: id || 0, stats: stats});
} else {
stats.tparsed = performance.now();
if (isLevel) {
hls.trigger(Event.LEVEL_LOADED, {details: levelDetails, level: level, id: id, stats: stats});
} else {
hls.trigger(Event.AUDIO_TRACK_LOADED, {details: levelDetails, id: id, stats: stats});
}
hls.trigger(Event.AUDIO_TRACK_LOADED, {details: levelDetails, id: id, stats: stats});
}
} else {
let levels = this.parseMasterPlaylist(string, url),
Expand Down

0 comments on commit 75f404c

Please sign in to comment.