shaka-player 4.8.12 → 4.8.13

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.
@@ -4881,7 +4881,7 @@ declare namespace msdk.device {
4881
4881
  }
4882
4882
  // Generated from /home/runner/work/shaka-player/shaka-player/externs/polyfill.js
4883
4883
  declare namespace window {
4884
- let shakaMediaKeysPolyfill : boolean ;
4884
+ let shakaMediaKeysPolyfill : string ;
4885
4885
  }
4886
4886
  // Generated from /home/runner/work/shaka-player/shaka-player/externs/prefixed_eme.js
4887
4887
  declare namespace ಠ_ಠ.clutz {
@@ -4881,7 +4881,7 @@ declare namespace msdk.device {
4881
4881
  }
4882
4882
  // Generated from /home/runner/work/shaka-player/shaka-player/externs/polyfill.js
4883
4883
  declare namespace window {
4884
- let shakaMediaKeysPolyfill : boolean ;
4884
+ let shakaMediaKeysPolyfill : string ;
4885
4885
  }
4886
4886
  // Generated from /home/runner/work/shaka-player/shaka-player/externs/prefixed_eme.js
4887
4887
  declare namespace ಠ_ಠ.clutz {
@@ -207,7 +207,7 @@ shaka.util.Platform.isMac=function(){return navigator.userAgentData&&navigator.u
207
207
  shaka.util.Platform.isFuchsia=function(){return shaka.util.Platform.userAgentContains_("Fuchsia")};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()||a.isZenterio()?!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.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};
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(a){return a?a===window.shakaMediaKeysPolyfill:!!window.shakaMediaKeysPolyfill};
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={VOLUME:"VOLUME",PAUSE:"PAUSE",EXIT_FULL_SCREEN:"EXIT_FULL_SCREEN",SUBTITLE_FORCED:"SUBTITLE_FORCED",QUALITY:"QUALITY",LANGUAGE:"LANGUAGE",FULL_SCREEN:"FULL_SCREEN",BACK:"BACK",EXIT_PICTURE_IN_PICTURE:"EXIT_PICTURE_IN_PICTURE",PLAYBACK_RATE:"PLAYBACK_RATE",CAPTIONS:"CAPTIONS",RESOLUTION:"RESOLUTION",FAST_FORWARD:"FAST_FORWARD",AD_PROGRESS:"AD_PROGRESS",REPLAY:"REPLAY",MUTE:"MUTE",STATISTICS:"STATISTICS",EXIT_LOOP_MODE:"EXIT_LOOP_MODE",OFF:"OFF",UNDETERMINED_LANGUAGE:"UNDETERMINED_LANGUAGE",
328
- LIVE:"LIVE",RECENTER_VR:"RECENTER_VR",TOGGLE_STEREOSCOPIC:"TOGGLE_STEREOSCOPIC",AD_TIME:"AD_TIME",CAST:"CAST",SEEK:"SEEK",AD_DURATION:"AD_DURATION",PICTURE_IN_PICTURE:"PICTURE_IN_PICTURE",ENTER_LOOP_MODE:"ENTER_LOOP_MODE",SKIP_AD:"SKIP_AD",SURROUND:"SURROUND",PLAY:"PLAY",MULTIPLE_LANGUAGES:"MULTIPLE_LANGUAGES",ON:"ON",SKIP_TO_LIVE:"SKIP_TO_LIVE",UNMUTE:"UNMUTE",MORE_SETTINGS:"MORE_SETTINGS",REWIND:"REWIND",AIRPLAY:"AIRPLAY",UNRECOGNIZED_LANGUAGE:"UNRECOGNIZED_LANGUAGE",ENTER_PICTURE_IN_PICTURE:"ENTER_PICTURE_IN_PICTURE",
329
- NOT_APPLICABLE:"NOT_APPLICABLE",LOOP:"LOOP",AUTO_QUALITY:"AUTO_QUALITY"};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={SURROUND:"SURROUND",LIVE:"LIVE",SKIP_TO_LIVE:"SKIP_TO_LIVE",MORE_SETTINGS:"MORE_SETTINGS",LANGUAGE:"LANGUAGE",MULTIPLE_LANGUAGES:"MULTIPLE_LANGUAGES",LOOP:"LOOP",QUALITY:"QUALITY",ENTER_PICTURE_IN_PICTURE:"ENTER_PICTURE_IN_PICTURE",PAUSE:"PAUSE",UNRECOGNIZED_LANGUAGE:"UNRECOGNIZED_LANGUAGE",EXIT_PICTURE_IN_PICTURE:"EXIT_PICTURE_IN_PICTURE",NOT_APPLICABLE:"NOT_APPLICABLE",RESOLUTION:"RESOLUTION",TOGGLE_STEREOSCOPIC:"TOGGLE_STEREOSCOPIC",SEEK:"SEEK",CAST:"CAST",MUTE:"MUTE",UNMUTE:"UNMUTE",
328
+ SKIP_AD:"SKIP_AD",SUBTITLE_FORCED:"SUBTITLE_FORCED",REWIND:"REWIND",PLAYBACK_RATE:"PLAYBACK_RATE",AIRPLAY:"AIRPLAY",UNDETERMINED_LANGUAGE:"UNDETERMINED_LANGUAGE",ENTER_LOOP_MODE:"ENTER_LOOP_MODE",RECENTER_VR:"RECENTER_VR",EXIT_LOOP_MODE:"EXIT_LOOP_MODE",AUTO_QUALITY:"AUTO_QUALITY",AD_TIME:"AD_TIME",CAPTIONS:"CAPTIONS",AD_DURATION:"AD_DURATION",FAST_FORWARD:"FAST_FORWARD",FULL_SCREEN:"FULL_SCREEN",ON:"ON",EXIT_FULL_SCREEN:"EXIT_FULL_SCREEN",PLAY:"PLAY",OFF:"OFF",PICTURE_IN_PICTURE:"PICTURE_IN_PICTURE",
329
+ REPLAY:"REPLAY",VOLUME:"VOLUME",STATISTICS:"STATISTICS",AD_PROGRESS:"AD_PROGRESS",BACK:"BACK"};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()}};
@@ -568,9 +568,9 @@ shaka.util.TXml.txmlNodeToDomElement=function(a,b,c){b=void 0===b?!0:b;c=void 0=
568
568
  shaka.util.TXml.knownNameSpaces_=new Map([]);shaka.media.DrmEngine=function(a){var b=this;this.playerInterface_=a;this.supportedTypes_=new Set;this.video_=this.mediaKeys_=null;this.initializedForStorage_=this.initialized_=!1;this.licenseTimeSeconds_=0;this.currentDrmInfo_=null;this.eventManager_=new shaka.util.EventManager;this.activeSessions_=new Map;this.storedPersistentSessions_=new Map;this.allSessionsLoaded_=new shaka.util.PublicPromise;this.config_=null;this.onError_=function(c){c.severity==shaka.util.Error.Severity.CRITICAL&&b.allSessionsLoaded_.reject(c);
569
569
  a.onError(c)};this.keyStatusByKeyId_=new Map;this.announcedKeyStatusByKeyId_=new Map;this.keyStatusTimer_=new shaka.util.Timer(function(){return b.processKeyStatusChanges_()});this.usePersistentLicenses_=!1;this.mediaKeyMessageEvents_=[];this.initialRequestsSent_=!1;this.expirationTimer_=new shaka.util.Timer(function(){b.pollExpiration_()});this.allSessionsLoaded_.catch(function(){});this.destroyer_=new shaka.util.Destroyer(function(){return b.destroyNow_()});this.srcEquals_=!1;this.manifestInitData_=
570
570
  this.mediaKeysAttached_=null};shaka.media.DrmEngine.prototype.destroy=function(){return this.destroyer_.destroy()};
571
- shaka.media.DrmEngine.prototype.destroyNow_=function(){var a=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(b){switch(b.nextAddress){case 1:return a.eventManager_.release(),a.eventManager_=null,a.allSessionsLoaded_.reject(),a.expirationTimer_.stop(),a.expirationTimer_=null,a.keyStatusTimer_.stop(),a.keyStatusTimer_=null,b.yield(a.closeOpenSessions_(),2);case 2:if(!a.video_){b.jumpTo(3);break}goog.asserts.assert(!a.video_.src,"video src must be removed first!");b.setCatchFinallyBlocks(4);
572
- return b.yield(a.video_.setMediaKeys(null),6);case 6:b.leaveTryBlock(5);break;case 4:b.enterCatchBlock();case 5:a.video_=null;case 3:a.currentDrmInfo_=null,a.supportedTypes_.clear(),a.mediaKeys_=null,a.storedPersistentSessions_=new Map,a.config_=null,a.onError_=function(){},a.playerInterface_=null,a.srcEquals_=!1,a.mediaKeysAttached_=null,b.jumpToEnd()}})};shaka.media.DrmEngine.prototype.configure=function(a){this.config_=a;this.expirationTimer_&&this.expirationTimer_.tickEvery(this.config_.updateExpirationTime)};
573
- shaka.media.DrmEngine.prototype.setSrcEquals=function(a){this.srcEquals_=a};shaka.media.DrmEngine.prototype.initForStorage=function(a,b){this.initializedForStorage_=!0;this.storedPersistentSessions_=new Map;this.usePersistentLicenses_=b;return this.init_(a)};
571
+ shaka.media.DrmEngine.prototype.destroyNow_=function(){var a=this,b;return $jscomp.asyncExecutePromiseGeneratorProgram(function(c){switch(c.nextAddress){case 1:return a.eventManager_.release(),a.eventManager_=null,a.allSessionsLoaded_.reject(),a.expirationTimer_.stop(),a.expirationTimer_=null,a.keyStatusTimer_.stop(),a.keyStatusTimer_=null,c.yield(a.closeOpenSessions_(),2);case 2:if(!a.video_){c.jumpTo(3);break}shaka.util.Platform.isMediaKeysPolyfilled("webkit")||goog.asserts.assert(!a.video_.src,
572
+ "video src must be removed first!");c.setCatchFinallyBlocks(4);return c.yield(a.video_.setMediaKeys(null),6);case 6:c.leaveTryBlock(5);break;case 4:b=c.enterCatchBlock(),shaka.log.debug("DrmEngine.destroyNow_ exception",b);case 5:a.video_=null;case 3:a.currentDrmInfo_=null,a.supportedTypes_.clear(),a.mediaKeys_=null,a.storedPersistentSessions_=new Map,a.config_=null,a.onError_=function(){},a.playerInterface_=null,a.srcEquals_=!1,a.mediaKeysAttached_=null,c.jumpToEnd()}})};
573
+ shaka.media.DrmEngine.prototype.configure=function(a){this.config_=a;this.expirationTimer_&&this.expirationTimer_.tickEvery(this.config_.updateExpirationTime)};shaka.media.DrmEngine.prototype.setSrcEquals=function(a){this.srcEquals_=a};shaka.media.DrmEngine.prototype.initForStorage=function(a,b){this.initializedForStorage_=!0;this.storedPersistentSessions_=new Map;this.usePersistentLicenses_=b;return this.init_(a)};
574
574
  shaka.media.DrmEngine.prototype.initForPlayback=function(a,b){this.storedPersistentSessions_=new Map;b=$jscomp.makeIterator(b);for(var c=b.next();!c.done;c=b.next())this.storedPersistentSessions_.set(c.value,{initData:null,initDataType:null});b=$jscomp.makeIterator(this.config_.persistentSessionsMetadata);for(c=b.next();!c.done;c=b.next())c=c.value,this.storedPersistentSessions_.set(c.sessionId,{initData:c.initData,initDataType:c.initDataType});this.usePersistentLicenses_=0<this.storedPersistentSessions_.size;
575
575
  return this.init_(a)};
