shaka-player 4.6.9 → 4.6.10

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.
@@ -282,9 +282,8 @@ new Map([["AD_DURATION","\uad11\uace0 \uae30\uac04"],["AD_PROGRESS","\uad11\uace
282
282
  "\u5ee3\u544a [AD_ON]/[NUM_ADS]"],["AD_TIME","\u5ee3\u544a\uff1a[AD_TIME]"],["AUTO_QUALITY","\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",
283
283
  "\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN","\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"],
284
284
  ["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["RESOLUTION","\u89e3\u6790\u5ea6"],["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"]]))};
285
- shaka.ui.Locales.Ids={SURROUND:"SURROUND",ON:"ON",EXIT_PICTURE_IN_PICTURE:"EXIT_PICTURE_IN_PICTURE",LIVE:"LIVE",SEEK:"SEEK",SKIP_TO_LIVE:"SKIP_TO_LIVE",QUALITY:"QUALITY",VOLUME:"VOLUME",EXIT_FULL_SCREEN:"EXIT_FULL_SCREEN",PLAYBACK_RATE:"PLAYBACK_RATE",MULTIPLE_LANGUAGES:"MULTIPLE_LANGUAGES",PICTURE_IN_PICTURE:"PICTURE_IN_PICTURE",REPLAY:"REPLAY",UNDETERMINED_LANGUAGE:"UNDETERMINED_LANGUAGE",AD_DURATION:"AD_DURATION",PLAY:"PLAY",UNMUTE:"UNMUTE",SKIP_AD:"SKIP_AD",NOT_APPLICABLE:"NOT_APPLICABLE",REWIND:"REWIND",
286
- MORE_SETTINGS:"MORE_SETTINGS",ENTER_PICTURE_IN_PICTURE:"ENTER_PICTURE_IN_PICTURE",UNRECOGNIZED_LANGUAGE:"UNRECOGNIZED_LANGUAGE",AIRPLAY:"AIRPLAY",SUBTITLE_FORCED:"SUBTITLE_FORCED",AUTO_QUALITY:"AUTO_QUALITY",CAST:"CAST",LOOP:"LOOP",STATISTICS:"STATISTICS",CAPTIONS:"CAPTIONS",RESOLUTION:"RESOLUTION",AD_TIME:"AD_TIME",FAST_FORWARD:"FAST_FORWARD",BACK:"BACK",OFF:"OFF",EXIT_LOOP_MODE:"EXIT_LOOP_MODE",ENTER_LOOP_MODE:"ENTER_LOOP_MODE",AD_PROGRESS:"AD_PROGRESS",FULL_SCREEN:"FULL_SCREEN",PAUSE:"PAUSE",LANGUAGE:"LANGUAGE",
287
- MUTE:"MUTE"};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)};
285
+ shaka.ui.Locales.Ids={NOT_APPLICABLE:"NOT_APPLICABLE",STATISTICS:"STATISTICS",CAST:"CAST",OFF:"OFF",LOOP:"LOOP",REWIND:"REWIND",AUTO_QUALITY:"AUTO_QUALITY",PLAYBACK_RATE:"PLAYBACK_RATE",AD_PROGRESS:"AD_PROGRESS",RESOLUTION:"RESOLUTION",PICTURE_IN_PICTURE:"PICTURE_IN_PICTURE",BACK:"BACK",UNDETERMINED_LANGUAGE:"UNDETERMINED_LANGUAGE",UNMUTE:"UNMUTE",SEEK:"SEEK",REPLAY:"REPLAY",MULTIPLE_LANGUAGES:"MULTIPLE_LANGUAGES",EXIT_LOOP_MODE:"EXIT_LOOP_MODE",EXIT_PICTURE_IN_PICTURE:"EXIT_PICTURE_IN_PICTURE",VOLUME:"VOLUME",
286
+ CAPTIONS:"CAPTIONS",SKIP_AD:"SKIP_AD",FAST_FORWARD:"FAST_FORWARD",MORE_SETTINGS:"MORE_SETTINGS",MUTE:"MUTE",QUALITY:"QUALITY",SURROUND:"SURROUND",SUBTITLE_FORCED:"SUBTITLE_FORCED",AIRPLAY:"AIRPLAY",PAUSE:"PAUSE",LANGUAGE:"LANGUAGE",ENTER_PICTURE_IN_PICTURE:"ENTER_PICTURE_IN_PICTURE",LIVE:"LIVE",FULL_SCREEN:"FULL_SCREEN",ENTER_LOOP_MODE:"ENTER_LOOP_MODE",AD_TIME:"AD_TIME",ON:"ON",AD_DURATION:"AD_DURATION",PLAY:"PLAY",EXIT_FULL_SCREEN:"EXIT_FULL_SCREEN",SKIP_TO_LIVE:"SKIP_TO_LIVE",UNRECOGNIZED_LANGUAGE:"UNRECOGNIZED_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)};
288
287
  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)};
