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

test: fix failing IE11 test due to late initialize of EME keys #1241

Merged
merged 1 commit into from
Dec 20, 2021
Merged
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
14 changes: 12 additions & 2 deletions test/videojs-http-streaming.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4745,11 +4745,21 @@ QUnit.test('eme waitingforkey event triggers another setup', function(assert) {

vhs.masterPlaylistController_.sourceUpdater_.trigger('createdsourcebuffers');

assert.equal(createKeySessionCalls, 1, 'called createKeySessions_ once');
// Since IE11 doesn't initialize media keys early, in this test IE11 will always have
// one less call than in other browsers.
if (videojs.browser.IE_VERSION === 11) {
assert.equal(createKeySessionCalls, 0, 'did not call createKeySessions_ yet');
} else {
assert.equal(createKeySessionCalls, 1, 'called createKeySessions_ once');
}

this.player.tech_.trigger({type: 'waitingforkey', status: 'usable'});

assert.equal(createKeySessionCalls, 2, 'called createKeySessions_ again');
if (videojs.browser.IE_VERSION === 11) {
assert.equal(createKeySessionCalls, 1, 'called createKeySessions_ once');
} else {
assert.equal(createKeySessionCalls, 2, 'called createKeySessions_ again');
}
});

QUnit.test('integration: configures eme for DASH on source buffer creation', function(assert) {
Expand Down