576
576
  shaka.media.DrmEngine.prototype.initForRemoval=function(a,b,c,d,e){var f=new Map;d={audioCapabilities:d,videoCapabilities:e,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:a};d.drmInfos=[{keySystem:a,licenseServerUri:b,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:c,serverCertificateUri:"",initData:null,keyIds:null}];f.set(a,d);return this.queryMediaKeys_(f,[])};
@@ -799,7 +799,7 @@ shaka.media.MediaSourceEngine.prototype.createMediaSource=function(a){var b=this
799
799
  shaka.media.MediaSourceEngine.prototype.onSourceOpen_=function(a){goog.asserts.assert(this.url_,"Must have object URL");URL.revokeObjectURL(this.url_);a.resolve()};
800
800
  shaka.media.MediaSourceEngine.isStreamSupported=function(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,r,t;return $jscomp.asyncExecutePromiseGeneratorProgram(function(x){if(1==x.nextAddress)return a.createSegmentIndex?x.yield(a.createSegmentIndex(),2):x.jumpTo(2);if(!a.segmentIndex)return x.return(!1);if(a.segmentIndex.isEmpty())return x.return(!0);c=shaka.util.MimeUtils;d=shaka.transmuxer.TransmuxerEngine;e=shaka.util.ManifestParserUtils.ContentType;f=shaka.util.StreamUtils;g=new Set;h=$jscomp.makeIterator(a.segmentIndex);
801
801
  for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.mimeType||a.mimeType||"",n=l.codecs||a.codecs||"",p=m+":"+n,!g.has(p))if(g.add(p),b==e.TEXT){if(q=c.getFullType(m,n),!shaka.text.TextEngine.isTypeSupported(q))return x.return(!1)}else if(b==e.VIDEO?n=f.getCorrectVideoCodecs(n):b==e.AUDIO&&(n=f.getCorrectAudioCodecs(n,m)),r=c.getExtendedType(a,m,n),t=c.getFullTypeWithAllCodecs(m,n),!shaka.media.Capabilities.isTypeSupported(r)&&!d.isSupported(t,a.type))return x.return(!1);return x.return(!0)})};
