|
|
@ -897,6 +897,31 @@ QUnit.test( |
|
|
|
} |
|
|
|
); |
|
|
|
|
|
|
|
QUnit.test('excludes playlists with unsupported codecs before initial selection', function(assert) { |
|
|
|
this.masterPlaylistController.selectPlaylist = () => { |
|
|
|
assert.equal( |
|
|
|
this.masterPlaylistController.master().playlists[0].excludeUntil, |
|
|
|
Infinity, |
|
|
|
'excludes unsupported playlist before initial selection' |
|
|
|
); |
|
|
|
}; |
|
|
|
|
|
|
|
openMediaSource(this.player, this.clock); |
|
|
|
|
|
|
|
// master
|
|
|
|
this.requests.shift().respond( |
|
|
|
200, null, |
|
|
|
'#EXTM3U\n' + |
|
|
|
'#EXT-X-STREAM-INF:BANDWIDTH=1,CODECS="theora,mp4a.40.5"\n' + |
|
|
|
'media.m3u8\n' + |
|
|
|
'#EXT-X-STREAM-INF:BANDWIDTH=10000,CODECS="avc1.4d400d,mp4a.40.2"\n' + |
|
|
|
'media1.m3u8\n' |
|
|
|
); |
|
|
|
|
|
|
|
// media
|
|
|
|
this.standardXHRResponse(this.requests.shift()); |
|
|
|
}); |
|
|
|
|
|
|
|
QUnit.test( |
|
|
|
'updates the combined segment loader on live playlist refreshes', |
|
|
|
function(assert) { |
|
|
@ -1352,6 +1377,13 @@ QUnit.test('blacklists switching between playlists with different codecs', funct |
|
|
|
|
|
|
|
this.player.tech_.vhs.bandwidth = 1; |
|
|
|
|
|
|
|
const mpc = this.masterPlaylistController; |
|
|
|
|
|
|
|
// don't exclude unsupported variants now so we can
|
|
|
|
// keep them until until later on.
|
|
|
|
mpc.excludeUnsupportedVariants_ = () => {}; |
|
|
|
mpc.sourceUpdater_.canChangeType = () => false; |
|
|
|
|
|
|
|
// master
|
|
|
|
this.requests.shift() |
|
|
|
.respond( |
|
|
@ -1381,10 +1413,6 @@ QUnit.test('blacklists switching between playlists with different codecs', funct |
|
|
|
'selected HE-AAC stream' |
|
|
|
); |
|
|
|
|
|
|
|
const mpc = this.masterPlaylistController; |
|
|
|
|
|
|
|
mpc.sourceUpdater_.canChangeType = () => false; |
|
|
|
|
|
|
|
let debugLogs = []; |
|
|
|
|
|
|
|
mpc.logger_ = (...logs) => { |
|
|
|