289
288
  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.media={};shaka.media.Capabilities=function(){};shaka.media.Capabilities.isTypeSupported=function(a){var b=shaka.media.Capabilities.MediaSourceTypeSupportMap;if(b.has(a))return b.get(a);if(window.ManagedMediaSource){var c=ManagedMediaSource.isTypeSupported(a);b.set(a,c);return c}return window.MediaSource?(c=MediaSource.isTypeSupported(a),b.set(a,c),c):!1};shaka.media.Capabilities.isChangeTypeSupported=function(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType};
290
289
  shaka.media.Capabilities.MediaSourceTypeSupportMap=new Map;shaka.cea={};shaka.cea.DummyCaptionDecoder=function(){};shaka.cea.DummyCaptionDecoder.prototype.extract=function(a,b){};shaka.cea.DummyCaptionDecoder.prototype.decode=function(){return[]};shaka.cea.DummyCaptionDecoder.prototype.clear=function(){};shaka.cea.DummyCaptionDecoder.prototype.getStreams=function(){return[]};shaka.cea.DummyCeaParser=function(){};shaka.cea.DummyCeaParser.prototype.init=function(a){};shaka.cea.DummyCeaParser.prototype.parse=function(a){return[]};shaka.util.BufferUtils=function(){};shaka.util.BufferUtils.equal=function(a,b){var c=shaka.util.BufferUtils;if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(c.unsafeGetArrayBuffer_(a)==c.unsafeGetArrayBuffer_(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;c=shaka.util.BufferUtils.toUint8(a);b=shaka.util.BufferUtils.toUint8(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0};
@@ -342,12 +341,12 @@ shaka.util.Timer.prototype.tickEvery=function(a){var b=this;this.stop();goog.DEB
342
341
  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/")};
343
342
  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")};
344
343
  shaka.util.Platform.isWebOS=function(){return shaka.util.Platform.userAgentContains_("Web0S")};shaka.util.Platform.isWebOS3=function(){return shaka.util.Platform.userAgentContains_("Web0S")&&shaka.util.Platform.userAgentContains_("Chrome/38.0.2125.122 Safari/537.36")};shaka.util.Platform.isWebOS4=function(){return!!navigator.userAgent.match(/webOS\/4/i)};shaka.util.Platform.isWebOS5=function(){return!!navigator.userAgent.match(/webOS\/5/i)};shaka.util.Platform.isChromecast=function(){return shaka.util.Platform.userAgentContains_("CrKey")};
345
- 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()};
344
+ 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")};
346
345
  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")};
347
346
  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")};
348
347
  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")};
349
348
  shaka.util.Platform.isMobile=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:shaka.util.Platform.isApple()&&1<navigator.maxTouchPoints};shaka.util.Platform.isMac=function(){return navigator.userAgentData&&navigator.userAgentData.platform?"macos"==navigator.userAgentData.platform.toLowerCase():navigator.platform.toLowerCase().includes("mac")};
350
- shaka.util.Platform.isWindows=function(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform.toLowerCase().includes("windows")};shaka.util.Platform.userAgentContains_=function(a){return(navigator.userAgent||"").includes(a)};
349
+ shaka.util.Platform.isWindows=function(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform.toLowerCase().includes("windows")};shaka.util.Platform.isAndroid=function(){return shaka.util.Platform.userAgentContains_("Android")};shaka.util.Platform.userAgentContains_=function(a){return(navigator.userAgent||"").includes(a)};
351
350
  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_};
352
351
  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};shaka.util.Platform.supportsSmoothCodecSwitching=function(){var a=shaka.util.Platform;return a.isTizen2()||a.isTizen3()||a.isTizen4()||a.isWebOS3()||a.isWebOS4()||a.isWebOS5()?!1:!0};
353
352
  shaka.util.Platform.isMediaKeysPolyfilled=function(){return window.shakaMediaKeysPolyfill?!0:!1};shaka.util.Platform.cacheExpirationTimer_=null;shaka.util.Platform.cachedMediaElement_=null;shaka.util.StreamUtils=function(){};