802
- shaka.media.MediaSourceEngine.probeSupport=function(){var a='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat($jscomp.arrayFromIterable(shaka.util.MimeUtils.RAW_FORMATS)),
802
+ shaka.media.MediaSourceEngine.probeSupport=function(){var a='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat($jscomp.arrayFromIterable(shaka.util.MimeUtils.RAW_FORMATS)),
803
803
  b={};a=$jscomp.makeIterator(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;shaka.text.TextEngine.isTypeSupported(c)?b[c]=!0:shaka.util.Platform.supportsMediaSource()?b[c]=shaka.media.Capabilities.isTypeSupported(c)||shaka.transmuxer.TransmuxerEngine.isSupported(c):b[c]=shaka.util.Platform.supportsMediaType(c);var d=c.split(";")[0];b[d]=b[d]||b[c]}return b};shaka.media.MediaSourceEngine.prototype.destroy=function(){return this.destroyer_.destroy()};
804
804
  shaka.media.MediaSourceEngine.prototype.doDestroy_=function(){var a=this,b,c,d,e,f,g,h,k,l,m;return $jscomp.asyncExecutePromiseGeneratorProgram(function(n){if(1==n.nextAddress){b=shaka.util.Functional;c=[];for(d in a.queues_)for(e=a.queues_[d],f=e[0],a.queues_[d]=e.slice(0,1),f&&c.push(f.p.catch(b.noop)),g=$jscomp.makeIterator(e.slice(1)),h=g.next();!h.done;h=g.next())k=h.value,k.p.reject(shaka.util.Destroyer.destroyedError());a.textEngine_&&c.push(a.textEngine_.destroy());a.textDisplayer_&&c.push(a.textDisplayer_.destroy());
805
805
  for(l in a.transmuxers_)c.push(a.transmuxers_[l].destroy());return n.yield(Promise.all(c),2)}a.eventManager_&&(a.eventManager_.release(),a.eventManager_=null);a.video_&&(a.video_.removeAttribute("src"),a.video_.load(),a.video_=null);a.config_=null;a.mediaSource_=null;a.textEngine_=null;a.textDisplayer_=null;a.sourceBuffers_={};a.transmuxers_={};a.captionParser_=null;if(goog.DEBUG)for(m in a.queues_)goog.asserts.assert(0==a.queues_[m].length,m+" queue should be empty after destroy!");a.queues_={};
@@ -861,7 +861,7 @@ shaka.media.MediaSourceEngine.prototype.codecSwitchIfNecessary_=function(a,b,c,d
861
861
  v=g.getBasicType(n);if(h===y&&k===v)return A.return(!1);z=!0;if(e.needSplitMuxedContent_||m&&l&&!e.transmuxers_[a])z=!1;if(z&&e.config_.codecSwitchingStrategy===shaka.config.CodecSwitchingStrategy.SMOOTH&&shaka.media.Capabilities.isChangeTypeSupported())return A.yield(e.changeType(a,n,l),3);l&&l.destroy();return A.yield(e.reset(d),3)}return A.return(!0)})};
862
862
  shaka.media.MediaSourceEngine.prototype.isCodecSwitchNecessary_=function(a,b,c,d){if(a==shaka.util.ManifestParserUtils.ContentType.TEXT)return!1;var e=shaka.util.MimeUtils;b=e.getCodecBase(e.getCodecs(this.sourceBufferTypes_[a]));var f=e.getBasicType(this.sourceBufferTypes_[a]),g=shaka.util.MimeUtils.getFullType(c,d),h=this.config_.forceTransmux;if(!shaka.media.Capabilities.isTypeSupported(g)||!this.sequenceMode_&&shaka.util.MimeUtils.RAW_FORMATS.includes(g))h=!0;c=shaka.util.MimeUtils.getFullTypeWithAllCodecs(c,
863
863
  d);d=shaka.transmuxer.TransmuxerEngine;h&&(h=d.findTransmuxer(c))&&(h=h(),g=h.convertCodecs(a,c),h.destroy());a=e.getCodecBase(e.getCodecs(g));e=e.getBasicType(g);return b!==a||f!==e};shaka.media.MediaSourceEngine.prototype.isResetMediaSourceNecessary=function(a,b,c,d){return this.isCodecSwitchNecessary_(a,b,c,d)?this.config_.codecSwitchingStrategy!==shaka.config.CodecSwitchingStrategy.SMOOTH||!shaka.media.Capabilities.isChangeTypeSupported()||this.needSplitMuxedContent_:!1};
864
- shaka.media.MediaSourceEngine.prototype.updateLcevcDec=function(a){this.lcevcDec_=a};shaka.media.MediaSourceEngine.prototype.addExtraFeaturesToMimeType_=function(a){var b=this.config_.addExtraFeaturesToSourceBuffer(a);a+=b;shaka.log.debug("Using full mime type",a);return a};shaka.media.MediaSourceEngine.createObjectURL=window.URL.createObjectURL;shaka.media.MediaSourceEngine.SourceBufferMode_={SEQUENCE:"sequence",SEGMENTS:"segments"};shaka.media.PresentationTimeline=function(a,b,c){this.presentationStartTime_=a;this.presentationDelay_=b;this.segmentAvailabilityDuration_=this.duration_=Infinity;this.maxSegmentDuration_=1;this.maxSegmentEndTime_=this.minSegmentStartTime_=null;this.clockOffset_=0;this.static_=!0;this.userSeekStart_=0;this.autoCorrectDrift_=void 0===c?!0:c;this.availabilityTimeOffset_=0;this.startTimeLocked_=!1;this.initialProgramDateTime_=null};shaka.media.PresentationTimeline.prototype.getDuration=function(){return this.duration_};
864
+ shaka.media.MediaSourceEngine.prototype.updateLcevcDec=function(a){this.lcevcDec_=a};shaka.media.MediaSourceEngine.prototype.addExtraFeaturesToMimeType_=function(a){var b=this.config_.addExtraFeaturesToSourceBuffer(a);a+=b;shaka.log.debug("Using full mime type",a);return a};shaka.media.MediaSourceEngine.createObjectURL=window.URL.createObjectURL;shaka.media.MediaSourceEngine.SourceBufferMode_={SEQUENCE:"sequence",SEGMENTS:"segments"};shaka.media.PresentationTimeline=function(a,b,c){this.presentationStartTime_=a;this.presentationDelay_=b;this.segmentAvailabilityDuration_=this.duration_=Infinity;this.maxSegmentDuration_=1;this.maxSegmentEndTime_=this.minSegmentStartTime_=null;this.clockOffset_=0;this.static_=!0;this.userSeekStart_=0;this.autoCorrectDrift_=void 0===c?!0:c;this.availabilityTimeOffset_=0;this.startTimeLocked_=!1;this.initialProgramDateTime_=a};shaka.media.PresentationTimeline.prototype.getDuration=function(){return this.duration_};
865
865
  shaka.media.PresentationTimeline.prototype.getMaxSegmentDuration=function(){return this.maxSegmentDuration_};shaka.media.PresentationTimeline.prototype.setPresentationStartTime=function(a){goog.asserts.assert(0<=a,"presentationStartTime must be >= 0");this.presentationStartTime_=a};shaka.media.PresentationTimeline.prototype.setDuration=function(a){goog.asserts.assert(0<a,"duration must be > 0");this.duration_=a};shaka.media.PresentationTimeline.prototype.getPresentationStartTime=function(){return this.presentationStartTime_};
866
866
  shaka.media.PresentationTimeline.prototype.setClockOffset=function(a){this.clockOffset_=a};shaka.media.PresentationTimeline.prototype.setStatic=function(a){this.static_=a};shaka.media.PresentationTimeline.prototype.setSegmentAvailabilityDuration=function(a){goog.asserts.assert(0<=a,"segmentAvailabilityDuration must be >= 0");this.segmentAvailabilityDuration_=a};shaka.media.PresentationTimeline.prototype.getSegmentAvailabilityDuration=function(){return this.segmentAvailabilityDuration_};
867
867
  shaka.media.PresentationTimeline.prototype.setDelay=function(a){goog.asserts.assert(0<=a,"delay must be >= 0");this.presentationDelay_=a};shaka.media.PresentationTimeline.prototype.getDelay=function(){return this.presentationDelay_};
@@ -1249,8 +1249,7 @@ NaN;this.config_=this.defaultConfig_();this.maxHwRes_={width:Infinity,height:Inf
1249
1249
  this.config_.preferredAudioLabel,this.config_.preferredVideoLabel,this.config_.mediaSource.codecSwitchingStrategy,this.config_.manifest.dash.enableAudioGroups);this.currentTextLanguage_=this.config_.preferredTextLanguage;this.currentTextRole_=this.config_.preferredTextRole;this.currentTextForced_=this.config_.preferForcedSubs;this.cleanupOnUnload_=[];b&&b(this);this.cmcdManager_=this.createCmcd_();this.cmsdManager_=this.createCmsd_();this.networkingEngine_=this.createNetworkingEngine();this.networkingEngine_.setForceHTTPS(this.config_.streaming.forceHTTPS);
1250
1250
  this.adManager_=null;shaka.Player.adManagerFactory_&&(this.adManager_=shaka.Player.adManagerFactory_(),this.adManager_.configure(this.config_.ads));this.globalEventManager_.listen(window,"online",function(){c.restoreDisabledVariants_();c.retryStreaming()});this.checkVariantsTimer_=new shaka.util.Timer(function(){return c.checkVariants_()});a&&(shaka.Deprecate.deprecateFeature(5,"Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),
1251
1251
  this.attach(a,!0))};$jscomp.inherits(shaka.Player,shaka.util.FakeEventTarget);shaka.Player.prototype.createLcevcDec_=function(a){null==this.lcevcDec_&&(this.lcevcDec_=new shaka.lcevc.Dec(this.video_,this.lcevcCanvas_,a),this.mediaSourceEngine_&&this.mediaSourceEngine_.updateLcevcDec(this.lcevcDec_))};shaka.Player.prototype.closeLcevcDec_=function(){null!=this.lcevcDec_&&(this.lcevcDec_.hideCanvas(),this.lcevcDec_.release(),this.lcevcDec_=null)};
1252
- shaka.Player.prototype.setupLcevc_=function(a){if(a.lcevc.enabled){var b=this.getVariantTracks();b&&b[0]&&"video/mp2t"==b[0].videoMimeType&&(shaka.util.Platform.isEdge()||shaka.util.Platform.isLegacyEdge())&&(a.mediaSource.forceTransmux||shaka.log.alwaysWarn("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));this.closeLcevcDec_();this.createLcevcDec_(a.lcevc)}else this.closeLcevcDec_()};
1253
- shaka.Player.makeEvent_=function(a,b){return new shaka.util.FakeEvent(a,b)};
1252
+ shaka.Player.prototype.setupLcevc_=function(a){a.lcevc.enabled?(this.closeLcevcDec_(),this.createLcevcDec_(a.lcevc)):this.closeLcevcDec_()};shaka.Player.makeEvent_=function(a,b){return new shaka.util.FakeEvent(a,b)};
1254
1253
  shaka.Player.prototype.destroy=function(){var a=this,b,c,d,e,f;return $jscomp.asyncExecutePromiseGeneratorProgram(function(g){switch(g.nextAddress){case 1:if(a.loadMode_==shaka.Player.LoadMode.DESTROYED)return g.return();a.closeLcevcDec_();b=a.detach();a.loadMode_=shaka.Player.LoadMode.DESTROYED;return g.yield(b,2);case 2:c=[];d=$jscomp.makeIterator(a.createdPreloadManagers_);for(e=d.next();!e.done;e=d.next())f=e.value,f.isDestroyed()||c.push(f.destroy());a.createdPreloadManagers_=[];return g.yield(Promise.all(c),
1255
1254
  3);case 3:a.globalEventManager_&&(a.globalEventManager_.release(),a.globalEventManager_=null);a.attachEventManager_&&(a.attachEventManager_.release(),a.attachEventManager_=null);a.loadEventManager_&&(a.loadEventManager_.release(),a.loadEventManager_=null);a.trickPlayEventManager_&&(a.trickPlayEventManager_.release(),a.trickPlayEventManager_=null);a.abrManagerFactory_=null;a.config_=null;a.stats_=null;a.videoContainer_=null;a.cmcdManager_=null;a.cmsdManager_=null;if(!a.networkingEngine_){g.jumpTo(4);
1256
1255
  break}return g.yield(a.networkingEngine_.destroy(),5);case 5:a.networkingEngine_=null;case 4:a.abrManager_&&(a.abrManager_.release(),a.abrManager_=null),shaka.util.FakeEventTarget.prototype.release.call(a),g.jumpToEnd()}})};shaka.Player.registerSupportPlugin=function(a,b){shaka.Player.supportPlugins_[a]=b};shaka.Player.setAdManagerFactory=function(a){shaka.Player.adManagerFactory_=a};
@@ -1264,12 +1263,13 @@ shaka.Player.prototype.atomicOperationAcquireMutex_=function(a){var b=this,c;ret
1264
1263
  shaka.Player.prototype.unload=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n;return $jscomp.asyncExecutePromiseGeneratorProgram(function(p){switch(p.nextAddress){case 1:return c.loadMode_!=shaka.Player.LoadMode.DESTROYED&&(c.loadMode_=shaka.Player.LoadMode.NOT_LOADED),p.yield(c.atomicOperationAcquireMutex_("unload"),2);case 2:if(p.yieldResult)return p.return();p.setFinallyBlock(3);c.fullyLoaded_=!1;c.makeStateChangeEvent_("unload");a&&!shaka.util.Platform.supportsMediaSource()&&
1265
1264
  (a=!1);c.closeLcevcDec_();d=c.cleanupOnUnload_.map(function(q){return q()});c.cleanupOnUnload_=[];return p.yield(Promise.all(d),5);case 5:c.dispatchEvent(shaka.Player.makeEvent_(shaka.util.FakeEvent.EventName.Unloading));c.regionTimeline_&&(c.regionTimeline_.release(),c.regionTimeline_=null);c.video_&&(c.loadEventManager_.removeAll(),c.trickPlayEventManager_.removeAll());c.checkVariantsTimer_.stop();c.playheadObservers_&&(c.playheadObservers_.release(),c.playheadObservers_=null);c.bufferPoller_&&
1266
1265
  (c.bufferPoller_.stop(),c.bufferPoller_=null);if(!c.parser_){p.jumpTo(6);break}return p.yield(c.parser_.stop(),7);case 7:c.parser_=null,c.parserFactory_=null;case 6:if(!c.abrManager_){p.jumpTo(8);break}return p.yield(c.abrManager_.stop(),8);case 8:if(!c.streamingEngine_){p.jumpTo(10);break}return p.yield(c.streamingEngine_.destroy(),11);case 11:c.streamingEngine_=null;case 10:c.playRateController_&&(c.playRateController_.release(),c.playRateController_=null);c.playhead_&&(c.playhead_.release(),c.playhead_=
1267
- null);if(!c.mediaSourceEngine_){p.jumpTo(12);break}return p.yield(c.mediaSourceEngine_.destroy(),13);case 13:c.mediaSourceEngine_=null;case 12:if(c.adManager_&&!b)c.adManager_.onAssetUnload();c.cmsdManager_&&c.cmsdManager_.reset();c.video_&&shaka.util.Dom.removeAllChildren(c.video_);if(!c.video_||!c.video_.src){p.jumpTo(14);break}return p.yield(new Promise(function(q){return(new shaka.util.Timer(q)).tickAfter(.1)}),15);case 15:c.video_.removeAttribute("src"),c.video_.load();case 14:if(!c.drmEngine_){p.jumpTo(16);
1268
- break}return p.yield(c.drmEngine_.destroy(),17);case 17:c.drmEngine_=null;case 16:c.assetUri_=null;c.mimeType_=null;c.bufferObserver_=null;if(c.manifest_){e=$jscomp.makeIterator(c.manifest_.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=$jscomp.makeIterator([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=$jscomp.makeIterator(c.manifest_.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,n.segmentIndex&&n.segmentIndex.release()}c.manifest_=
1269
- null;c.stats_=new shaka.util.Stats;c.lastTextFactory_=null;c.externalSrcEqualsThumbnailsStreams_=[];c.completionPercent_=NaN;c.updateBufferState_();case 3:p.enterFinallyBlock();c.mutex_.release();p.leaveFinallyBlock(4);break;case 4:if(a&&shaka.util.Platform.supportsMediaSource()&&!c.mediaSourceEngine_)return p.yield(c.initializeMediaSourceEngineInner_(),0);p.jumpTo(0)}})};shaka.Player.prototype.updateStartTime=function(a){this.startTime_=a};
1270
- shaka.Player.prototype.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,q,r,t,x;return $jscomp.asyncExecutePromiseGeneratorProgram(function(w){switch(w.nextAddress){case 1:if(d.loadMode_==shaka.Player.LoadMode.DESTROYED)throw d.createAbortLoadError_();e=null;f="";a instanceof shaka.media.PreloadManager?(e=a,f=e.getAssetUri()||""):f=a||"";return w.yield(d.mutex_.acquire("load"),2);case 2:d.mutex_.release();if(!d.video_)throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,
1271
- shaka.util.Error.Category.PLAYER,shaka.util.Error.Code.NO_VIDEO_ELEMENT);if(!d.assetUri_){w.jumpTo(3);break}return w.yield(d.unload(!1),3);case 3:g=++d.operationId_;h=function(){return $jscomp.asyncExecutePromiseGeneratorProgram(function(u){if(1==u.nextAddress)return d.operationId_==g?u.jumpTo(0):e?u.yield(e.destroy(),3):u.jumpTo(3);throw d.createAbortLoadError_();})};k=function(u,y){return $jscomp.asyncExecutePromiseGeneratorProgram(function(v){switch(v.nextAddress){case 1:return v.setFinallyBlock(2),
1272
- v.yield(d.mutex_.acquire(y),4);case 4:return v.yield(h(),5);case 5:return v.yield(u(),6);case 6:return v.yield(h(),7);case 7:e&&d.config_&&e.reconfigure(d.config_);case 2:v.enterFinallyBlock(),d.mutex_.release(),v.leaveFinallyBlock(0)}})};w.setCatchFinallyBlocks(5,6);null==b&&e&&(b=e.getStartTime());d.startTime_=b;d.fullyLoaded_=!1;d.dispatchEvent(shaka.Player.makeEvent_(shaka.util.FakeEvent.EventName.Loading));if(e){c=e.getMimeType();w.jumpTo(8);break}if(c){w.jumpTo(8);break}return w.yield(k(function(){return $jscomp.asyncExecutePromiseGeneratorProgram(function(u){if(1==
1266
+ null);if(!shaka.util.Platform.isMediaKeysPolyfilled("webkit")||!c.drmEngine_){p.jumpTo(12);break}return p.yield(c.drmEngine_.destroy(),13);case 13:c.drmEngine_=null;case 12:if(!c.mediaSourceEngine_){p.jumpTo(14);break}return p.yield(c.mediaSourceEngine_.destroy(),15);case 15:c.mediaSourceEngine_=null;case 14:if(c.adManager_&&!b)c.adManager_.onAssetUnload();c.cmsdManager_&&c.cmsdManager_.reset();c.video_&&shaka.util.Dom.removeAllChildren(c.video_);if(!c.video_||!c.video_.src){p.jumpTo(16);break}return p.yield(new Promise(function(q){return(new shaka.util.Timer(q)).tickAfter(.1)}),
1267
+ 17);case 17:c.video_.removeAttribute("src"),c.video_.load();case 16:if(!c.drmEngine_){p.jumpTo(18);break}return p.yield(c.drmEngine_.destroy(),19);case 19:c.drmEngine_=null;case 18:c.assetUri_=null;c.mimeType_=null;c.bufferObserver_=null;if(c.manifest_){e=$jscomp.makeIterator(c.manifest_.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=$jscomp.makeIterator([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=$jscomp.makeIterator(c.manifest_.textStreams);
1268
+ for(k=m.next();!k.done;k=m.next())n=k.value,n.segmentIndex&&n.segmentIndex.release()}c.manifest_=null;c.stats_=new shaka.util.Stats;c.lastTextFactory_=null;c.externalSrcEqualsThumbnailsStreams_=[];c.completionPercent_=NaN;c.updateBufferState_();case 3:p.enterFinallyBlock();c.mutex_.release();p.leaveFinallyBlock(4);break;case 4:if(a&&shaka.util.Platform.supportsMediaSource()&&!c.mediaSourceEngine_)return p.yield(c.initializeMediaSourceEngineInner_(),0);p.jumpTo(0)}})};
1269
+ shaka.Player.prototype.updateStartTime=function(a){this.startTime_=a};
1270
+ shaka.Player.prototype.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,q,r,t,x;return $jscomp.asyncExecutePromiseGeneratorProgram(function(w){switch(w.nextAddress){case 1:if(d.loadMode_==shaka.Player.LoadMode.DESTROYED)throw d.createAbortLoadError_();e=null;f="";a instanceof shaka.media.PreloadManager?(e=a,f=e.getAssetUri()||""):f=a||"";return w.yield(d.mutex_.acquire("load"),2);case 2:d.mutex_.release();if(!d.video_)throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.PLAYER,
1271
+ shaka.util.Error.Code.NO_VIDEO_ELEMENT);if(!d.assetUri_){w.jumpTo(3);break}return w.yield(d.unload(!1),3);case 3:g=++d.operationId_;h=function(){return $jscomp.asyncExecutePromiseGeneratorProgram(function(u){if(1==u.nextAddress)return d.operationId_==g?u.jumpTo(0):e?u.yield(e.destroy(),3):u.jumpTo(3);throw d.createAbortLoadError_();})};k=function(u,y){return $jscomp.asyncExecutePromiseGeneratorProgram(function(v){switch(v.nextAddress){case 1:return v.setFinallyBlock(2),v.yield(d.mutex_.acquire(y),
1272
+ 4);case 4:return v.yield(h(),5);case 5:return v.yield(u(),6);case 6:return v.yield(h(),7);case 7:e&&d.config_&&e.reconfigure(d.config_);case 2:v.enterFinallyBlock(),d.mutex_.release(),v.leaveFinallyBlock(0)}})};w.setCatchFinallyBlocks(5,6);null==b&&e&&(b=e.getStartTime());d.startTime_=b;d.fullyLoaded_=!1;d.dispatchEvent(shaka.Player.makeEvent_(shaka.util.FakeEvent.EventName.Loading));if(e){c=e.getMimeType();w.jumpTo(8);break}if(c){w.jumpTo(8);break}return w.yield(k(function(){return $jscomp.asyncExecutePromiseGeneratorProgram(function(u){if(1==
1273
1273
  u.nextAddress)return u.yield(d.guessMimeType_(f),2);c=u.yieldResult;u.jumpToEnd()})},"guessMimeType_"),8);case 8:l=!!e;if(e){e.setEventHandoffTarget(d);d.stats_=e.getStats();w.jumpTo(11);break}return w.yield(d.preloadInner_(f,b,c,!0),12);case 12:(e=w.yieldResult)?(e.setEventHandoffTarget(d),d.stats_=e.getStats(),e.start(),e.waitForFinish().catch(function(){})):d.stats_=new shaka.util.Stats;case 11:m=!e;n=e?e.getStartTimeOfLoad():Date.now()/1E3;d.stats_=e?e.getStats():new shaka.util.Stats;d.assetUri_=
1274
1274
  f;d.mimeType_=c||null;if(m)return w.yield(k(function(){return $jscomp.asyncExecutePromiseGeneratorProgram(function(u){goog.asserts.assert(c,"We should know the mimeType by now!");return u.yield(d.initializeSrcEqualsDrmInner_(c),0)})},"initializeSrcEqualsDrmInner_"),20);if(d.mediaSourceEngine_){w.jumpTo(15);break}return w.yield(k(function(){return $jscomp.asyncExecutePromiseGeneratorProgram(function(u){return u.yield(d.initializeMediaSourceEngineInner_(),0)})},"initializeMediaSourceEngineInner_"),
1275
1275
  15);case 15:return w.yield(k(function(){return $jscomp.asyncExecutePromiseGeneratorProgram(function(u){return u.yield(e.waitForFinish(),0)})},"waitForFinish"),17);case 17:d.config_=e.getConfiguration();d.manifestFilterer_=e.getManifestFilterer();d.parserFactory_=e.getParserFactory();d.parser_=e.receiveParser();d.regionTimeline_=e.receiveRegionTimeline();d.qualityObserver_=e.getQualityObserver();d.manifest_=e.getManifest();if(p=e.getCurrentAdaptationSetCriteria())d.currentAdaptationSetCriteria_=p;
@@ -1487,7 +1487,7 @@ goog.exportProperty(shaka.Player.prototype,"getAssetUri",shaka.Player.prototype.
1487
1487
  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);
1488
1488
  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);
1489
1489
  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);
1490
- 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.12-debug";goog.exportProperty(shaka.Player,"version",shaka.Player.version);shaka.Deprecate.init(shaka.Player.version);
1490
+ 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.13-debug";goog.exportProperty(shaka.Player,"version",shaka.Player.version);shaka.Deprecate.init(shaka.Player.version);
1491
1491
  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_++};
1492
1492
  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()};
1493
1493
  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()};
@@ -2547,9 +2547,9 @@ shaka.polyfill.Orientation.FakeOrientation.prototype.dispatchChangeEvent=functio
2547
2547
  shaka.polyfill.Orientation.FakeOrientation.prototype.lock=function(a){var b=function(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1},c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;
2548
2548
  return Promise.reject(a)};shaka.polyfill.Orientation.FakeOrientation.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};shaka.polyfill.register(shaka.polyfill.Orientation.install);shaka.polyfill.PatchedMediaKeysApple=function(){};
2549
2549
  shaka.polyfill.PatchedMediaKeysApple.install=function(a){var b=shaka.polyfill.PatchedMediaKeysApple;if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)b.enableUninstall=!0,b.originalHTMLMediaElementPrototypeMediaKeys=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),b.originalHTMLMediaElementPrototypeSetMediaKeys=HTMLMediaElement.prototype.setMediaKeys,b.originalWindowMediaKeys=window.MediaKeys,b.originalWindowMediaKeySystemAccess=window.MediaKeySystemAccess,
2550
- b.originalNavigatorRequestMediaKeySystemAccess=navigator.requestMediaKeySystemAccess;shaka.log.info("Using Apple-prefixed EME");delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=b.setMediaKeys;window.MediaKeys=b.MediaKeys;window.MediaKeySystemAccess=b.MediaKeySystemAccess;navigator.requestMediaKeySystemAccess=b.requestMediaKeySystemAccess;window.shakaMediaKeysPolyfill=!0}};
2550
+ b.originalNavigatorRequestMediaKeySystemAccess=navigator.requestMediaKeySystemAccess;shaka.log.info("Using Apple-prefixed EME");delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=b.setMediaKeys;window.MediaKeys=b.MediaKeys;window.MediaKeySystemAccess=b.MediaKeySystemAccess;navigator.requestMediaKeySystemAccess=b.requestMediaKeySystemAccess;window.shakaMediaKeysPolyfill=b.apiName_}};
2551
2551
  shaka.polyfill.PatchedMediaKeysApple.uninstall=function(){var a=shaka.polyfill.PatchedMediaKeysApple;a.enableUninstall&&(shaka.log.info("Un-installing Apple-prefixed EME"),a.enableUninstall=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",a.originalHTMLMediaElementPrototypeMediaKeys),HTMLMediaElement.prototype.setMediaKeys=a.originalHTMLMediaElementPrototypeSetMediaKeys,window.MediaKeys=a.originalWindowMediaKeys,window.MediaKeySystemAccess=a.originalWindowMediaKeySystemAccess,navigator.requestMediaKeySystemAccess=
2552
- a.originalNavigatorRequestMediaKeySystemAccess,a.originalWindowMediaKeys=null,a.originalWindowMediaKeySystemAccess=null,a.originalHTMLMediaElementPrototypeSetMediaKeys=null,a.originalNavigatorRequestMediaKeySystemAccess=null,a.originalHTMLMediaElementPrototypeMediaKeys=null,window.shakaMediaKeysPolyfill=!1)};
2552
+ a.originalNavigatorRequestMediaKeySystemAccess,a.originalWindowMediaKeys=null,a.originalWindowMediaKeySystemAccess=null,a.originalHTMLMediaElementPrototypeSetMediaKeys=null,a.originalNavigatorRequestMediaKeySystemAccess=null,a.originalHTMLMediaElementPrototypeMediaKeys=null,window.shakaMediaKeysPolyfill="")};
2553
2553
  shaka.polyfill.PatchedMediaKeysApple.requestMediaKeySystemAccess=function(a,b){shaka.log.debug("PatchedMediaKeysApple.requestMediaKeySystemAccess");goog.asserts.assert(this==navigator,'bad "this" for requestMediaKeySystemAccess');var c=shaka.polyfill.PatchedMediaKeysApple;try{var d=new c.MediaKeySystemAccess(a,b);return Promise.resolve(d)}catch(e){return Promise.reject(e)}};
2554
2554
  shaka.polyfill.PatchedMediaKeysApple.setMediaKeys=function(a){shaka.log.debug("PatchedMediaKeysApple.setMediaKeys");goog.asserts.assert(this instanceof HTMLMediaElement,'bad "this" for setMediaKeys');var b=shaka.polyfill.PatchedMediaKeysApple,c=this.mediaKeys;c&&c!=a&&(goog.asserts.assert(c instanceof b.MediaKeys,"non-polyfill instance of oldMediaKeys"),c.setMedia(null));delete this.mediaKeys;return(this.mediaKeys=a)?(goog.asserts.assert(a instanceof b.MediaKeys,"non-polyfill instance of newMediaKeys"),
2555
2555
  a.setMedia(this)):Promise.resolve()};
@@ -2576,16 +2576,16 @@ shaka.polyfill.PatchedMediaKeysApple.MediaKeySession.prototype.onWebkitKeyError_
2576
2576
  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};
2577
2577
  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_};
2578
2578
  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.")};
2579
- 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.PatchedMediaKeysApple.MediaKeyStatusMap.prototype.values=function(){goog.asserts.assert(!1,"Not used! Provided only for the compiler.")};shaka.polyfill.PatchedMediaKeysApple.apiName_="apple";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_)};
2580
2580
  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);
