Skip to content

Commit

Permalink
playlist-loader: correctly detect playlist type in case of empty chun…
Browse files Browse the repository at this point in the history
…k list

related to video-dev#1607
  • Loading branch information
mangui committed Mar 26, 2018
1 parent 29b0ce6 commit 33182cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/loader/playlist-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@ class PlaylistLoader extends EventHandler {
return;
}

// Check if chunk-list or master
if (string.indexOf('#EXTINF:') > 0)
// Check if chunk-list or master. handle empty chunk list case (first EXTINF not signaled, but TARGETDURATION present)
if (string.indexOf('#EXTINF:') > 0 || string.indexOf('#EXT-X-TARGETDURATION:') > 0)
this._handleTrackOrLevelPlaylist(response, stats, context, networkDetails);
else
this._handleMasterPlaylist(response, stats, context, networkDetails);
Expand Down

0 comments on commit 33182cf

Please sign in to comment.