Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Generate the correct number of segments for segment template multi period dash #1175

Merged
merged 2 commits into from
Jul 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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