2581
2581
  goog.exportProperty(shaka.polyfill.PatchedMediaKeysCert,"install",shaka.polyfill.PatchedMediaKeysCert.install);shaka.polyfill.register(shaka.polyfill.PatchedMediaKeysCert.install);shaka.polyfill.PatchedMediaKeysNop=function(){};
2582
2582
  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=
2583
- 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."))};
2583
+ a.MediaKeySystemAccess;window.shakaMediaKeysPolyfill=a.apiName_}};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."))};
2584
2584
  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);
2585
2585
  shaka.polyfill.PatchedMediaKeysNop.MediaKeys=function(){throw new TypeError("Illegal constructor.");};shaka.polyfill.PatchedMediaKeysNop.MediaKeys.prototype.createSession=function(){};shaka.polyfill.PatchedMediaKeysNop.MediaKeys.prototype.setServerCertificate=function(){};shaka.polyfill.PatchedMediaKeysNop.MediaKeys.prototype.getStatusForPolicy=function(a){return Promise.resolve("usable")};
2586
- shaka.polyfill.PatchedMediaKeysNop.MediaKeySystemAccess=function(){this.keySystem="";throw new TypeError("Illegal constructor.");};shaka.polyfill.PatchedMediaKeysNop.MediaKeySystemAccess.prototype.getConfiguration=function(){};shaka.polyfill.PatchedMediaKeysNop.MediaKeySystemAccess.prototype.createMediaKeys=function(){};shaka.polyfill.register(shaka.polyfill.PatchedMediaKeysNop.install,-10);shaka.polyfill.PatchedMediaKeysWebkit=function(){};
2586
+ shaka.polyfill.PatchedMediaKeysNop.MediaKeySystemAccess=function(){this.keySystem="";throw new TypeError("Illegal constructor.");};shaka.polyfill.PatchedMediaKeysNop.MediaKeySystemAccess.prototype.getConfiguration=function(){};shaka.polyfill.PatchedMediaKeysNop.MediaKeySystemAccess.prototype.createMediaKeys=function(){};shaka.polyfill.PatchedMediaKeysNop.apiName_="nop";shaka.polyfill.register(shaka.polyfill.PatchedMediaKeysNop.install,-10);shaka.polyfill.PatchedMediaKeysWebkit=function(){};
2587
2587
  shaka.polyfill.PatchedMediaKeysWebkit.install=function(){var a=shaka.polyfill.PatchedMediaKeysWebkit;if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)shaka.log.info("Using webkit-prefixed EME v0.1b"),a.prefix_="webkit";else if(HTMLMediaElement.prototype.generateKeyRequest)shaka.log.info("Using nonprefixed EME v0.1b");else return;goog.asserts.assert(HTMLMediaElement.prototype[a.prefixApi_("generateKeyRequest")],
2588
- "PatchedMediaKeysWebkit APIs not available!");navigator.requestMediaKeySystemAccess=a.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=a.setMediaKeys;window.MediaKeys=a.MediaKeys;window.MediaKeySystemAccess=a.MediaKeySystemAccess;window.shakaMediaKeysPolyfill=!0}};
2588
+ "PatchedMediaKeysWebkit APIs not available!");navigator.requestMediaKeySystemAccess=a.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=a.setMediaKeys;window.MediaKeys=a.MediaKeys;window.MediaKeySystemAccess=a.MediaKeySystemAccess;window.shakaMediaKeysPolyfill=a.apiName_}};
2589
2589
  shaka.polyfill.PatchedMediaKeysWebkit.prefixApi_=function(a){var b=shaka.polyfill.PatchedMediaKeysWebkit.prefix_;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a};shaka.polyfill.PatchedMediaKeysWebkit.requestMediaKeySystemAccess=function(a,b){shaka.log.debug("PatchedMediaKeysWebkit.requestMediaKeySystemAccess");goog.asserts.assert(this==navigator,'bad "this" for requestMediaKeySystemAccess');var c=shaka.polyfill.PatchedMediaKeysWebkit;try{var d=new c.MediaKeySystemAccess(a,b);return Promise.resolve(d)}catch(e){return Promise.reject(e)}};