@@ -361,10 +360,10 @@ b=c.next())if(d.$jscomp$loop$prop$audioCodec$840=b.value,b=a.filter(function(f){
361
360
  shaka.util.StreamUtils.meetsRestrictions=function(a,b,c){var d=function(f,g,h){return f>=g&&f<=h},e=a.video;return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0};
362
361
  shaka.util.StreamUtils.applyRestrictions=function(a,b,c){var d=!1;a=$jscomp.makeIterator(a);for(var e=a.next();!e.done;e=a.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=shaka.util.StreamUtils.meetsRestrictions(e,b,c);f!=e.allowedByApplication&&(d=!0)}return d};
363
362
  shaka.util.StreamUtils.filterManifest=function(a,b){return $jscomp.asyncExecutePromiseGeneratorProgram(function(c){if(1==c.nextAddress)return c.yield(shaka.util.StreamUtils.filterManifestByMediaCapabilities(a,b,0<b.offlineSessionIds.length),2);shaka.util.StreamUtils.filterTextStreams_(b);return c.yield(shaka.util.StreamUtils.filterImageStreams_(b),0)})};
364
- shaka.util.StreamUtils.filterManifestByMediaCapabilities=function(a,b,c){var d,e,f,g,h,k,l,m;return $jscomp.asyncExecutePromiseGeneratorProgram(function(n){if(1==n.nextAddress)return goog.asserts.assert(navigator.mediaCapabilities,"MediaCapabilities should be valid."),n.yield(shaka.util.StreamUtils.getDecodingInfosForVariants(b.variants,c,!1,[]),2);d=null;a&&(e=a.getDrmInfo())&&(d=e.keySystem);f=shaka.util.ManifestParserUtils.ContentType;g=shaka.media.Capabilities;h=shaka.util.ManifestParserUtils;
365
- k=shaka.util.MimeUtils;l=shaka.util.StreamUtils;m=shaka.util.Platform.isXboxOne();b.variants=b.variants.filter(function(p){var q=p.video,r=q&&q.width||0,t=q&&q.height||0;if(m&&q&&(1920<r||1080<t)&&(q.codecs.includes("avc1.")||q.codecs.includes("avc3.")))return shaka.log.debug("Dropping variant - not compatible with platform",l.getVariantSummaryString_(p)),!1;if(q){r=l.getCorrectVideoCodecs_(q.codecs);if(q.codecs.includes(",")){t=q.codecs.split(",");r=h.guessCodecs(f.VIDEO,t);r=l.getCorrectVideoCodecs_(r);
366
- t=h.guessCodecs(f.AUDIO,t);t=l.getCorrectAudioCodecs_(t);var w=k.getFullOrConvertedType(q.mimeType,t,f.AUDIO);if(!g.isTypeSupported(w))return!1;r=[r,t].join()}t=k.getFullOrConvertedType(q.mimeType,r,f.VIDEO);if(!g.isTypeSupported(t))return!1;q.codecs=r}if(q=p.audio){r=l.getCorrectAudioCodecs_(q.codecs);t=k.getFullOrConvertedType(q.mimeType,r,f.AUDIO);if(!g.isTypeSupported(t))return!1;q.codecs=r}(q=p.decodingInfos.some(function(u){return!u.supported||d&&(u=u.keySystemAccess)&&u.keySystem!=d?!1:!0}))||
367
- shaka.log.debug("Dropping variant - not compatible with platform",l.getVariantSummaryString_(p));return q});n.jumpToEnd()})};
363
+ shaka.util.StreamUtils.filterManifestByMediaCapabilities=function(a,b,c){var d,e,f,g,h,k,l,m,n;return $jscomp.asyncExecutePromiseGeneratorProgram(function(p){if(1==p.nextAddress)return goog.asserts.assert(navigator.mediaCapabilities,"MediaCapabilities should be valid."),p.yield(shaka.util.StreamUtils.getDecodingInfosForVariants(b.variants,c,!1,[]),2);d=null;a&&(e=a.getDrmInfo())&&(d=e.keySystem);f=shaka.util.ManifestParserUtils.ContentType;g=shaka.media.Capabilities;h=shaka.util.ManifestParserUtils;
364
+ k=shaka.util.MimeUtils;l=shaka.util.StreamUtils;m=shaka.util.Platform.isXboxOne();n=shaka.util.Platform.isFirefox()&&shaka.util.Platform.isAndroid();b.variants=b.variants.filter(function(q){var r=q.video,t=r&&r.width||0,w=r&&r.height||0;if(m&&r&&(1920<t||1080<w)&&(r.codecs.includes("avc1.")||r.codecs.includes("avc3.")))return shaka.log.debug("Dropping variant - not compatible with platform",l.getVariantSummaryString_(q)),!1;if(r){t=l.getCorrectVideoCodecs_(r.codecs);if(r.codecs.includes(",")){w=r.codecs.split(",");
365
+ t=h.guessCodecs(f.VIDEO,w);t=l.getCorrectVideoCodecs_(t);w=h.guessCodecs(f.AUDIO,w);w=l.getCorrectAudioCodecs_(w);var u=k.getFullOrConvertedType(r.mimeType,w,f.AUDIO);if(!g.isTypeSupported(u))return!1;t=[t,w].join()}w=k.getFullOrConvertedType(r.mimeType,t,f.VIDEO);if(!g.isTypeSupported(w))return!1;r.codecs=t}r=q.audio;if(n&&r&&r.encrypted&&r.codecs.toLowerCase().includes("opus"))return shaka.log.debug("Dropping variant - not compatible with platform",l.getVariantSummaryString_(q)),!1;if(r){t=l.getCorrectAudioCodecs_(r.codecs);
366
+ w=k.getFullOrConvertedType(r.mimeType,t,f.AUDIO);if(!g.isTypeSupported(w))return!1;r.codecs=t}(r=q.decodingInfos.some(function(v){return!v.supported||d&&(v=v.keySystemAccess)&&v.keySystem!=d?!1:!0}))||shaka.log.debug("Dropping variant - not compatible with platform",l.getVariantSummaryString_(q));return r});p.jumpToEnd()})};
368
367
  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(",")+"}"};
369
368
  shaka.util.StreamUtils.getDecodingInfosForVariant_=function(a,b){var c,d,e,f;return $jscomp.asyncExecutePromiseGeneratorProgram(function(g){switch(g.nextAddress){case 1:c=shaka.util.StreamUtils.alphabeticalKeyOrderStringify_(b);g.setCatchFinallyBlocks(2);d=shaka.util.StreamUtils.decodingConfigCache_;if(d[c]){shaka.log.v2("Using cached results of mediaCapabilities.decodingInfo","for key",c);a.decodingInfos.push(d[c]);g.jumpTo(4);break}return g.yield(navigator.mediaCapabilities.decodingInfo(b),5);case 5:e=
370
369
  g.yieldResult,d[c]=e,a.decodingInfos.push(e);case 4:g.leaveTryBlock(0);break;case 2:f=g.enterCatchBlock(),shaka.log.info("MediaCapabilities.decodingInfo() failed.",JSON.stringify(b),f),g.jumpToEnd()}})};
@@ -1255,9 +1254,9 @@ null):new Date(b.getTime()+1E3*a);shaka.log.warning("No way to get playhead time
1255
1254
  shaka.Player.prototype.getPresentationStartTimeAsDate=function(){if(!this.isLive())return shaka.log.warning("getPresentationStartTimeAsDate is for live streams!"),null;if(this.manifest_){var a=this.manifest_.presentationTimeline.getPresentationStartTime();goog.asserts.assert(null!=a,"Presentation start time should not be null!");return new Date(1E3*a)}if(this.video_&&this.video_.getStartDate)return a=this.video_.getStartDate(),isNaN(a.getTime())?(shaka.log.warning("EXT-X-PROGRAM-DATETIME required to get presentation start time as Date!"),
1256
1255
  null):a;shaka.log.warning("No way to get presentation start time as Date!");return null};shaka.Player.prototype.getBufferedInfo=function(){if(this.loadMode_==shaka.Player.LoadMode.MEDIA_SOURCE)return this.mediaSourceEngine_.getBufferedInfo();var a={total:[],audio:[],video:[],text:[]};this.loadMode_==shaka.Player.LoadMode.SRC_EQUALS&&(a.total=shaka.media.TimeRangesUtils.getBufferedInfo(this.video_.buffered));return a};
1257
1256
  shaka.Player.prototype.getStats=function(){if(this.loadMode_!=shaka.Player.LoadMode.MEDIA_SOURCE&&this.loadMode_!=shaka.Player.LoadMode.SRC_EQUALS)return shaka.util.Stats.getEmptyBlob();this.updateStateHistory_();goog.asserts.assert(this.video_,"If we have stats, we should have video_");var a=this.video_,b=a.currentTime/a.duration;isNaN(b)||this.stats_.setCompletionPercent(Math.round(100*b));this.playhead_&&(this.stats_.setGapsJumped(this.playhead_.getGapsJumped()),this.stats_.setStallsDetected(this.playhead_.getStallsDetected()));
1258
- a.getVideoPlaybackQuality&&(b=a.getVideoPlaybackQuality(),this.stats_.setDroppedFrames(Number(b.droppedVideoFrames),Number(b.totalVideoFrames)),this.stats_.setCorruptedFrames(Number(b.corruptedVideoFrames)));b=this.drmEngine_?this.drmEngine_.getLicenseTime():NaN;this.stats_.setLicenseTime(b);if(this.loadMode_==shaka.Player.LoadMode.MEDIA_SOURCE){if(b=this.streamingEngine_.getCurrentVariant()){var c=(this.playRateController_?this.playRateController_.getRealRate():1)*b.bandwidth;this.stats_.setCurrentStreamBandwidth(c)}b&&
1259
- b.video&&this.stats_.setResolution(b.video.width||NaN,b.video.height||NaN);this.isLive()&&(b=this.getPresentationStartTimeAsDate().valueOf()+1E3*a.currentTime,b=(Date.now()-b)/1E3,this.stats_.setLiveLatency(b));this.manifest_&&this.manifest_.presentationTimeline&&(b=this.manifest_.presentationTimeline.getMaxSegmentDuration(),this.stats_.setMaxSegmentDuration(b));b=this.abrManager_.getBandwidthEstimate();this.stats_.setBandwidthEstimate(b)}this.loadMode_==shaka.Player.LoadMode.SRC_EQUALS&&this.stats_.setResolution(a.videoWidth||
1260
- NaN,a.videoHeight||NaN);return this.stats_.getBlob()};
1257
+ a.getVideoPlaybackQuality&&(b=a.getVideoPlaybackQuality(),this.stats_.setDroppedFrames(Number(b.droppedVideoFrames),Number(b.totalVideoFrames)),this.stats_.setCorruptedFrames(Number(b.corruptedVideoFrames)));b=this.drmEngine_?this.drmEngine_.getLicenseTime():NaN;this.stats_.setLicenseTime(b);if(this.loadMode_==shaka.Player.LoadMode.MEDIA_SOURCE){b=this.streamingEngine_.getCurrentVariant();var c=this.streamingEngine_.getCurrentTextStream();if(b){var d=this.playRateController_?this.playRateController_.getRealRate():
1258
+ 1,e=d*b.bandwidth;c&&c.bandwidth&&(e+=d*c.bandwidth);this.stats_.setCurrentStreamBandwidth(e)}b&&b.video&&this.stats_.setResolution(b.video.width||NaN,b.video.height||NaN);this.isLive()&&(b=this.getPresentationStartTimeAsDate().valueOf()+1E3*a.currentTime,b=(Date.now()-b)/1E3,this.stats_.setLiveLatency(b));this.manifest_&&this.manifest_.presentationTimeline&&(b=this.manifest_.presentationTimeline.getMaxSegmentDuration(),this.stats_.setMaxSegmentDuration(b));b=this.abrManager_.getBandwidthEstimate();
1259
+ this.stats_.setBandwidthEstimate(b)}this.loadMode_==shaka.Player.LoadMode.SRC_EQUALS&&this.stats_.setResolution(a.videoWidth||NaN,a.videoHeight||NaN);return this.stats_.getBlob()};
1261
1260
  shaka.Player.prototype.addTextTrackAsync=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,q,r,t,w,u,v,x,y;return $jscomp.asyncExecutePromiseGeneratorProgram(function(z){switch(z.nextAddress){case 1:if(h.loadMode_!=shaka.Player.LoadMode.MEDIA_SOURCE&&h.loadMode_!=shaka.Player.LoadMode.SRC_EQUALS)throw shaka.log.error("Must call load() and wait for it to resolve before adding text tracks."),new shaka.util.Error(shaka.util.Error.Severity.RECOVERABLE,shaka.util.Error.Category.PLAYER,shaka.util.Error.Code.CONTENT_NOT_LOADED);
1262
1261
  if(d){z.jumpTo(2);break}return z.yield(h.getTextMimetype_(a),3);case 3:d=z.yieldResult;case 2:k=[];h.adManager_&&(k=h.adManager_.getCuePoints());if(h.loadMode_!=shaka.Player.LoadMode.SRC_EQUALS){z.jumpTo(4);break}g&&(c="forced");return z.yield(h.addSrcTrackElement_(a,b,c,d,f||"",k),5);case 5:l=shaka.util.LanguageUtils;m=l.normalize(b);n=h.getTextTracks();if(p=n.find(function(A){return l.normalize(A.language)==m&&A.label==(f||"")&&A.kind==c}))return h.onTracksChanged_(),z.return(p);shaka.log.error("Cannot add this text when loaded with src=");
1263
1262
  throw new shaka.util.Error(shaka.util.Error.Severity.RECOVERABLE,shaka.util.Error.Category.TEXT,shaka.util.Error.Code.CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS);case 4:q=shaka.util.ManifestParserUtils.ContentType;r=h.video_.duration;h.manifest_&&(r=h.manifest_.presentationTimeline.getDuration());if(Infinity==r)throw new shaka.util.Error(shaka.util.Error.Severity.RECOVERABLE,shaka.util.Error.Category.MANIFEST,shaka.util.Error.Code.CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM);if(!k.length){z.jumpTo(6);break}goog.asserts.assert(h.networkingEngine_,
@@ -1348,7 +1347,7 @@ goog.exportProperty(shaka.Player.prototype,"isInProgress",shaka.Player.prototype
1348
1347
  goog.exportProperty(shaka.Player.prototype,"getMediaElement",shaka.Player.prototype.getMediaElement);goog.exportProperty(shaka.Player.prototype,"getManifestType",shaka.Player.prototype.getManifestType);goog.exportProperty(shaka.Player.prototype,"getLoadMode",shaka.Player.prototype.getLoadMode);goog.exportProperty(shaka.Player.prototype,"resetConfiguration",shaka.Player.prototype.resetConfiguration);goog.exportProperty(shaka.Player.prototype,"getBufferFullness",shaka.Player.prototype.getBufferFullness);
1349
1348
  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);goog.exportProperty(shaka.Player.prototype,"load",shaka.Player.prototype.load);goog.exportProperty(shaka.Player.prototype,"updateStartTime",shaka.Player.prototype.updateStartTime);
1350
1349
  goog.exportProperty(shaka.Player.prototype,"unload",shaka.Player.prototype.unload);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);
1351
- goog.exportProperty(shaka.Player,"setAdManagerFactory",shaka.Player.setAdManagerFactory);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.6.9-debug";
1350
+ goog.exportProperty(shaka.Player,"setAdManagerFactory",shaka.Player.setAdManagerFactory);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.6.10-debug";
1352
1351
  goog.exportProperty(shaka.Player,"version",shaka.Player.version);shaka.Deprecate.init(shaka.Player.version);shaka.Player.restrictedStatuses_=["output-restricted","internal-error"];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_++};
1353
1352
  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()};
1354
1353
  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()};
@@ -2837,7 +2836,7 @@ shaka.ui.Controls.prototype.isFullScreenSupported=function(){return document.ful
2837
2836
  shaka.ui.Controls.prototype.enterFullScreen_=function(){var a=this,b,c,d;return $jscomp.asyncExecutePromiseGeneratorProgram(function(e){switch(e.nextAddress){case 1:e.setCatchFinallyBlocks(2);if(!document.fullscreenEnabled){b=a.localVideo_;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();e.jumpTo(4);break}if(!document.pictureInPictureElement){e.jumpTo(5);break}return e.yield(document.exitPictureInPicture(),5);case 5:return c=a.config_.fullScreenElement,e.yield(c.requestFullscreen({navigationUI:"hide"}),
2838
2837
  7);case 7:if(!a.config_.forceLandscapeOnFullscreen||!screen.orientation){e.jumpTo(4);break}e.setCatchFinallyBlocks(9);return e.yield(screen.orientation.lock("landscape"),11);case 11:e.leaveTryBlock(4,2);break;case 9:e.enterCatchBlock(2);case 4:e.leaveTryBlock(0);break;case 2:d=e.enterCatchBlock(),a.dispatchEvent(new shaka.util.FakeEvent("error",(new Map).set("detail",d))),e.jumpToEnd()}})};
2839
2838
  shaka.ui.Controls.prototype.exitFullScreen_=function(){var a=this,b;return $jscomp.asyncExecutePromiseGeneratorProgram(function(c){if(!document.fullscreenEnabled)return b=a.localVideo_,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.jumpTo(0);screen.orientation&&screen.orientation.unlock();return c.yield(document.exitFullscreen(),0)})};
2840
- shaka.ui.Controls.prototype.toggleFullScreen=function(){var a=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(b){return a.isFullScreenEnabled()?b.yield(a.exitFullScreen_(),0):b.yield(a.enterFullScreen_(),0)})};shaka.ui.Controls.prototype.isPiPAllowed=function(){return"documentPictureInPicture"in window&&this.config_.preferDocumentPictureInPicture||document.pictureInPictureEnabled?!this.localVideo_.disablePictureInPicture:!1};
2839
+ shaka.ui.Controls.prototype.toggleFullScreen=function(){var a=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(b){return a.isFullScreenEnabled()?b.yield(a.exitFullScreen_(),0):b.yield(a.enterFullScreen_(),0)})};shaka.ui.Controls.prototype.isPiPAllowed=function(){return this.castProxy_.isCasting()?!1:"documentPictureInPicture"in window&&this.config_.preferDocumentPictureInPicture||document.pictureInPictureEnabled?!this.localVideo_.disablePictureInPicture:!1};
2841
2840
  shaka.ui.Controls.prototype.isPiPEnabled=function(){return"documentPictureInPicture"in window&&this.config_.preferDocumentPictureInPicture?!!window.documentPictureInPicture.window:!!document.pictureInPictureElement};
