Skip to content

Commit

Permalink
fix: Generate the correct number of segments for segment template mul…
Browse files Browse the repository at this point in the history
…ti period dash (#1175)
  • Loading branch information
brandonocasey authored Jul 28, 2021
1 parent de5baa7 commit 413fee3
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"aes-decrypter": "3.1.2",
"global": "^4.4.0",
"m3u8-parser": "4.7.0",
"mpd-parser": "0.17.0",
"mpd-parser": "0.18.0",
"mux.js": "5.12.2",
"video.js": "^6 || ^7"
},
Expand Down
26 changes: 26 additions & 0 deletions test/playback.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,32 @@ QUnit[testFn]('Live DASH', function(assert) {
});
});

QUnit[testFn]('Multiperiod dash works and can end', function(assert) {
const done = assert.async();

assert.expect(2);
const player = this.player;

playFor(player, 2, function() {
assert.ok(true, 'played for at least two seconds');
assert.equal(player.error(), null, 'has no player errors');

player.one('ended', () => {
assert.ok(true, 'triggered ended event');
done();
});

player.currentTime(player.duration() - 0.5);

done();
});

player.src({
src: 'https://media.axprod.net/TestVectors/v7-Clear/Manifest_MultiPeriod.mpd',
type: 'application/dash+xml'
});
});

// These videos don't work on firefox consistenly. Seems like
// firefox has lower performance or more aggressive throttling than chrome
// which causes a variety of issues.
Expand Down

0 comments on commit 413fee3

Please sign in to comment.