From 85c4392caed6b687b359509146e1ce8b0c74e22b Mon Sep 17 00:00:00 2001 From: brandonocasey Date: Wed, 28 Jul 2021 11:20:13 -0400 Subject: [PATCH 1/2] fix: generate the proper number of segments for segment template multi period dash --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1b60b6089..f6de7c53a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6540,9 +6540,9 @@ "dev": true }, "mpd-parser": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/mpd-parser/-/mpd-parser-0.17.0.tgz", - "integrity": "sha512-oKS5G0jCcHHJ3sHYlcLeM9Xcbuixl08eAx7QW0Th7ChlZiI0YvLtGaHE/L0aKUBJFNvtkeksIr8XgJgSBBsS4g==", + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/mpd-parser/-/mpd-parser-0.18.0.tgz", + "integrity": "sha512-5Y/JDuuTP/0cQCiDdP18zqD7g5woaBegcH2lCezuc26YHpY2XovI8exYKbJQ115U5+7Xnv0N9EjI8c+x0MR85A==", "requires": { "@babel/runtime": "^7.12.5", "@videojs/vhs-utils": "^3.0.2", diff --git a/package.json b/package.json index b03b45a6a..e5185bc9d 100644 --- a/package.json +++ b/package.json @@ -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" }, From 26a107355924f3c1b8334ecca21ec39a106c30c5 Mon Sep 17 00:00:00 2001 From: brandonocasey Date: Wed, 28 Jul 2021 11:29:11 -0400 Subject: [PATCH 2/2] playback test --- test/playback.test.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/test/playback.test.js b/test/playback.test.js index 821a70cea..0f5c5c9a0 100644 --- a/test/playback.test.js +++ b/test/playback.test.js @@ -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.