2842
2841
  shaka.ui.Controls.prototype.togglePiP=function(){var a=this,b,c;return $jscomp.asyncExecutePromiseGeneratorProgram(function(d){if(1==d.nextAddress)return d.setCatchFinallyBlocks(2),"documentPictureInPicture"in window&&a.config_.preferDocumentPictureInPicture?d.yield(a.toggleDocumentPictureInPicture_(),5):document.pictureInPictureElement?d.yield(document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),b=a.localVideo_,d.yield(b.requestPictureInPicture(),5));if(2!=d.nextAddress)return d.leaveTryBlock(0);
2843
2842
  c=d.enterCatchBlock();a.dispatchEvent(new shaka.util.FakeEvent("error",(new Map).set("detail",c)));d.jumpToEnd()})};
@@ -2961,13 +2960,12 @@ function(){c.updateAriaLabel_();c.updateIcon_()});this.eventManager.listen(this.
2961
2960
  shaka.ui.MuteButton.prototype.updateIcon_=function(){var a=shaka.ui.Enums.MaterialDesignIcons;a=this.ad?this.ad.isMuted()?a.UNMUTE:a.MUTE:this.video.muted?a.UNMUTE:a.MUTE;this.button_.textContent=a};goog.exportSymbol("shaka.ui.MuteButton",shaka.ui.MuteButton);shaka.ui.MuteButton.Factory=function(){};shaka.ui.MuteButton.Factory.prototype.create=function(a,b){return new shaka.ui.MuteButton(a,b)};shaka.ui.Controls.registerElement("mute",new shaka.ui.MuteButton.Factory);shaka.ui.PipButton=function(a,b){shaka.ui.Element.call(this,a,b);var c=this;this.localVideo_=this.controls.getLocalVideo();this.videoContainer_=this.controls.getVideoContainer();a=shaka.ui.Locales.Ids;this.pipButton_=shaka.util.Dom.createButton();this.pipButton_.classList.add("shaka-pip-button");this.pipButton_.classList.add("shaka-tooltip");this.pipIcon_=shaka.util.Dom.createHTMLElement("i");this.pipIcon_.classList.add("material-icons-round");this.pipIcon_.textContent=shaka.ui.Enums.MaterialDesignIcons.PIP;
2962
2961
  this.pipButton_.appendChild(this.pipIcon_);b=shaka.util.Dom.createHTMLElement("label");b.classList.add("shaka-overflow-button-label");b.classList.add("shaka-overflow-menu-only");this.pipNameSpan_=shaka.util.Dom.createHTMLElement("span");this.pipNameSpan_.textContent=this.localization.resolve(a.PICTURE_IN_PICTURE);b.appendChild(this.pipNameSpan_);this.currentPipState_=shaka.util.Dom.createHTMLElement("span");this.currentPipState_.classList.add("shaka-current-selection-span");b.appendChild(this.currentPipState_);
2963
2962
  this.pipButton_.appendChild(b);this.updateLocalizedStrings_();this.parent.appendChild(this.pipButton_);this.controls.isPiPAllowed()||shaka.ui.Utils.setDisplay(this.pipButton_,!1);this.eventManager.listen(this.localization,shaka.ui.Localization.LOCALE_UPDATED,function(){c.updateLocalizedStrings_()});this.eventManager.listen(this.localization,shaka.ui.Localization.LOCALE_CHANGED,function(){c.updateLocalizedStrings_()});this.eventManager.listen(this.pipButton_,"click",function(){c.controls.togglePiP()});
2964
- this.eventManager.listen(this.localVideo_,"enterpictureinpicture",function(){c.onEnterPictureInPicture_()});this.eventManager.listen(this.localVideo_,"leavepictureinpicture",function(){c.onLeavePictureInPicture_()});this.eventManager.listen(this.controls,"caststatuschanged",function(d){c.onCastStatusChange_(d)});this.eventManager.listen(this.player,"trackschanged",function(){c.onTracksChanged_()});"documentPictureInPicture"in window&&this.eventManager.listen(window.documentPictureInPicture,"enter",
2965
- function(d){c.onEnterPictureInPicture_();c.eventManager.listenOnce(d.window,"pagehide",function(){c.onLeavePictureInPicture_()})})};$jscomp.inherits(shaka.ui.PipButton,shaka.ui.Element);shaka.ui.PipButton.prototype.onEnterPictureInPicture_=function(){var a=shaka.ui.Locales.Ids;this.pipIcon_.textContent=shaka.ui.Enums.MaterialDesignIcons.EXIT_PIP;this.pipButton_.ariaLabel=this.localization.resolve(a.EXIT_PICTURE_IN_PICTURE);this.currentPipState_.textContent=this.localization.resolve(a.ON)};
2963
+ this.eventManager.listen(this.localVideo_,"enterpictureinpicture",function(){c.onEnterPictureInPicture_()});this.eventManager.listen(this.localVideo_,"leavepictureinpicture",function(){c.onLeavePictureInPicture_()});this.eventManager.listen(this.controls,"caststatuschanged",function(){c.onTracksChanged_()});this.eventManager.listen(this.player,"trackschanged",function(){c.onTracksChanged_()});"documentPictureInPicture"in window&&this.eventManager.listen(window.documentPictureInPicture,"enter",function(d){c.onEnterPictureInPicture_();
2964
+ c.eventManager.listenOnce(d.window,"pagehide",function(){c.onLeavePictureInPicture_()})})};$jscomp.inherits(shaka.ui.PipButton,shaka.ui.Element);shaka.ui.PipButton.prototype.onEnterPictureInPicture_=function(){var a=shaka.ui.Locales.Ids;this.pipIcon_.textContent=shaka.ui.Enums.MaterialDesignIcons.EXIT_PIP;this.pipButton_.ariaLabel=this.localization.resolve(a.EXIT_PICTURE_IN_PICTURE);this.currentPipState_.textContent=this.localization.resolve(a.ON)};
2966
2965
  shaka.ui.PipButton.prototype.onLeavePictureInPicture_=function(){var a=shaka.ui.Locales.Ids;this.pipIcon_.textContent=shaka.ui.Enums.MaterialDesignIcons.PIP;this.pipButton_.ariaLabel=this.localization.resolve(a.ENTER_PICTURE_IN_PICTURE);this.currentPipState_.textContent=this.localization.resolve(a.OFF)};
