shaka-player 4.8.7 → 4.8.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1939,6 +1939,16 @@ declare namespace shaka.polyfill {
1939
1939
  }
1940
1940
  }
1941
1941
  // Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js
1942
+ declare namespace shaka.polyfill {
1943
+ class PatchedMediaKeysCert {
1944
+ private noStructuralTyping_shaka_polyfill_PatchedMediaKeysCert : any;
1945
+ /**
1946
+ * Installs the polyfill if needed.
1947
+ */
1948
+ static install ( ) : any ;
1949
+ }
1950
+ }
1951
+ // Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js
1942
1952
  declare namespace shaka.polyfill {
1943
1953
  class PatchedMediaKeysNop {
1944
1954
  private noStructuralTyping_shaka_polyfill_PatchedMediaKeysNop : any;
@@ -1939,6 +1939,16 @@ declare namespace shaka.polyfill {
1939
1939
  }
1940
1940
  }
1941
1941
  // Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.debug.externs.js
1942
+ declare namespace shaka.polyfill {
1943
+ class PatchedMediaKeysCert {
1944
+ private noStructuralTyping_shaka_polyfill_PatchedMediaKeysCert : any;
1945
+ /**
1946
+ * Installs the polyfill if needed.
1947
+ */
1948
+ static install ( ) : any ;
1949
+ }
1950
+ }
1951
+ // Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.debug.externs.js
1942
1952
  declare namespace shaka.polyfill {
1943
1953
  class PatchedMediaKeysNop {
1944
1954
  private noStructuralTyping_shaka_polyfill_PatchedMediaKeysNop : any;
@@ -5197,6 +5197,16 @@ shaka.polyfill.PatchedMediaKeysApple = class {
5197
5197
  */
5198
5198
  static uninstall() {}
5199
5199
  };
5200
+ /**
5201
+ * @summary A polyfill to fix setServerCertificate implementation on
5202
+ * older platforms which claim to support modern EME.
5203
+ */
5204
+ shaka.polyfill.PatchedMediaKeysCert = class {
5205
+ /**
5206
+ * Installs the polyfill if needed.
5207
+ */
5208
+ static install() {}
5209
+ };
5200
5210
  /**
5201
5211
  * @summary A polyfill to stub out
5202
5212
  * {@link https://bit.ly/EmeMar15 EME draft 12 March 2015} on browsers without
@@ -195,10 +195,10 @@ CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SU
195
195
  CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005};goog.exportProperty(shaka.util.Error,"Code",shaka.util.Error.Code);shaka.util.Lazy=function(a){this.gen_=a;this.value_=void 0};shaka.util.Lazy.prototype.value=function(){void 0==this.value_&&(this.value_=this.gen_(),goog.asserts.assert(void 0!=this.value_,"Unable to create lazy value"));return this.value_};shaka.util.Lazy.prototype.reset=function(){this.value_=void 0};shaka.util.DelayedTick=function(a){this.onTick_=a;this.cancelPending_=null};shaka.util.DelayedTick.prototype.tickAfter=function(a){var b=this;this.stop();var c=!0,d=null;this.cancelPending_=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){if(c)b.onTick_()},1E3*a);return this};shaka.util.DelayedTick.prototype.stop=function(){this.cancelPending_&&(this.cancelPending_(),this.cancelPending_=null)};shaka.util.Timer=function(a){this.onTick_=a;this.ticker_=null};shaka.util.Timer.prototype.tickNow=function(){this.stop();this.onTick_();return this};shaka.util.Timer.prototype.tickAfter=function(a){var b=this;this.stop();this.ticker_=(new shaka.util.DelayedTick(function(){b.onTick_()})).tickAfter(a);return this};
196
196
  shaka.util.Timer.prototype.tickEvery=function(a){var b=this;this.stop();goog.DEBUG&&shaka.util.Timer.activeTimers.set(this,Error("Timer created").stack);this.ticker_=(new shaka.util.DelayedTick(function(){b.ticker_.tickAfter(a);b.onTick_()})).tickAfter(a);return this};shaka.util.Timer.prototype.stop=function(){this.ticker_&&(this.ticker_.stop(),this.ticker_=null);goog.DEBUG&&shaka.util.Timer.activeTimers.delete(this)};goog.exportSymbol("shaka.util.Timer",shaka.util.Timer);
197
197
  goog.exportProperty(shaka.util.Timer.prototype,"stop",shaka.util.Timer.prototype.stop);goog.exportProperty(shaka.util.Timer.prototype,"tickEvery",shaka.util.Timer.prototype.tickEvery);goog.exportProperty(shaka.util.Timer.prototype,"tickAfter",shaka.util.Timer.prototype.tickAfter);goog.exportProperty(shaka.util.Timer.prototype,"tickNow",shaka.util.Timer.prototype.tickNow);goog.DEBUG&&(shaka.util.Timer.activeTimers=new Map);shaka.util.Platform=function(){};shaka.util.Platform.supportsMediaSource=function(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1};shaka.util.Platform.supportsMediaType=function(a){return""!=shaka.util.Platform.anyMediaElement().canPlayType(a)};shaka.util.Platform.isEdge=function(){return navigator.userAgent.match(/Edge?\//)?!0:!1};shaka.util.Platform.isLegacyEdge=function(){return navigator.userAgent.match(/Edge\//)?!0:!1};shaka.util.Platform.isIE=function(){return shaka.util.Platform.userAgentContains_("Trident/")};
198
- shaka.util.Platform.isXboxOne=function(){return shaka.util.Platform.userAgentContains_("Xbox One")};shaka.util.Platform.isTizen=function(){return shaka.util.Platform.userAgentContains_("Tizen")};shaka.util.Platform.isTizen4=function(){return shaka.util.Platform.userAgentContains_("Tizen 4")};shaka.util.Platform.isTizen3=function(){return shaka.util.Platform.userAgentContains_("Tizen 3")};shaka.util.Platform.isTizen2=function(){return shaka.util.Platform.userAgentContains_("Tizen 2")};
199
- shaka.util.Platform.isWebOS=function(){return shaka.util.Platform.userAgentContains_("Web0S")};shaka.util.Platform.isWebOS3=function(){return shaka.util.Platform.isWebOS()&&38===shaka.util.Platform.chromeVersion()};shaka.util.Platform.isWebOS4=function(){return shaka.util.Platform.isWebOS()&&53===shaka.util.Platform.chromeVersion()};shaka.util.Platform.isWebOS5=function(){return shaka.util.Platform.isWebOS()&&68===shaka.util.Platform.chromeVersion()};shaka.util.Platform.isChromecast=function(){return shaka.util.Platform.userAgentContains_("CrKey")};
200
- shaka.util.Platform.isAndroidCastDevice=function(){var a=shaka.util.Platform;return a.isChromecast()&&a.isAndroid()};shaka.util.Platform.isFuchsiaCastDevice=function(){var a=shaka.util.Platform;return a.isChromecast()&&a.isFuchsia()};shaka.util.Platform.chromeVersion=function(){if(!shaka.util.Platform.isChrome())return null;var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null};
201
- shaka.util.Platform.isChrome=function(){return shaka.util.Platform.userAgentContains_("Chrome")&&!shaka.util.Platform.isLegacyEdge()};shaka.util.Platform.isFirefox=function(){return shaka.util.Platform.userAgentContains_("Firefox")};
198
+ shaka.util.Platform.isXboxOne=function(){return shaka.util.Platform.userAgentContains_("Xbox One")};shaka.util.Platform.isTizen=function(){return shaka.util.Platform.userAgentContains_("Tizen")};shaka.util.Platform.isTizen6=function(){return shaka.util.Platform.userAgentContains_("Tizen 6")};shaka.util.Platform.isTizen5_0=function(){return shaka.util.Platform.userAgentContains_("Tizen 5.0")};shaka.util.Platform.isTizen5=function(){return shaka.util.Platform.userAgentContains_("Tizen 5")};
199
+ shaka.util.Platform.isTizen4=function(){return shaka.util.Platform.userAgentContains_("Tizen 4")};shaka.util.Platform.isTizen3=function(){return shaka.util.Platform.userAgentContains_("Tizen 3")};shaka.util.Platform.isTizen2=function(){return shaka.util.Platform.userAgentContains_("Tizen 2")};shaka.util.Platform.isWebOS=function(){return shaka.util.Platform.userAgentContains_("Web0S")};shaka.util.Platform.isWebOS3=function(){return shaka.util.Platform.isWebOS()&&38===shaka.util.Platform.chromeVersion()};
200
+ shaka.util.Platform.isWebOS4=function(){return shaka.util.Platform.isWebOS()&&53===shaka.util.Platform.chromeVersion()};shaka.util.Platform.isWebOS5=function(){return shaka.util.Platform.isWebOS()&&68===shaka.util.Platform.chromeVersion()};shaka.util.Platform.isChromecast=function(){return shaka.util.Platform.userAgentContains_("CrKey")};shaka.util.Platform.isAndroidCastDevice=function(){var a=shaka.util.Platform;return a.isChromecast()&&a.isAndroid()};
201
+ shaka.util.Platform.isFuchsiaCastDevice=function(){var a=shaka.util.Platform;return a.isChromecast()&&a.isFuchsia()};shaka.util.Platform.chromeVersion=function(){if(!shaka.util.Platform.isChrome())return null;var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null};shaka.util.Platform.isChrome=function(){return shaka.util.Platform.userAgentContains_("Chrome")&&!shaka.util.Platform.isLegacyEdge()};shaka.util.Platform.isFirefox=function(){return shaka.util.Platform.userAgentContains_("Firefox")};
202
202
  shaka.util.Platform.isApple=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!shaka.util.Platform.isTizen()&&!shaka.util.Platform.isEOS()&&!shaka.util.Platform.isAPL()&&!shaka.util.Platform.isVirginMedia()&&!shaka.util.Platform.isOrange()&&!shaka.util.Platform.isPS4()&&!shaka.util.Platform.isAmazonFireTV()&&!shaka.util.Platform.isWPE()};shaka.util.Platform.isPS5=function(){return shaka.util.Platform.userAgentContains_("PlayStation 5")};shaka.util.Platform.isPS4=function(){return shaka.util.Platform.userAgentContains_("PlayStation 4")};
203
203
  shaka.util.Platform.isHisense=function(){return shaka.util.Platform.userAgentContains_("Hisense")||shaka.util.Platform.userAgentContains_("VIDAA")};shaka.util.Platform.isVirginMedia=function(){return shaka.util.Platform.userAgentContains_("VirginMedia")};shaka.util.Platform.isOrange=function(){return shaka.util.Platform.userAgentContains_("SOPOpenBrowser")};shaka.util.Platform.isAmazonFireTV=function(){return shaka.util.Platform.userAgentContains_("AFT")};shaka.util.Platform.isWPE=function(){return shaka.util.Platform.userAgentContains_("WPE")};
204
204
  shaka.util.Platform.safariVersion=function(){if(!shaka.util.Platform.isApple())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null};shaka.util.Platform.isSafari=function(){return!!shaka.util.Platform.safariVersion()};shaka.util.Platform.isEOS=function(){return shaka.util.Platform.userAgentContains_("PC=EOS")};shaka.util.Platform.isAPL=function(){return shaka.util.Platform.userAgentContains_("PC=APL")};
@@ -207,7 +207,7 @@ shaka.util.Platform.isWindows=function(){return navigator.userAgentData&&navigat
207
207
  shaka.util.Platform.isSmartTV=function(){var a=shaka.util.Platform;return a.isTizen()||a.isWebOS()||a.isXboxOne()||a.isPS4()||a.isPS5()||a.isAmazonFireTV()||a.isEOS()||a.isAPL()||a.isVirginMedia()||a.isOrange()||a.isWPE()||a.isChromecast()||a.isHisense()?!0:!1};shaka.util.Platform.userAgentContains_=function(a){return(navigator.userAgent||"").includes(a)};
208
208
  shaka.util.Platform.anyMediaElement=function(){var a=shaka.util.Platform;if(a.cachedMediaElement_)return a.cachedMediaElement_;a.cacheExpirationTimer_||(a.cacheExpirationTimer_=new shaka.util.Timer(function(){a.cachedMediaElement_=null}));a.cachedMediaElement_=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0];a.cachedMediaElement_||(a.cachedMediaElement_=document.createElement("video"));a.cacheExpirationTimer_.tickAfter(1);return a.cachedMediaElement_};
209
209
  shaka.util.Platform.requiresEncryptionInfoInAllInitSegments=function(){var a=shaka.util.Platform;return a.isTizen()||a.isXboxOne()||a.isOrange()};shaka.util.Platform.supportsSequenceMode=function(){var a=shaka.util.Platform;return a.isTizen3()||a.isTizen2()||a.isWebOS3()||a.isPS4()?!1:!0};
210
- shaka.util.Platform.supportsSmoothCodecSwitching=function(){var a=shaka.util.Platform;return a.isTizen2()||a.isTizen3()||a.isTizen4()||a.isWebOS3()||a.isWebOS4()||a.isWebOS5()||a.isChromecast()&&!a.isAndroidCastDevice()&&!a.isFuchsiaCastDevice()||a.isWindows()&&a.isEdge()?!1:!0};shaka.util.Platform.isMediaKeysPolyfilled=function(){return window.shakaMediaKeysPolyfill?!0:!1};
210
+ shaka.util.Platform.supportsSmoothCodecSwitching=function(){var a=shaka.util.Platform;return a.isTizen2()||a.isTizen3()||a.isTizen4()||a.isTizen5()||a.isTizen6()||a.isWebOS3()||a.isWebOS4()||a.isWebOS5()||a.isChromecast()&&!a.isAndroidCastDevice()&&!a.isFuchsiaCastDevice()||a.isWindows()&&a.isEdge()?!1:!0};shaka.util.Platform.isMediaKeysPolyfilled=function(){return window.shakaMediaKeysPolyfill?!0:!1};
211
211
  shaka.util.Platform.detectMaxHardwareResolution=function(){var a,b,c,d,e,f,g,h,k,l,m,n,p,q,r;return $jscomp.asyncExecutePromiseGeneratorProgram(function(t){switch(t.nextAddress){case 1:a=shaka.util.Platform;b={width:Infinity,height:Infinity};if(a.isChromecast()){n=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;b.width=1280;b.height=720;t.setCatchFinallyBlocks(15);if(!(p=n)){t.jumpTo(17);break}return t.yield(cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),
212
212
  18)}if(a.isTizen()){b.width=1920;b.height=1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(c=webapis.systeminfo.getMaxVideoResolution(),b.width=c.width,b.height=c.height):webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(b.width=7680,b.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(b.width=3840,b.height=2160)}catch(x){shaka.log.alwaysWarn("Tizen: Error detecting screen size, default screen size 1920x1080.")}t.jumpTo(3);
213
213
  break}if(a.isXboxOne()){d=new Windows.Media.Protection.ProtectionCapabilities;e=Windows.Media.Protection.ProtectionCapabilityResult;f=null;try{do f=d.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(f===e.maybe)}catch(x){f=e.notSupported}f===e.probably?(b.width=3840,b.height=2160):(b.width=1920,b.height=1080);
@@ -324,9 +324,9 @@ shaka.ui.Locales.addTo=function(a){a.insert("ar",new Map([["AD_DURATION","\u0645
324
324
  "\u81ea\u52d5"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e..."],["ENTER_LOOP_MODE","\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["ENTER_PICTURE_IN_PICTURE","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u87a2\u5e55\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["EXIT_PICTURE_IN_PICTURE","\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN",
325
325
  "\u5168\u87a2\u5e55"],["LANGUAGE","\u8a9e\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u74b0\u64ad\u653e"],["MORE_SETTINGS","\u986f\u793a\u66f4\u591a\u8a2d\u5b9a"],["MULTIPLE_LANGUAGES","\u591a\u7a2e\u8a9e\u8a00"],["MUTE","\u975c\u97f3"],["NOT_APPLICABLE","\u4e0d\u9069\u7528"],["OFF","\u95dc\u9589"],["ON","\u958b\u555f"],["PAUSE","\u66ab\u505c"],["PICTURE_IN_PICTURE","\u5b50\u6bcd\u756b\u9762"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["RESOLUTION","\u89e3\u6790\u5ea6"],
326
326
  ["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]))};
327
- shaka.ui.Locales.Ids={FULL_SCREEN:"FULL_SCREEN",AD_PROGRESS:"AD_PROGRESS",MULTIPLE_LANGUAGES:"MULTIPLE_LANGUAGES",SUBTITLE_FORCED:"SUBTITLE_FORCED",SURROUND:"SURROUND",PICTURE_IN_PICTURE:"PICTURE_IN_PICTURE",REWIND:"REWIND",RECENTER_VR:"RECENTER_VR",EXIT_PICTURE_IN_PICTURE:"EXIT_PICTURE_IN_PICTURE",OFF:"OFF",MORE_SETTINGS:"MORE_SETTINGS",ENTER_PICTURE_IN_PICTURE:"ENTER_PICTURE_IN_PICTURE",LIVE:"LIVE",SEEK:"SEEK",ON:"ON",ENTER_LOOP_MODE:"ENTER_LOOP_MODE",BACK:"BACK",VOLUME:"VOLUME",PLAY:"PLAY",AIRPLAY:"AIRPLAY",
328
- REPLAY:"REPLAY",UNDETERMINED_LANGUAGE:"UNDETERMINED_LANGUAGE",LANGUAGE:"LANGUAGE",FAST_FORWARD:"FAST_FORWARD",PAUSE:"PAUSE",AUTO_QUALITY:"AUTO_QUALITY",LOOP:"LOOP",SKIP_AD:"SKIP_AD",MUTE:"MUTE",UNMUTE:"UNMUTE",CAPTIONS:"CAPTIONS",SKIP_TO_LIVE:"SKIP_TO_LIVE",UNRECOGNIZED_LANGUAGE:"UNRECOGNIZED_LANGUAGE",QUALITY:"QUALITY",STATISTICS:"STATISTICS",RESOLUTION:"RESOLUTION",EXIT_LOOP_MODE:"EXIT_LOOP_MODE",TOGGLE_STEREOSCOPIC:"TOGGLE_STEREOSCOPIC",CAST:"CAST",EXIT_FULL_SCREEN:"EXIT_FULL_SCREEN",AD_DURATION:"AD_DURATION",
329
- NOT_APPLICABLE:"NOT_APPLICABLE",PLAYBACK_RATE:"PLAYBACK_RATE",AD_TIME:"AD_TIME"};shaka.abr={};shaka.abr.Ewma=function(a){goog.asserts.assert(0<a,"expected halfLife to be positive");this.alpha_=Math.exp(Math.log(.5)/a);this.totalWeight_=this.estimate_=0};shaka.abr.Ewma.prototype.updateAlpha=function(a){goog.asserts.assert(0<a,"expected halfLife to be positive");this.alpha_=Math.exp(Math.log(.5)/a)};shaka.abr.Ewma.prototype.sample=function(a,b){var c=Math.pow(this.alpha_,a);b=b*(1-c)+c*this.estimate_;isNaN(b)||(this.estimate_=b,this.totalWeight_+=a)};
327
+ shaka.ui.Locales.Ids={MULTIPLE_LANGUAGES:"MULTIPLE_LANGUAGES",RECENTER_VR:"RECENTER_VR",UNRECOGNIZED_LANGUAGE:"UNRECOGNIZED_LANGUAGE",NOT_APPLICABLE:"NOT_APPLICABLE",ENTER_LOOP_MODE:"ENTER_LOOP_MODE",ON:"ON",SUBTITLE_FORCED:"SUBTITLE_FORCED",EXIT_LOOP_MODE:"EXIT_LOOP_MODE",SURROUND:"SURROUND",PICTURE_IN_PICTURE:"PICTURE_IN_PICTURE",MORE_SETTINGS:"MORE_SETTINGS",CAPTIONS:"CAPTIONS",RESOLUTION:"RESOLUTION",OFF:"OFF",REPLAY:"REPLAY",AIRPLAY:"AIRPLAY",AD_DURATION:"AD_DURATION",LIVE:"LIVE",TOGGLE_STEREOSCOPIC:"TOGGLE_STEREOSCOPIC",
328
+ UNMUTE:"UNMUTE",CAST:"CAST",SEEK:"SEEK",FAST_FORWARD:"FAST_FORWARD",AD_TIME:"AD_TIME",ENTER_PICTURE_IN_PICTURE:"ENTER_PICTURE_IN_PICTURE",PLAYBACK_RATE:"PLAYBACK_RATE",AUTO_QUALITY:"AUTO_QUALITY",FULL_SCREEN:"FULL_SCREEN",VOLUME:"VOLUME",AD_PROGRESS:"AD_PROGRESS",SKIP_TO_LIVE:"SKIP_TO_LIVE",UNDETERMINED_LANGUAGE:"UNDETERMINED_LANGUAGE",MUTE:"MUTE",STATISTICS:"STATISTICS",LOOP:"LOOP",BACK:"BACK",SKIP_AD:"SKIP_AD",EXIT_PICTURE_IN_PICTURE:"EXIT_PICTURE_IN_PICTURE",EXIT_FULL_SCREEN:"EXIT_FULL_SCREEN",
329
+ PLAY:"PLAY",PAUSE:"PAUSE",QUALITY:"QUALITY",REWIND:"REWIND",LANGUAGE:"LANGUAGE"};shaka.abr={};shaka.abr.Ewma=function(a){goog.asserts.assert(0<a,"expected halfLife to be positive");this.alpha_=Math.exp(Math.log(.5)/a);this.totalWeight_=this.estimate_=0};shaka.abr.Ewma.prototype.updateAlpha=function(a){goog.asserts.assert(0<a,"expected halfLife to be positive");this.alpha_=Math.exp(Math.log(.5)/a)};shaka.abr.Ewma.prototype.sample=function(a,b){var c=Math.pow(this.alpha_,a);b=b*(1-c)+c*this.estimate_;isNaN(b)||(this.estimate_=b,this.totalWeight_+=a)};
330
330
  shaka.abr.Ewma.prototype.getEstimate=function(){return this.estimate_/(1-Math.pow(this.alpha_,this.totalWeight_))};shaka.abr.EwmaBandwidthEstimator=function(){this.fast_=new shaka.abr.Ewma(2);this.slow_=new shaka.abr.Ewma(5);this.bytesSampled_=0;this.minTotalBytes_=128E3;this.minBytes_=16E3};shaka.abr.EwmaBandwidthEstimator.prototype.configure=function(a){this.minTotalBytes_=a.minTotalBytes;this.minBytes_=a.minBytes;this.fast_.updateAlpha(a.fastHalfLife);this.slow_.updateAlpha(a.slowHalfLife)};
331
331
  shaka.abr.EwmaBandwidthEstimator.prototype.sample=function(a,b){if(!(b<this.minBytes_)){var c=8E3*b/a;a/=1E3;this.bytesSampled_+=b;this.fast_.sample(a,c);this.slow_.sample(a,c)}};shaka.abr.EwmaBandwidthEstimator.prototype.getBandwidthEstimate=function(a){return this.bytesSampled_<this.minTotalBytes_?a:Math.min(this.fast_.getEstimate(),this.slow_.getEstimate())};shaka.abr.EwmaBandwidthEstimator.prototype.hasGoodEstimate=function(){return this.bytesSampled_>=this.minTotalBytes_};shaka.util.EventManager=function(){this.bindingMap_=new shaka.util.MultiMap};shaka.util.EventManager.prototype.release=function(){this.removeAll();this.bindingMap_=null};shaka.util.EventManager.prototype.listen=function(a,b,c,d){this.bindingMap_&&(a=new shaka.util.EventManager.Binding_(a,b,c,d),this.bindingMap_.push(b,a))};shaka.util.EventManager.prototype.listenOnce=function(a,b,c,d){var e=this,f=function(g){e.unlisten(a,b,f);c(g)};this.listen(a,b,f,d)};
332
332
  shaka.util.EventManager.prototype.unlisten=function(a,b,c){if(this.bindingMap_){var d=this.bindingMap_.get(b)||[];d=$jscomp.makeIterator(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.unlisten(),this.bindingMap_.remove(b,e))}};shaka.util.EventManager.prototype.removeAll=function(){if(this.bindingMap_){var a=this.bindingMap_.getAll();a=$jscomp.makeIterator(a);for(var b=a.next();!b.done;b=a.next())b.value.unlisten();this.bindingMap_.clear()}};
@@ -402,7 +402,7 @@ shaka.util.StreamUtils.checkVariantSupported_=function(a,b){var c=shaka.util.Man
402
402
  l.codecs.split(",");h=e.guessCodecs(c.VIDEO,m);h=g.getCorrectVideoCodecs(h);e=e.guessCodecs(c.AUDIO,m);e=g.getCorrectAudioCodecs(e,l.mimeType);m=f.getFullOrConvertedType(l.mimeType,e,c.AUDIO);if(!d.isTypeSupported(m))return!1;h=[h,e].join()}e=f.getFullOrConvertedType(l.mimeType,h,c.VIDEO);if(!d.isTypeSupported(e))return!1;l.codecs=h}l=a.audio;if(k&&l&&l.encrypted&&l.codecs.toLowerCase().includes("opus"))return!1;if(l){g=g.getCorrectAudioCodecs(l.codecs,l.mimeType);c=f.getFullOrConvertedType(l.mimeType,
403
403
  g,c.AUDIO);if(!d.isTypeSupported(c))return!1;l.codecs=g}return a.decodingInfos.some(function(p){return!p.supported||b&&(p=p.keySystemAccess)&&p.keySystem!=b?!1:!0})};
404
404
  shaka.util.StreamUtils.alphabeticalKeyOrderStringify_=function(a){var b=[];for(c in a)b.push(c);b.sort();var c=[];b=$jscomp.makeIterator(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=JSON.stringify(e);e=a[e];e instanceof Object?(e=shaka.util.StreamUtils.alphabeticalKeyOrderStringify_(e),c.push(d+":"+e)):(e=JSON.stringify(e),c.push(d+":"+e))}return"{"+c.join(",")+"}"};
405
- shaka.util.StreamUtils.getDecodingInfosForVariant_=function(a,b){var c,d,e,f,g,h,k,l;return $jscomp.asyncExecutePromiseGeneratorProgram(function(m){if(1==m.nextAddress){c=function(n,p){if(n){var q=shaka.util.ObjectUtils.cloneObject(n);q.supported=n.supported&&p.supported;q.powerEfficient=n.powerEfficient&&p.powerEfficient;q.smooth=n.smooth&&p.smooth;p.keySystemAccess&&!q.keySystemAccess&&(q.keySystemAccess=p.keySystemAccess);return q}return p};d=shaka.util.StreamUtils;e=null;f=[];g={};h=$jscomp.makeIterator(b);
405
+ shaka.util.StreamUtils.getDecodingInfosForVariant_=function(a,b){var c,d,e,f,g,h,k,l;return $jscomp.asyncExecutePromiseGeneratorProgram(function(m){if(1==m.nextAddress){c=function(n,p){if(n){var q=shaka.util.ObjectUtils.shallowCloneObject(n);q.supported=n.supported&&p.supported;q.powerEfficient=n.powerEfficient&&p.powerEfficient;q.smooth=n.smooth&&p.smooth;p.keySystemAccess&&!q.keySystemAccess&&(q.keySystemAccess=p.keySystemAccess);return q}return p};d=shaka.util.StreamUtils;e=null;f=[];g={};h=$jscomp.makeIterator(b);
406
406
  for(k=h.next();!k.done;g={$jscomp$loop$prop$cache$917:g.$jscomp$loop$prop$cache$917,$jscomp$loop$prop$cacheKey$918:g.$jscomp$loop$prop$cacheKey$918},k=h.next())l=k.value,g.$jscomp$loop$prop$cacheKey$918=d.alphabeticalKeyOrderStringify_(l),g.$jscomp$loop$prop$cache$917=d.decodingConfigCache_,g.$jscomp$loop$prop$cache$917[g.$jscomp$loop$prop$cacheKey$918]?(shaka.log.v2("Using cached results of mediaCapabilities.decodingInfo","for key",g.$jscomp$loop$prop$cacheKey$918),e=c(e,g.$jscomp$loop$prop$cache$917[g.$jscomp$loop$prop$cacheKey$918])):
407
407
  f.push(d.checkEachDecodingConfigCombination_(l).then(function(n){return function(p){var q=null;p=$jscomp.makeIterator(p||[]);for(var r=p.next();!r.done;r=p.next())q=c(q,r.value);q&&(n.$jscomp$loop$prop$cache$917[n.$jscomp$loop$prop$cacheKey$918]=q,e=c(e,q))}}(g)));return m.yield(Promise.all(f),2)}e&&a.decodingInfos.push(e);m.jumpToEnd()})};
408
408
  shaka.util.StreamUtils.checkEachDecodingConfigCombination_=function(a){var b=[""];a.video&&(b=shaka.util.MimeUtils.getCodecs(a.video.contentType).split(","));var c=[""];a.audio&&(c=shaka.util.MimeUtils.getCodecs(a.audio.contentType).split(","));var d=[];b=$jscomp.makeIterator(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f={},g=$jscomp.makeIterator(c),h=g.next();!h.done;f={$jscomp$loop$prop$copy$920:f.$jscomp$loop$prop$copy$920},h=g.next()){h=h.value;f.$jscomp$loop$prop$copy$920=shaka.util.ObjectUtils.cloneObject(a);
@@ -896,8 +896,8 @@ shaka.media.StallDetector.MediaElementImplementation.prototype.getWallSeconds=fu
896
896
  shaka.media.GapJumpingController.prototype.release=function(){this.eventManager_&&(this.eventManager_.release(),this.eventManager_=null);null!=this.gapJumpTimer_&&(this.gapJumpTimer_.stop(),this.gapJumpTimer_=null);this.stallDetector_&&(this.stallDetector_.release(),this.stallDetector_=null);this.video_=this.timeline_=this.onEvent_=null};shaka.media.GapJumpingController.prototype.onSegmentAppended=function(){this.hadSegmentAppended_=!0;this.onPollGapJump_()};
897
897
  shaka.media.GapJumpingController.prototype.onStarted=function(a){this.video_.seeking&&!this.seekingEventReceived_&&(this.seekingEventReceived_=!0,this.startTime_=a)};shaka.media.GapJumpingController.prototype.onSeeking=function(){this.seekingEventReceived_=!0;this.hadSegmentAppended_=!1};shaka.media.GapJumpingController.prototype.getGapsJumped=function(){return this.gapsJumped_};
898
898
  shaka.media.GapJumpingController.prototype.onPollGapJump_=function(){if(0!=this.video_.readyState){if(this.video_.seeking){if(!this.seekingEventReceived_)return}else this.seekingEventReceived_=!1;if(!this.video_.paused||this.video_.currentTime==this.startTime_&&(this.video_.autoplay||this.video_.currentTime!=this.startTime_))if(this.video_.readyState!=this.prevReadyState_&&(this.prevReadyState_=this.video_.readyState),!this.stallDetector_||!this.stallDetector_.poll()){var a=this.video_.currentTime,
899
- b=this.video_.buffered,c=shaka.media.TimeRangesUtils.getGapIndex(b,a,this.config_.gapDetectionThreshold);if(null!=c&&(0!=c||this.hadSegmentAppended_)){var d=b.start(c),e=this.timeline_.getSeekRangeEnd();d>=e||(e=d-a,e<shaka.media.GapJumpingController.BROWSER_GAP_TOLERANCE||(0==c?shaka.log.info("Jumping forward",e,"seconds because of gap before start time of",d):shaka.log.info("Jumping forward",e,"seconds because of gap starting at",b.end(c-1),"and ending at",d),this.video_.currentTime=d,a==this.startTime_&&
900
- (this.startTime_=d),this.gapsJumped_++,this.onEvent_(new shaka.util.FakeEvent(shaka.util.FakeEvent.EventName.GapJumped))))}}}};shaka.media.GapJumpingController.BROWSER_GAP_TOLERANCE=.001;shaka.util.MediaReadyState=function(){};shaka.util.MediaReadyState.waitForReadyState=function(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=shaka.util.MediaReadyState.READY_STATES_TO_EVENT_NAMES_.value().get(b),c.listenOnce(a,b,d))};
899
+ b=this.video_.buffered,c=shaka.media.TimeRangesUtils.getGapIndex(b,a,this.config_.gapDetectionThreshold);if(null!=c&&(0!=c||this.hadSegmentAppended_)){var d=b.start(c);if(shaka.util.Platform.isLegacyEdge()||shaka.util.Platform.isXboxOne())d=Math.ceil(100*(d+.01))/100;var e=this.timeline_.getSeekRangeEnd();d>=e||(e=d-a,e<shaka.media.GapJumpingController.BROWSER_GAP_TOLERANCE||(0==c?shaka.log.info("Jumping forward",e,"seconds because of gap before start time of",d):shaka.log.info("Jumping forward",
900
+ e,"seconds because of gap starting at",b.end(c-1),"and ending at",d),this.video_.currentTime=d,a==this.startTime_&&(this.startTime_=d),this.gapsJumped_++,this.onEvent_(new shaka.util.FakeEvent(shaka.util.FakeEvent.EventName.GapJumped))))}}}};shaka.media.GapJumpingController.BROWSER_GAP_TOLERANCE=.001;shaka.util.MediaReadyState=function(){};shaka.util.MediaReadyState.waitForReadyState=function(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=shaka.util.MediaReadyState.READY_STATES_TO_EVENT_NAMES_.value().get(b),c.listenOnce(a,b,d))};
901
901
  shaka.util.MediaReadyState.READY_STATES_TO_EVENT_NAMES_=new shaka.util.Lazy(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});shaka.media.VideoWrapper=function(a,b,c,d){var e=this;this.video_=a;this.onSeek_=b;this.onStarted_=c;this.startTime_=null;this.getStartTime_=function(){null==e.startTime_&&(e.startTime_=d());return e.startTime_};this.started_=!1;this.eventManager_=new shaka.util.EventManager;this.mover_=new shaka.media.VideoWrapper.PlayheadMover(a,10);shaka.util.MediaReadyState.waitForReadyState(this.video_,HTMLMediaElement.HAVE_METADATA,this.eventManager_,function(){e.setStartTime_(e.getStartTime_())})};
902
902
  shaka.media.VideoWrapper.prototype.release=function(){this.eventManager_&&(this.eventManager_.release(),this.eventManager_=null);null!=this.mover_&&(this.mover_.release(),this.mover_=null);this.onSeek_=function(){};this.video_=null};shaka.media.VideoWrapper.prototype.getTime=function(){return this.started_?this.video_.currentTime:this.getStartTime_()};
903
903
  shaka.media.VideoWrapper.prototype.setTime=function(a){var b=this;0<this.video_.readyState?this.mover_.moveTo(a):shaka.util.MediaReadyState.waitForReadyState(this.video_,HTMLMediaElement.HAVE_METADATA,this.eventManager_,function(){b.setStartTime_(b.getStartTime_())})};
@@ -1113,7 +1113,7 @@ ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uu
1113
1113
  manifestPreprocessorTXml:shaka.util.PlayerConfiguration.defaultManifestPreprocessorTXml,sequenceMode:!1,enableAudioGroups:!1,multiTypeVariantsAllowed:d,useStreamOnceInPeriodFlattening:!1,updatePeriod:-1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,
1114
1114
  liveSegmentsDelay:3,sequenceMode:shaka.util.Platform.supportsSequenceMode(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:shaka.util.PlayerConfiguration.defaultManifestPreprocessor,manifestPreprocessorTXml:shaka.util.PlayerConfiguration.defaultManifestPreprocessorTXml,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};
1115
1115
  var e={retryParameters:shaka.net.NetworkingEngine.defaultRetryParameters(),failureCallback:function(k){shaka.log.error("Unhandled streaming error",k);return shaka.util.ConfigUtils.referenceParametersAndReturn([k],void 0)},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,
1116
- useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,parsePrftBox:!1,segmentPrefetchLimit:0,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:!1,liveSyncMaxLatency:1,liveSyncPlaybackRate:1.1,liveSyncMinLatency:0,liveSyncMinPlaybackRate:1,liveSyncPanicMode:!1,liveSyncPanicThreshold:60,
1116
+ useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,parsePrftBox:!1,segmentPrefetchLimit:0,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:!1,liveSyncMaxLatency:1,liveSyncPlaybackRate:1.1,liveSyncMinLatency:0,liveSyncMinPlaybackRate:.95,liveSyncPanicMode:!1,liveSyncPanicThreshold:60,
1117
1117
  allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,infiniteLiveStreamDuration:!1,loadTimeout:30};if(shaka.util.Platform.isWebOS()||shaka.util.Platform.isTizen()||shaka.util.Platform.isChromecast()||shaka.util.Platform.isHisense())e.stallSkip=0;var f={trackSelectionCallback:function(k){return $jscomp.asyncExecutePromiseGeneratorProgram(function(l){return l.return(k)})},downloadSizeCallback:function(k){var l;
1118
1118
  return $jscomp.asyncExecutePromiseGeneratorProgram(function(m){if(1==m.nextAddress)return navigator.storage&&navigator.storage.estimate?m.yield(navigator.storage.estimate(),3):m.return(!0);l=m.yieldResult;return m.return(l.usage+k<.95*l.quota)})},progressCallback:function(k,l){return shaka.util.ConfigUtils.referenceParametersAndReturn([k,l],void 0)},usePersistentLicense:!0,numberOfParallelDownloads:5};a={enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,
1119
1119
  bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0};c={codecSwitchingStrategy:c,addExtraFeaturesToSourceBuffer:function(k){return shaka.util.ConfigUtils.referenceParametersAndReturn([k],
@@ -1304,8 +1304,8 @@ d.loadMode_=shaka.Player.LoadMode.MEDIA_SOURCE;e.textTracks&&d.loadEventManager_
1304
1304
  $jscomp.makeIterator([m.video,m.audio]);for(p=n.next();!p.done;p=n.next())(q=p.value)&&!q.segmentIndex&&l.push(q.createSegmentIndex());if(!(0<l.length)){D.jumpTo(2);break}return D.yield(Promise.all(l),2);case 2:if(d.parser_&&d.parser_.onInitialVariantChosen)d.parser_.onInitialVariantChosen(m);shaka.Player.applyPlayRange_(d.manifest_.presentationTimeline,d.config_.playRangeStart,d.config_.playRangeEnd);r=function(E){d.playhead_=d.createPlayhead(E);d.playheadObservers_=d.createPlayheadObserversForMSE_(a);
1305
1305
  d.startBufferManagement_(e,Math.max(d.manifest_.minBufferTime,d.config_.streaming.rebufferingGoal))};d.config_.streaming.startAtSegmentBoundary||r(d.startTime_);if(k){D.jumpTo(4);break}goog.asserts.assert(h,"Must have choosen an initial variant!");if(!d.config_.streaming.startAtSegmentBoundary){D.jumpTo(5);break}t=d.manifest_.presentationTimeline;x=d.startTime_||d.video_.currentTime;w=t.getSeekRangeStart();u=t.getSeekRangeEnd();x<w?x=w:x>u&&(x=u);return D.yield(d.adjustStartTime_(h,x),6);case 6:y=
1306
1306
  D.yieldResult,r(y);case 5:d.switchVariant_(h,!0,!1,0);case 4:return d.playhead_.ready(),v=d.getTextTracks().find(function(E){return E.active}),v||((z=d.chooseTextStream_())&&d.addTextStreamToSwitchHistory_(z,!0),h&&d.setInitialTextState_(h,z),z&&d.shouldStreamText_()&&d.streamingEngine_.switchTextStream(z)),D.yield(d.streamingEngine_.start(c),7);case 7:d.config_.abr.enabled&&(d.abrManager_.enable(),d.onAbrStatusChanged_());d.onTracksChanged_();d.updateAbrManagerVariants_();A=d.manifest_.variants.some(function(E){return E.primary});
1307
- d.config_.preferredAudioLanguage||A||shaka.log.warning("No preferred audio language set. We have chosen an arbitrary language initially");(B=d.isLive())&&(d.config_.streaming.liveSync||d.manifest_.serviceDescription||d.config_.streaming.liveSyncPanicMode)||d.config_.streaming.vodDynamicPlaybackRate?(C=function(){return d.onTimeUpdate_()},d.loadEventManager_.listen(e,"timeupdate",C)):B||(G=function(){return d.onVideoProgress_()},d.loadEventManager_.listen(e,"timeupdate",G),d.onVideoProgress_());if(d.adManager_)d.adManager_.onManifestUpdated(B);
1308
- d.fullyLoaded_=!0;d.loadEventManager_.listenOnce(e,"loadedmetadata",function(){var E=Date.now()/1E3-a;d.stats_.setLoadLatency(E)});D.jumpToEnd()}})};
1307
+ d.config_.preferredAudioLanguage||A||shaka.log.warning("No preferred audio language set. We have chosen an arbitrary language initially");if((B=d.isLive())&&(d.config_.streaming.liveSync||d.manifest_.serviceDescription||d.config_.streaming.liveSyncPanicMode)||d.config_.streaming.vodDynamicPlaybackRate)C=function(){return d.onTimeUpdate_()},d.loadEventManager_.listen(e,"timeupdate",C);B||(G=function(){return d.onVideoProgress_()},d.loadEventManager_.listen(e,"timeupdate",G),d.onVideoProgress_());
1308
+ if(d.adManager_)d.adManager_.onManifestUpdated(B);d.fullyLoaded_=!0;d.loadEventManager_.listenOnce(e,"loadedmetadata",function(){var E=Date.now()/1E3-a;d.stats_.setLoadLatency(E)});D.jumpToEnd()}})};
1309
1309
  shaka.Player.prototype.initializeSrcEqualsDrmInner_=function(a){var b=this,c,d,e,f,g;return $jscomp.asyncExecutePromiseGeneratorProgram(function(h){return 1==h.nextAddress?(c=shaka.util.ManifestParserUtils.ContentType,goog.asserts.assert(b.networkingEngine_,"|onInitializeSrcEqualsDrm_| should never be called after |destroy|"),goog.asserts.assert(b.config_,"|onInitializeSrcEqualsDrm_| should never be called after |destroy|"),d=Date.now()/1E3,e=!0,b.drmEngine_=b.createDrmEngine({netEngine:b.networkingEngine_,
1310
1310
  onError:function(k){b.onError_(k)},onKeyStatus:function(k){},onExpirationUpdated:function(k,l){k=shaka.Player.makeEvent_(shaka.util.FakeEvent.EventName.ExpirationUpdated);b.dispatchEvent(k)},onEvent:function(k){b.dispatchEvent(k);k.type==shaka.util.FakeEvent.EventName.DrmSessionUpdate&&e&&(e=!1,k=Date.now()/1E3-d,b.stats_.setDrmTime(k))}}),b.drmEngine_.configure(b.config_.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,
1311
1311
  decodingInfos:[]},g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:a?shaka.util.MimeUtils.getBasicType(a):"",codecs:a?shaka.util.MimeUtils.getCodecs(a):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.VIDEO,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,
@@ -1317,7 +1317,7 @@ c.playRateController_=new shaka.media.PlayRateController({getRate:function(){ret
1317
1317
  shaka.util.Platform.isWebOS())&&d.load(),"none"!=d.preload&&!d.autoplay&&shaka.util.MimeUtils.isHlsType(b)&&shaka.util.Platform.safariVersion()&&d.load(),c.loadMode_=shaka.Player.LoadMode.SRC_EQUALS,c.dispatchEvent(shaka.Player.makeEvent_(shaka.util.FakeEvent.EventName.Streaming)),k=new shaka.util.PublicPromise,shaka.util.MediaReadyState.waitForReadyState(d,HTMLMediaElement.HAVE_METADATA,c.loadEventManager_,function(){c.playhead_.ready();k.resolve()}),shaka.util.MediaReadyState.waitForReadyState(d,
1318
1318
  HTMLMediaElement.HAVE_CURRENT_DATA,c.loadEventManager_,function(){var t;return $jscomp.asyncExecutePromiseGeneratorProgram(function(x){if(1==x.nextAddress)return c.setupPreferredAudioOnSrc_(),t=c.getFilteredTextTracks_(),t.find(function(w){return"disabled"!=w.mode})?(0<t.length&&(c.isTextVisible_=!0),x.jumpTo(2)):x.yield(new Promise(function(w){c.loadEventManager_.listenOnce(d.textTracks,"change",w);(new shaka.util.Timer(w)).tickAfter(1)}),2);if(e)return x.return();c.setupPreferredTextOnSrc_();x.jumpToEnd()})}),
1319
1319
  d.error?k.reject(c.videoErrorToShakaError_()):"none"==d.preload&&(shaka.log.alwaysWarn('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),k.resolve()),c.loadEventManager_.listenOnce(d,"error",function(){k.reject(c.videoErrorToShakaError_())}),l=new Promise(function(t,x){(new shaka.util.Timer(x)).tickAfter(c.config_.streaming.loadTimeout)}),
1320
- r.yield(Promise.race([k,l]),2);(m=c.isLive())&&(c.config_.streaming.liveSync||c.config_.streaming.liveSyncPanicMode)||c.config_.streaming.vodDynamicPlaybackRate?(n=function(){return c.onTimeUpdate_()},c.loadEventManager_.listen(d,"timeupdate",n)):m||(p=function(){return c.onVideoProgress_()},c.loadEventManager_.listen(d,"timeupdate",p),c.onVideoProgress_());c.adManager_&&(c.adManager_.onManifestUpdated(m),m&&(q=c.seekRange().end,c.loadEventManager_.listen(d,"progress",function(){var t=c.seekRange().end;
1320
+ r.yield(Promise.race([k,l]),2);if((m=c.isLive())&&(c.config_.streaming.liveSync||c.config_.streaming.liveSyncPanicMode)||c.config_.streaming.vodDynamicPlaybackRate)n=function(){return c.onTimeUpdate_()},c.loadEventManager_.listen(d,"timeupdate",n);m||(p=function(){return c.onVideoProgress_()},c.loadEventManager_.listen(d,"timeupdate",p),c.onVideoProgress_());c.adManager_&&(c.adManager_.onManifestUpdated(m),m&&(q=c.seekRange().end,c.loadEventManager_.listen(d,"progress",function(){var t=c.seekRange().end;
1321
1321
  q!=t&&(c.adManager_.onManifestUpdated(c.isLive()),q=t)})));c.fullyLoaded_=!0;r.jumpToEnd()})};shaka.Player.prototype.setupPreferredAudioOnSrc_=function(){var a=this.config_.preferredAudioLanguage;""!=a&&this.selectAudioLanguage(a,this.config_.preferredVariantRole)};shaka.Player.prototype.setupPreferredTextOnSrc_=function(){var a=this.config_.preferredTextLanguage;""!=a&&this.selectTextLanguage(a,this.config_.preferredTextRole,this.config_.preferForcedSubs)};
1322
1322
  shaka.Player.prototype.processTimedMetadataSrcEqls_=function(a){var b=this;if("metadata"==a.kind){a.mode="hidden";this.loadEventManager_.listen(a,"cuechange",function(){if(a.activeCues)for(var d=$jscomp.makeIterator(a.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,b.dispatchMetadataEvent_(e.startTime,e.endTime,e.type,e.value),b.adManager_)b.adManager_.onCueMetadataChange(e.value)});var c=(new shaka.util.Timer(function(){var d=b.getMetadataTracks_();d=$jscomp.makeIterator(d);for(var e=d.next();!e.done;e=
1323
1323
  d.next())e.value.mode="hidden"})).tickNow().tickAfter(.5);this.cleanupOnUnload_.push(function(){c.stop()})}};shaka.Player.prototype.processTimedMetadataMediaSrc_=function(a,b,c){a=$jscomp.makeIterator(a);for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.data&&d.cueTime&&d.frames){var e=d.cueTime+b,f=c;f&&e>f&&(f=e);for(var g=$jscomp.makeIterator(d.frames),h=g.next();!h.done;h=g.next())this.dispatchMetadataEvent_(e,f,"org.id3",h.value);if(this.adManager_)this.adManager_.onHlsTimedMetadata(d,e)}};
@@ -1450,7 +1450,7 @@ shaka.Player.prototype.setInitialTextState_=function(a,b){b?(a.audio&&this.shoul
1450
1450
  shaka.Player.prototype.shouldInitiallyShowText_=function(a,b){var c=shaka.config.AutoShowText;if(this.config_.autoShowText==c.NEVER)return!1;if(this.config_.autoShowText==c.ALWAYS)return!0;var d=shaka.util.LanguageUtils,e=d.normalize(this.config_.preferredTextLanguage);b=d.normalize(b.language);if(this.config_.autoShowText==c.IF_PREFERRED_TEXT_LANGUAGE)return d.areLanguageCompatible(b,e);if(this.config_.autoShowText==c.IF_SUBTITLES_MAY_BE_NEEDED)return a=d.normalize(a.language),d.areLanguageCompatible(b,
1451
1451
  e)&&!d.areLanguageCompatible(a,b);shaka.log.alwaysWarn("Invalid autoShowText setting!");return!1};shaka.Player.prototype.onManifestUpdate_=function(){this.parser_&&this.parser_.update&&this.parser_.update()};
1452
1452
  shaka.Player.prototype.onSegmentAppended_=function(a,b,c){if(this.playhead_){this.playhead_.notifyOfBufferingChange();var d=this.mediaSourceEngine_.bufferStart(c);!this.isLive()&&this.video_.paused&&null!=d&&0<d&&this.playhead_.getTime()<d&&this.playhead_.setStartTime(d)}this.pollBufferState_();a=(new Map).set("start",a).set("end",b).set("contentType",c);this.dispatchEvent(shaka.Player.makeEvent_(shaka.util.FakeEvent.EventName.SegmentAppended,a))};
1453
- shaka.Player.prototype.switch_=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;shaka.log.debug("switch_");goog.asserts.assert(this.config_.abr.enabled,"AbrManager should not call switch while disabled!");goog.asserts.assert(this.manifest_,"We need a manifest to switch variants.");this.streamingEngine_&&a!=this.streamingEngine_.getCurrentVariant()&&this.switchVariant_(a,!0,b,c)};
1453
+ shaka.Player.prototype.switch_=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;shaka.log.debug("switch_");goog.asserts.assert(this.config_.abr.enabled,"AbrManager should not call switch while disabled!");this.manifest_&&this.streamingEngine_&&a!=this.streamingEngine_.getCurrentVariant()&&this.switchVariant_(a,!0,b,c)};
1454
1454
  shaka.Player.prototype.onAdaptation_=function(a,b){a=(new Map).set("oldTrack",a).set("newTrack",b);this.lcevcDec_&&this.lcevcDec_.updateVariant(b,this.getManifestType());b=shaka.Player.makeEvent_(shaka.util.FakeEvent.EventName.Adaptation,a);this.delayDispatchEvent_(b)};shaka.Player.prototype.onTracksChanged_=function(){var a=shaka.Player.makeEvent_(shaka.util.FakeEvent.EventName.TracksChanged);this.delayDispatchEvent_(a)};
1455
1455
  shaka.Player.prototype.onVariantChanged_=function(a,b){a=(new Map).set("oldTrack",a).set("newTrack",b);this.lcevcDec_&&this.lcevcDec_.updateVariant(b,this.getManifestType());b=shaka.Player.makeEvent_(shaka.util.FakeEvent.EventName.VariantChanged,a);this.delayDispatchEvent_(b)};shaka.Player.prototype.onTextChanged_=function(){var a=shaka.Player.makeEvent_(shaka.util.FakeEvent.EventName.TextChanged);this.delayDispatchEvent_(a)};
1456
1456
  shaka.Player.prototype.onTextTrackVisibility_=function(){var a=shaka.Player.makeEvent_(shaka.util.FakeEvent.EventName.TextTrackVisibility);this.delayDispatchEvent_(a)};shaka.Player.prototype.onAbrStatusChanged_=function(){this.config_.abr.enabled||this.restoreDisabledVariants_();var a=(new Map).set("newStatus",this.config_.abr.enabled);this.delayDispatchEvent_(shaka.Player.makeEvent_(shaka.util.FakeEvent.EventName.AbrStatusChanged,a))};
@@ -1486,7 +1486,7 @@ goog.exportProperty(shaka.Player.prototype,"getAssetUri",shaka.Player.prototype.
1486
1486
  goog.exportProperty(shaka.Player.prototype,"resetConfiguration",shaka.Player.prototype.resetConfiguration);goog.exportProperty(shaka.Player.prototype,"getBufferFullness",shaka.Player.prototype.getBufferFullness);goog.exportProperty(shaka.Player.prototype,"getConfiguration",shaka.Player.prototype.getConfiguration);goog.exportProperty(shaka.Player.prototype,"configure",shaka.Player.prototype.configure);goog.exportProperty(shaka.Player.prototype,"releaseAllMutexes",shaka.Player.prototype.releaseAllMutexes);
1487
1487
  goog.exportProperty(shaka.Player.prototype,"preload",shaka.Player.prototype.preload);goog.exportProperty(shaka.Player.prototype,"unloadAndSavePreload",shaka.Player.prototype.unloadAndSavePreload);goog.exportProperty(shaka.Player.prototype,"load",shaka.Player.prototype.load);goog.exportProperty(shaka.Player.prototype,"updateStartTime",shaka.Player.prototype.updateStartTime);goog.exportProperty(shaka.Player.prototype,"unload",shaka.Player.prototype.unload);
1488
1488
  goog.exportProperty(shaka.Player.prototype,"detach",shaka.Player.prototype.detach);goog.exportProperty(shaka.Player.prototype,"attachCanvas",shaka.Player.prototype.attachCanvas);goog.exportProperty(shaka.Player.prototype,"attach",shaka.Player.prototype.attach);goog.exportProperty(shaka.Player,"probeSupport",shaka.Player.probeSupport);goog.exportProperty(shaka.Player,"isBrowserSupported",shaka.Player.isBrowserSupported);goog.exportProperty(shaka.Player,"setAdManagerFactory",shaka.Player.setAdManagerFactory);
1489
- goog.exportProperty(shaka.Player,"registerSupportPlugin",shaka.Player.registerSupportPlugin);goog.exportProperty(shaka.Player.prototype,"destroy",shaka.Player.prototype.destroy);shaka.Player.LoadMode={DESTROYED:0,NOT_LOADED:1,MEDIA_SOURCE:2,SRC_EQUALS:3};goog.exportProperty(shaka.Player,"LoadMode",shaka.Player.LoadMode);shaka.Player.TYPICAL_BUFFERING_THRESHOLD_=.5;shaka.Player.version="v4.8.7-debug";goog.exportProperty(shaka.Player,"version",shaka.Player.version);shaka.Deprecate.init(shaka.Player.version);
1489
+ goog.exportProperty(shaka.Player,"registerSupportPlugin",shaka.Player.registerSupportPlugin);goog.exportProperty(shaka.Player.prototype,"destroy",shaka.Player.prototype.destroy);shaka.Player.LoadMode={DESTROYED:0,NOT_LOADED:1,MEDIA_SOURCE:2,SRC_EQUALS:3};goog.exportProperty(shaka.Player,"LoadMode",shaka.Player.LoadMode);shaka.Player.TYPICAL_BUFFERING_THRESHOLD_=.5;shaka.Player.version="v4.8.8-debug";goog.exportProperty(shaka.Player,"version",shaka.Player.version);shaka.Deprecate.init(shaka.Player.version);
1490
1490
  shaka.Player.supportPlugins_={};shaka.Player.adManagerFactory_=null;shaka.Player.TextTrackLabel="Shaka Player TextTrack";shaka.ads={};shaka.ads.AdsStats=function(){this.loadTimes_=[];this.skipped_=this.playedCompletely_=this.started_=0};shaka.ads.AdsStats.prototype.addLoadTime=function(a){this.loadTimes_.push(a)};shaka.ads.AdsStats.prototype.incrementStarted=function(){this.started_++};shaka.ads.AdsStats.prototype.incrementPlayedCompletely=function(){this.playedCompletely_++};shaka.ads.AdsStats.prototype.incrementSkipped=function(){this.skipped_++};
1491
1491
  shaka.ads.AdsStats.prototype.getBlob=function(){return{loadTimes:this.loadTimes_,started:this.started_,playedCompletely:this.playedCompletely_,skipped:this.skipped_}};shaka.ads.ClientSideAd=function(a,b,c){var d=this;this.ad_=a;this.manager_=b;this.video_=c;this.isPaused_=!1;this.volume_=this.manager_.getVolume();this.eventManager_=new shaka.util.EventManager;this.eventManager_.listen(this.manager_,google.ima.AdEvent.Type.PAUSED,function(){d.isPaused_=!0});this.eventManager_.listen(this.manager_,google.ima.AdEvent.Type.RESUMED,function(){d.isPaused_=!1})};shaka.ads.ClientSideAd.prototype.getDuration=function(){return this.ad_.getDuration()};
1492
1492
  shaka.ads.ClientSideAd.prototype.getMinSuggestedDuration=function(){return this.ad_.getMinSuggestedDuration()};shaka.ads.ClientSideAd.prototype.getRemainingTime=function(){return this.manager_.getRemainingTime()};shaka.ads.ClientSideAd.prototype.isPaused=function(){return this.isPaused_};shaka.ads.ClientSideAd.prototype.isSkippable=function(){return 0<=this.ad_.getSkipTimeOffset()};
@@ -1909,8 +1909,8 @@ shaka.dash.SegmentTemplate.generateSegmentIndexFromIndexTemplate_=function(a,b,c
1909
1909
  shaka.dash.SegmentTemplate.generateSegmentIndexFromDuration_=function(a,b,c,d,e,f,g){goog.asserts.assert(b.mediaTemplate,"There should be a media template with duration");var h=shaka.dash.MpdUtils,k=shaka.util.ManifestParserUtils,l=a.presentationTimeline,m=a.periodInfo.start,n=a.period.id,p=a.periodInfo.duration,q=function(){var F=null!=n&&e[n]||p;return F?m+F:Infinity},r=b.segmentDuration;goog.asserts.assert(null!=r,"Segment duration must not be null!");var t=b.startNumber,x=b.timescale,w=b.mediaTemplate,
1910
1910
  u=a.bandwidth||null,y=a.representation.id,v=a.representation.getBaseUris,z=m-b.scaledPresentationTimeOffset,A=function(){var F=[Math.max(l.getSegmentAvailabilityStart(),m),Math.min(l.getSegmentAvailabilityEnd(),q())];goog.asserts.assert(F.every(isFinite),"Available presentation times must be finite!");goog.asserts.assert(F.every(function(I){return 0<=I}),"Available presentation times must be positive!");goog.asserts.assert(null!=r,"Segment duration must not be null!");F=F.map(function(I){return I-
1911
1911
  m});F=[Math.ceil(F[0]/r),Math.ceil(F[1]/r)-1];a.representation.availabilityTimeOffset&&F[1]++;return F.map(function(I){return I+t})},B=A();c=a.dynamic?Math.max(B[0],B[1]-c+1):B[0];g=g||B[1];B=[];var C=function(F){goog.asserts.assert(null!=r,"Segment duration must not be null!");var I=(F-t)*r,K=I+b.scaledPresentationTimeOffset,J=I+m;I=J+r;var M=Math.min(I,q());goog.asserts.assert(J<M,"Generated a segment outside of the period!");J=new shaka.media.SegmentReference(J,M,function(){var L=K*x;"BigInt"in
1912
- window&&L>Number.MAX_SAFE_INTEGER&&(L=BigInt(K)*BigInt(x));L=h.fillUriTemplate(w,y,F,null,u,L);return k.resolveUris(v(),[L])},0,null,d,z,m,q(),[],"",null,null,shaka.media.SegmentReference.Status.AVAILABLE,f);J.codecs=a.representation.codecs;J.mimeType=a.representation.mimeType;J.trueEndTime=I;return J},G=c;for(;G<=g;++G){var D=C(G);B.push(D)}var E=new shaka.media.SegmentIndex(B);B=l.getSegmentAvailabilityEnd()<q();G=l.isLive();if(B||G){var H=Math.max(c,g+1);E.updateEvery(r,function(){var F=l.getSegmentAvailabilityStart();
1913
- E.evict(F);var I=$jscomp.makeIterator(A());I.next();I=I.next().value;for(var K=[];H<=I;){var J=C(H);K.push(J);H++}return F>q()&&!K.length?null:K})}return Promise.resolve(E)};
1912
+ window&&L>Number.MAX_SAFE_INTEGER&&(L=BigInt(K)*BigInt(x));L=h.fillUriTemplate(w,y,F,null,u,L);return k.resolveUris(v(),[L])},0,null,d,z,m,q(),[],"",null,null,shaka.media.SegmentReference.Status.AVAILABLE,f);J.codecs=a.representation.codecs;J.mimeType=a.representation.mimeType;J.trueEndTime=I;return J},G=c;for(;G<=g;++G){var D=C(G);B.push(D)}var E=new shaka.media.SegmentIndex(B);B=l.getSegmentAvailabilityEnd()<q();G=l.isLive();if(B||G){var H=Math.max(c,g+1);c=r;a.representation.availabilityTimeOffset&&
1913
+ (c=.1);E.updateEvery(c,function(){var F=l.getSegmentAvailabilityStart();E.evict(F);var I=$jscomp.makeIterator(A());I.next();I=I.next().value;for(var K=[];H<=I;){var J=C(H);K.push(J);H++}return F>q()&&!K.length?null:K})}return Promise.resolve(E)};
1914
1914
  shaka.dash.SegmentTemplate.createInitSegment_=function(a,b){var c=shaka.dash.MpdUtils,d=shaka.util.ManifestParserUtils,e=c.inheritAttribute(a,shaka.dash.SegmentTemplate.fromInheritance_,"initialization");if(!e)return null;e=shaka.util.StringUtils.htmlUnescape(e);var f=a.representation.id,g=a.bandwidth||null,h=a.representation.getBaseUris,k=shaka.dash.SegmentBase.createQualityInfo(a);b=new shaka.media.InitSegmentReference(function(){goog.asserts.assert(e,"Should have returned earler");var l=c.fillUriTemplate(e,
1915
1915
  f,null,null,g,null);return d.resolveUris(h(),[l])},0,null,k,null,null,b);b.codecs=a.representation.codecs;b.mimeType=a.representation.mimeType;return b};shaka.dash.TimelineSegmentIndex=function(a,b,c,d,e,f,g,h,k,l){shaka.media.SegmentIndex.call(this,[]);this.templateInfo_=a;this.representationId_=b;this.bandwidth_=c;this.getBaseUris_=d;this.periodStart_=e;this.periodEnd_=f;this.initSegmentReference_=g;this.aesKey_=k;this.segmentSequenceCadence_=l;h&&this.fitTimeline()};
1916
1916
  $jscomp.inherits(shaka.dash.TimelineSegmentIndex,shaka.media.SegmentIndex);shaka.dash.TimelineSegmentIndex.prototype.getNumReferences=function(){return this.templateInfo_?this.templateInfo_.timeline.length:0};shaka.dash.TimelineSegmentIndex.prototype.release=function(){shaka.media.SegmentIndex.prototype.release.call(this);this.templateInfo_=null};
@@ -2575,7 +2575,9 @@ shaka.polyfill.PatchedMediaKeysApple.MediaKeySession.prototype.onWebkitKeyError_
2575
2575
  break;default:this.updateKeyStatus_("internal-error")}};shaka.polyfill.PatchedMediaKeysApple.MediaKeySession.prototype.updateKeyStatus_=function(a){this.keyStatuses.setStatus(a);a=new shaka.util.FakeEvent("keystatuseschange");this.dispatchEvent(a)};shaka.polyfill.PatchedMediaKeysApple.MediaKeyStatusMap=function(){this.size=0;this.status_=void 0};shaka.polyfill.PatchedMediaKeysApple.MediaKeyStatusMap.prototype.setStatus=function(a){this.size=void 0==a?0:1;this.status_=a};
2576
2576
  shaka.polyfill.PatchedMediaKeysApple.MediaKeyStatusMap.prototype.getStatus=function(){return this.status_};shaka.polyfill.PatchedMediaKeysApple.MediaKeyStatusMap.prototype.forEach=function(a){this.status_&&a(this.status_,shaka.media.DrmEngine.DUMMY_KEY_ID.value())};shaka.polyfill.PatchedMediaKeysApple.MediaKeyStatusMap.prototype.get=function(a){if(this.has(a))return this.status_};
2577
2577
  shaka.polyfill.PatchedMediaKeysApple.MediaKeyStatusMap.prototype.has=function(a){var b=shaka.media.DrmEngine.DUMMY_KEY_ID.value();return this.status_&&shaka.util.BufferUtils.equal(a,b)?!0:!1};shaka.polyfill.PatchedMediaKeysApple.MediaKeyStatusMap.prototype.entries=function(){goog.asserts.assert(!1,"Not used! Provided only for the compiler.")};shaka.polyfill.PatchedMediaKeysApple.MediaKeyStatusMap.prototype.keys=function(){goog.asserts.assert(!1,"Not used! Provided only for the compiler.")};
2578
- shaka.polyfill.PatchedMediaKeysApple.MediaKeyStatusMap.prototype.values=function(){goog.asserts.assert(!1,"Not used! Provided only for the compiler.")};shaka.polyfill.PatchedMediaKeysNop=function(){};
2578
+ shaka.polyfill.PatchedMediaKeysApple.MediaKeyStatusMap.prototype.values=function(){goog.asserts.assert(!1,"Not used! Provided only for the compiler.")};shaka.polyfill.PatchedMediaKeysCert=function(){};shaka.polyfill.PatchedMediaKeysCert.install=function(){!window.MediaKeys||MediaKeys.prototype.setServerCertificate&&!shaka.polyfill.PatchedMediaKeysCert.hasInvalidImplementation_()||(shaka.log.info("Patching MediaKeys.setServerCertificate"),MediaKeys.prototype.setServerCertificate=shaka.polyfill.PatchedMediaKeysCert.setServerCertificate_)};
2579
+ shaka.polyfill.PatchedMediaKeysCert.setServerCertificate_=function(a){shaka.log.debug("PatchedMediaKeysCert.setServerCertificate");return Promise.resolve(!1)};shaka.polyfill.PatchedMediaKeysCert.hasInvalidImplementation_=function(){return shaka.util.Platform.isTizen3()||shaka.util.Platform.isTizen4()||shaka.util.Platform.isTizen5_0()||shaka.util.Platform.isWebOS3()};goog.exportProperty(shaka.polyfill,"PatchedMediaKeysCert",shaka.polyfill.PatchedMediaKeysCert);
2580
+ goog.exportProperty(shaka.polyfill.PatchedMediaKeysCert,"install",shaka.polyfill.PatchedMediaKeysCert.install);shaka.polyfill.register(shaka.polyfill.PatchedMediaKeysCert.install);shaka.polyfill.PatchedMediaKeysNop=function(){};
2579
2581
  shaka.polyfill.PatchedMediaKeysNop.install=function(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){shaka.log.info("EME not available.");var a=shaka.polyfill.PatchedMediaKeysNop;navigator.requestMediaKeySystemAccess=a.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=a.setMediaKeys;window.MediaKeys=a.MediaKeys;window.MediaKeySystemAccess=
2580
2582
  a.MediaKeySystemAccess;window.shakaMediaKeysPolyfill=!0}};shaka.polyfill.PatchedMediaKeysNop.requestMediaKeySystemAccess=function(a,b){shaka.log.debug("PatchedMediaKeysNop.requestMediaKeySystemAccess");goog.asserts.assert(this==navigator,'bad "this" for requestMediaKeySystemAccess');return Promise.reject(Error("The key system specified is not supported."))};
2581
2583
  shaka.polyfill.PatchedMediaKeysNop.setMediaKeys=function(a){shaka.log.debug("PatchedMediaKeysNop.setMediaKeys");goog.asserts.assert(this instanceof HTMLMediaElement,'bad "this" for setMediaKeys');return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))};goog.exportProperty(shaka.polyfill,"PatchedMediaKeysNop",shaka.polyfill.PatchedMediaKeysNop);goog.exportProperty(shaka.polyfill.PatchedMediaKeysNop,"install",shaka.polyfill.PatchedMediaKeysNop.install);