Browse Source

fix: Don't reset eme options (#32)

pull/35/head
Joe Forbes 8 years ago
committed by GitHub
parent
commit
9a98e91124
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/videojs-http-streaming.js
  2. 7
      test/videojs-http-streaming.test.js

4
src/videojs-http-streaming.js

@ -168,11 +168,11 @@ const setupEmeOptions = (hlsHandler) => {
const player = videojs.players[hlsHandler.tech_.options_.playerId];
if (player.eme) {
player.eme.options = emeOptions(
player.eme.options = videojs.mergeOptions(player.eme.options, emeOptions(
hlsHandler.source_.keySystems,
hlsHandler.playlists.media(),
hlsHandler.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader.media()
);
));
}
};

7
test/videojs-http-streaming.test.js

@ -2835,7 +2835,11 @@ QUnit.test('populates quality levels list when available', function(assert) {
});
QUnit.test('configures eme if present on selectedinitialmedia', function(assert) {
this.player.eme = {};
this.player.eme = {
options: {
previousSetting: 1
}
};
this.player.src({
src: 'manifest/master.mpd',
type: 'application/dash+xml',
@ -2877,6 +2881,7 @@ QUnit.test('configures eme if present on selectedinitialmedia', function(assert)
this.player.tech_.hls.masterPlaylistController_.trigger('selectedinitialmedia');
assert.deepEqual(this.player.eme.options, {
previousSetting: 1,
keySystems: {
keySystem1: {
url: 'url1',

Loading…
Cancel
Save