diff options
author | jrummell <jrummell@chromium.org> | 2015-01-07 11:42:52 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-07 19:44:43 +0000 |
commit | 234a6092da0c19366cdcdad57558ec3e613da881 (patch) | |
tree | 18df8f3c759507b61b37141a707a5924deddb775 /media | |
parent | bb135a2eccec8d7c07186ac5caa267b60238c9cf (diff) | |
download | chromium_src-234a6092da0c19366cdcdad57558ec3e613da881.zip chromium_src-234a6092da0c19366cdcdad57558ec3e613da881.tar.gz chromium_src-234a6092da0c19366cdcdad57558ec3e613da881.tar.bz2 |
Update eme_player to handle SessionType changes.
BUG=442558
TEST=ECKUnprefixedEncryptedMediaTest.LoadLoadableSession and
ECKUnprefixedEncryptedMediaTest.LoadUnknownSession pass with
blink changes
Review URL: https://codereview.chromium.org/822583005
Cr-Commit-Position: refs/heads/master@{#310341}
Diffstat (limited to 'media')
-rw-r--r-- | media/test/data/eme_player_js/player_utils.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/media/test/data/eme_player_js/player_utils.js b/media/test/data/eme_player_js/player_utils.js index 520c0dd..2936592 100644 --- a/media/test/data/eme_player_js/player_utils.js +++ b/media/test/data/eme_player_js/player_utils.js @@ -58,7 +58,16 @@ PlayerUtils.registerEMEEventListeners = function(player) { try { if (player.testConfig.sessionToLoad) { Utils.timeLog('Loading session: ' + player.testConfig.sessionToLoad); - var session = message.target.mediaKeys.createSession('persistent'); + + // Temporary fix while the session type changes. + // TODO(jrummell): Remove once the blink change lands. + var session; + try { + session = message.target.mediaKeys.createSession('persistent'); + } catch (e) { + session = + message.target.mediaKeys.createSession('persistent-license'); + } addMediaKeySessionListeners(session); session.load(player.testConfig.sessionToLoad) .catch(function(error) { Utils.failTest(error, KEY_ERROR); }); |