Skip to content

Commit

Permalink
fix: skip playlists without sidx (#73)
Browse files Browse the repository at this point in the history
This can be when we have an mpd with captions without SIDX and video segments that use SIDX, like in ihttps://dash.edgesuite.net/akamai/test/caption_test/ElephantsDream/elephants_dream_480p_heaac5_1.mpd.

Fixes videojs/video.js#5289
  • Loading branch information
gkatsev committed May 1, 2019
1 parent 0227f1f commit 67d2bad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/toM3u8.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ const addSegmentInfoFromSidx = (playlists, sidxMapping = {}) => {

for (const i in playlists) {
const playlist = playlists[i];

if (!playlist.sidx) {
continue;
}

const sidxKey = playlist.sidx.uri + '-' +
byteRangeToString(playlist.sidx.byterange);
const sidxMatch = sidxMapping[sidxKey] && sidxMapping[sidxKey].sidx;
Expand Down

0 comments on commit 67d2bad

Please sign in to comment.