2590
2590
  shaka.polyfill.PatchedMediaKeysWebkit.setMediaKeys=function(a){shaka.log.debug("PatchedMediaKeysWebkit.setMediaKeys");goog.asserts.assert(this instanceof HTMLMediaElement,'bad "this" for setMediaKeys');var b=shaka.polyfill.PatchedMediaKeysWebkit,c=this.mediaKeys;c&&c!=a&&(goog.asserts.assert(c instanceof b.MediaKeys,"non-polyfill instance of oldMediaKeys"),c.setMedia(null));delete this.mediaKeys;if(this.mediaKeys=a)goog.asserts.assert(a instanceof b.MediaKeys,"non-polyfill instance of newMediaKeys"),
2591
2591
  a.setMedia(this);return Promise.resolve()};shaka.polyfill.PatchedMediaKeysWebkit.getVideoElement_=function(){var a=document.getElementsByTagName("video");return a.length?a[0]:document.createElement("video")};goog.exportProperty(shaka.polyfill,"PatchedMediaKeysWebkit",shaka.polyfill.PatchedMediaKeysWebkit);goog.exportProperty(shaka.polyfill.PatchedMediaKeysWebkit,"install",shaka.polyfill.PatchedMediaKeysWebkit.install);
@@ -2614,11 +2614,11 @@ shaka.polyfill.PatchedMediaKeysWebkit.MediaKeySession.prototype.update_=function
2614
2614
  this.updatePromise_=null);f=e.fromBase64(g.keys[0].k);e=e.fromBase64(g.keys[0].kid)}else f=shaka.util.BufferUtils.toUint8(b),e=null;d=d.prefixApi_("addKey");try{this.media_[d](this.keySystem_,f,e,this.sessionId)}catch(h){this.updatePromise_.reject(h),this.updatePromise_=null}}};shaka.polyfill.PatchedMediaKeysWebkit.MediaKeySession.prototype.updateKeyStatus_=function(a){this.keyStatuses.setStatus(a);a=new shaka.util.FakeEvent("keystatuseschange");this.dispatchEvent(a)};
