diff --git a/lib/media/eme_manager.js b/lib/media/eme_manager.js index d475655d07..5851490c4d 100644 --- a/lib/media/eme_manager.js +++ b/lib/media/eme_manager.js @@ -339,10 +339,10 @@ shaka.media.EmeManager.prototype.buildKeySystemPromiseChain_ = function(mediaKeySystemConfigs, p) { for (var keySystem in mediaKeySystemConfigs) { var mksc = mediaKeySystemConfigs[keySystem]; - p = p.catch(function() { + p = p.catch(function(keySystem, mksc) { // If the prior promise was rejected, try the next key system in the list. return navigator.requestMediaKeySystemAccess(keySystem, [mksc]); - }); + }.bind(null, keySystem, mksc)); } if (this.videoSource_.isOffline()) { p = p.catch(function() {