2967
2966
  shaka.ui.PipButton.prototype.updateLocalizedStrings_=function(){var a=shaka.ui.Locales.Ids;this.pipNameSpan_.textContent=this.localization.resolve(a.PICTURE_IN_PICTURE);var b=this.controls.isPiPEnabled();this.pipButton_.ariaLabel=this.localization.resolve(b?a.EXIT_PICTURE_IN_PICTURE:a.ENTER_PICTURE_IN_PICTURE);this.currentPipState_.textContent=this.localization.resolve(b?a.ON:a.OFF)};
2968
- shaka.ui.PipButton.prototype.onCastStatusChange_=function(a){a.newStatus?this.controls.isPiPAllowed()&&shaka.ui.Utils.setDisplay(this.pipButton_,!1):this.controls.isPiPAllowed()&&shaka.ui.Utils.setDisplay(this.pipButton_,!0)};
2969
- shaka.ui.PipButton.prototype.onTracksChanged_=function(){var a=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(b){if(!a.controls.isPiPAllowed())return shaka.ui.Utils.setDisplay(a.pipButton_,!1),b.jumpTo(0);if(!a.player||!a.player.isAudioOnly())return shaka.ui.Utils.setDisplay(a.pipButton_,!0),b.jumpTo(0);shaka.ui.Utils.setDisplay(a.pipButton_,!1);return a.controls.isPiPEnabled()?b.yield(a.controls.togglePiP(),0):b.jumpTo(0)})};goog.exportSymbol("shaka.ui.PipButton",shaka.ui.PipButton);
2970
- shaka.ui.PipButton.Factory=function(){};shaka.ui.PipButton.Factory.prototype.create=function(a,b){return new shaka.ui.PipButton(a,b)};shaka.ui.OverflowMenu.registerElement("picture_in_picture",new shaka.ui.PipButton.Factory);shaka.ui.Controls.registerElement("picture_in_picture",new shaka.ui.PipButton.Factory);shaka.ui.ContextMenu.registerElement("picture_in_picture",new shaka.ui.PipButton.Factory);shaka.ui.PlaybackRateSelection=function(a,b){shaka.ui.SettingsMenu.call(this,a,b,shaka.ui.Enums.MaterialDesignIcons.PLAYBACK_RATE);var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");this.eventManager.listen(this.localization,shaka.ui.Localization.LOCALE_UPDATED,function(){c.updateLocalizedStrings_()});this.eventManager.listen(this.localization,shaka.ui.Localization.LOCALE_CHANGED,function(){c.updateLocalizedStrings_()});
2967
+ shaka.ui.PipButton.prototype.onTracksChanged_=function(){var a=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(b){if(!a.controls.isPiPAllowed())return shaka.ui.Utils.setDisplay(a.pipButton_,!1),a.controls.isPiPEnabled()?b.yield(a.controls.togglePiP(),0):b.jumpTo(0);if(!a.player||!a.player.isAudioOnly())return shaka.ui.Utils.setDisplay(a.pipButton_,!0),b.jumpTo(0);shaka.ui.Utils.setDisplay(a.pipButton_,!1);return a.controls.isPiPEnabled()?b.yield(a.controls.togglePiP(),0):b.jumpTo(0)})};
2968
+ goog.exportSymbol("shaka.ui.PipButton",shaka.ui.PipButton);shaka.ui.PipButton.Factory=function(){};shaka.ui.PipButton.Factory.prototype.create=function(a,b){return new shaka.ui.PipButton(a,b)};shaka.ui.OverflowMenu.registerElement("picture_in_picture",new shaka.ui.PipButton.Factory);shaka.ui.Controls.registerElement("picture_in_picture",new shaka.ui.PipButton.Factory);shaka.ui.ContextMenu.registerElement("picture_in_picture",new shaka.ui.PipButton.Factory);shaka.ui.PlaybackRateSelection=function(a,b){shaka.ui.SettingsMenu.call(this,a,b,shaka.ui.Enums.MaterialDesignIcons.PLAYBACK_RATE);var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");this.eventManager.listen(this.localization,shaka.ui.Localization.LOCALE_UPDATED,function(){c.updateLocalizedStrings_()});this.eventManager.listen(this.localization,shaka.ui.Localization.LOCALE_CHANGED,function(){c.updateLocalizedStrings_()});
2971
2969
  this.eventManager.listen(this.player,"loaded",function(){c.updatePlaybackRateSelection_(c.player.getPlaybackRate())});this.eventManager.listen(this.player,"ratechange",function(){c.updatePlaybackRateSelection_(c.player.getPlaybackRate())});this.playbackRates_=new Map(this.controls.getConfig().playbackRates.map(function(d){return[d+"x",d]}));this.updateLocalizedStrings_();this.addPlaybackRates_();this.updatePlaybackRateSelection_(this.player.getPlaybackRate())};
2972
2970
  $jscomp.inherits(shaka.ui.PlaybackRateSelection,shaka.ui.SettingsMenu);shaka.ui.PlaybackRateSelection.prototype.updateLocalizedStrings_=function(){var a=shaka.ui.Locales.Ids;this.backButton.ariaLabel=this.localization.resolve(a.BACK);this.button.ariaLabel=this.localization.resolve(a.PLAYBACK_RATE);this.nameSpan.textContent=this.localization.resolve(a.PLAYBACK_RATE);this.backSpan.textContent=this.localization.resolve(a.PLAYBACK_RATE)};
2973
2971
  shaka.ui.PlaybackRateSelection.prototype.updatePlaybackRateSelection_=function(a){var b=this,c=shaka.ui.Utils.getDescendantIfExists(this.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(this.menu.querySelectorAll("span")).find(function(e){return b.playbackRates_.get(e.textContent)==a}))d=c.parentElement,d.appendChild(shaka.ui.Utils.checkmarkIcon()),