2615
2615
  shaka.polyfill.PatchedMediaKeysWebkit.MediaKeySession.prototype.generateRequest=function(a,b){shaka.log.debug("PatchedMediaKeysWebkit.MediaKeySession.generateRequest");return this.generate_(b,null)};shaka.polyfill.PatchedMediaKeysWebkit.MediaKeySession.prototype.load=function(a){shaka.log.debug("PatchedMediaKeysWebkit.MediaKeySession.load");return"persistent-license"==this.type_?this.generate_(null,a):Promise.reject(Error("Not a persistent session."))};
2616
2616
  shaka.polyfill.PatchedMediaKeysWebkit.MediaKeySession.prototype.update=function(a){shaka.log.debug("PatchedMediaKeysWebkit.MediaKeySession.update",a);goog.asserts.assert(this.sessionId,"update without session ID");var b=new shaka.util.PublicPromise;this.update_(b,a);return b};
2617
- shaka.polyfill.PatchedMediaKeysWebkit.MediaKeySession.prototype.close=function(){var a=shaka.polyfill.PatchedMediaKeysWebkit;shaka.log.debug("PatchedMediaKeysWebkit.MediaKeySession.close");if("persistent-license"!=this.type_){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;a=a.prefixApi_("cancelKeyRequest");try{this.media_[a](this.keySystem_,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};
2617
+ shaka.polyfill.PatchedMediaKeysWebkit.MediaKeySession.prototype.close=function(){var a=shaka.polyfill.PatchedMediaKeysWebkit;shaka.log.debug("PatchedMediaKeysWebkit.MediaKeySession.close");if("persistent-license"!=this.type_){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;a=a.prefixApi_("cancelKeyRequest");try{this.media_[a](this.keySystem_,this.sessionId)}catch(b){shaka.log.debug(a+" exception",b)}}this.closed.resolve();return this.closed};
2618
2618
  shaka.polyfill.PatchedMediaKeysWebkit.MediaKeySession.prototype.remove=function(){shaka.log.debug("PatchedMediaKeysWebkit.MediaKeySession.remove");return"persistent-license"!=this.type_?Promise.reject(Error("Not a persistent session.")):this.close()};shaka.polyfill.PatchedMediaKeysWebkit.MediaKeyStatusMap=function(){this.size=0;this.status_=void 0};shaka.polyfill.PatchedMediaKeysWebkit.MediaKeyStatusMap.prototype.setStatus=function(a){this.size=void 0==a?0:1;this.status_=a};
2619
2619
  shaka.polyfill.PatchedMediaKeysWebkit.MediaKeyStatusMap.prototype.getStatus=function(){return this.status_};shaka.polyfill.PatchedMediaKeysWebkit.MediaKeyStatusMap.prototype.forEach=function(a){this.status_&&a(this.status_,shaka.media.DrmEngine.DUMMY_KEY_ID.value())};shaka.polyfill.PatchedMediaKeysWebkit.MediaKeyStatusMap.prototype.get=function(a){if(this.has(a))return this.status_};
2620
2620
  shaka.polyfill.PatchedMediaKeysWebkit.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.PatchedMediaKeysWebkit.MediaKeyStatusMap.prototype.entries=function(){goog.asserts.assert(!1,"Not used! Provided only for compiler.")};shaka.polyfill.PatchedMediaKeysWebkit.MediaKeyStatusMap.prototype.keys=function(){goog.asserts.assert(!1,"Not used! Provided only for compiler.")};
2621
- shaka.polyfill.PatchedMediaKeysWebkit.MediaKeyStatusMap.prototype.values=function(){goog.asserts.assert(!1,"Not used! Provided only for compiler.")};shaka.polyfill.PatchedMediaKeysWebkit.prefix_="";shaka.polyfill.register(shaka.polyfill.PatchedMediaKeysWebkit.install);shaka.polyfill.PiPWebkit=function(){};
2621
+ shaka.polyfill.PatchedMediaKeysWebkit.MediaKeyStatusMap.prototype.values=function(){goog.asserts.assert(!1,"Not used! Provided only for compiler.")};shaka.polyfill.PatchedMediaKeysWebkit.prefix_="";shaka.polyfill.PatchedMediaKeysWebkit.apiName_="webkit";shaka.polyfill.register(shaka.polyfill.PatchedMediaKeysWebkit.install);shaka.polyfill.PiPWebkit=function(){};
2622
2622
  shaka.polyfill.PiPWebkit.install=function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;if((!a.requestPictureInPicture||!document.exitPictureInPicture)&&a.webkitSupportsPresentationMode){var b=shaka.polyfill.PiPWebkit;shaka.log.debug("PiPWebkit.install");document.pictureInPictureEnabled=!0;document.pictureInPictureElement=null;a.requestPictureInPicture=b.requestPictureInPicture_;Object.defineProperty(a,"disablePictureInPicture",{get:b.getDisablePictureInPicture_,set:b.setDisablePictureInPicture_,
2623
2623
  enumerable:!0,configurable:!0});document.exitPictureInPicture=b.exitPictureInPicture_;document.addEventListener("webkitpresentationmodechanged",b.proxyEvent_,!0)}}};
2624
2624
  shaka.polyfill.PiPWebkit.proxyEvent_=function(a){a=a.target;if(a.webkitPresentationMode==shaka.polyfill.PiPWebkit.PIP_MODE_){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)};