shaka-player 4.11.20 → 4.11.21

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.
@@ -355,9 +355,9 @@ a.insert("tr",new Map([["AD_DURATION","Reklam s\u00fcresi"],["AD_PROGRESS","[AD_
355
355
  ["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","\u5168\u87a2\u5e55"],["LANGUAGE","\u8a9e\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u74b0\u64ad\u653e"],
356
356
  ["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"],["QUALITY","\u97f3\u8cea"],["RECENTER_VR","\u91cd\u65b0\u7f6e\u4e2d"],["REPLAY","\u91cd\u64ad"],["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND",
357
357
  "\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["STATISTICS","\u7d71\u8a08\u8cc7\u6599"],["SUBTITLE_FORCED","\u5f37\u5236\u986f\u793a"],["SURROUND","\u74b0\u5834\u97f3\u6548"],["TOGGLE_STEREOSCOPIC","\u5207\u63db\u7acb\u9ad4\u5f71\u50cf"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]))};
358
- shaka.ui.Locales.Ids={CAST:"CAST",ON:"ON",AD_TIME:"AD_TIME",SEEK:"SEEK",LOOP:"LOOP",QUALITY:"QUALITY",REPLAY:"REPLAY",REWIND:"REWIND",MULTIPLE_LANGUAGES:"MULTIPLE_LANGUAGES",RESOLUTION:"RESOLUTION",OFF:"OFF",DOWNLOAD_VIDEO_FRAME:"DOWNLOAD_VIDEO_FRAME",CAPTIONS:"CAPTIONS",FULL_SCREEN:"FULL_SCREEN",PLAY:"PLAY",EXIT_PICTURE_IN_PICTURE:"EXIT_PICTURE_IN_PICTURE",LANGUAGE:"LANGUAGE",SUBTITLE_FORCED:"SUBTITLE_FORCED",NOT_APPLICABLE:"NOT_APPLICABLE",EXIT_LOOP_MODE:"EXIT_LOOP_MODE",RECENTER_VR:"RECENTER_VR",
359
- STATISTICS:"STATISTICS",FAST_FORWARD:"FAST_FORWARD",AUTO_QUALITY:"AUTO_QUALITY",MUTE:"MUTE",PAUSE:"PAUSE",PLAYBACK_RATE:"PLAYBACK_RATE",MORE_SETTINGS:"MORE_SETTINGS",UNMUTE:"UNMUTE",TOGGLE_STEREOSCOPIC:"TOGGLE_STEREOSCOPIC",CHAPTERS:"CHAPTERS",ENTER_LOOP_MODE:"ENTER_LOOP_MODE",AD_PROGRESS:"AD_PROGRESS",AD_STATISTICS:"AD_STATISTICS",VOLUME:"VOLUME",ENTER_PICTURE_IN_PICTURE:"ENTER_PICTURE_IN_PICTURE",EXIT_FULL_SCREEN:"EXIT_FULL_SCREEN",BACK:"BACK",AIRPLAY:"AIRPLAY",PICTURE_IN_PICTURE:"PICTURE_IN_PICTURE",
360
- SKIP_AD:"SKIP_AD",UNDETERMINED_LANGUAGE:"UNDETERMINED_LANGUAGE",SKIP_TO_LIVE:"SKIP_TO_LIVE",AD_DURATION:"AD_DURATION",LIVE:"LIVE",UNRECOGNIZED_LANGUAGE:"UNRECOGNIZED_LANGUAGE",SURROUND:"SURROUND"};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)};
358
+ shaka.ui.Locales.Ids={RECENTER_VR:"RECENTER_VR",AD_PROGRESS:"AD_PROGRESS",ENTER_LOOP_MODE:"ENTER_LOOP_MODE",LIVE:"LIVE",PICTURE_IN_PICTURE:"PICTURE_IN_PICTURE",SUBTITLE_FORCED:"SUBTITLE_FORCED",FAST_FORWARD:"FAST_FORWARD",CHAPTERS:"CHAPTERS",TOGGLE_STEREOSCOPIC:"TOGGLE_STEREOSCOPIC",AD_DURATION:"AD_DURATION",DOWNLOAD_VIDEO_FRAME:"DOWNLOAD_VIDEO_FRAME",CAPTIONS:"CAPTIONS",AIRPLAY:"AIRPLAY",EXIT_PICTURE_IN_PICTURE:"EXIT_PICTURE_IN_PICTURE",SURROUND:"SURROUND",SKIP_TO_LIVE:"SKIP_TO_LIVE",SEEK:"SEEK",
359
+ AD_STATISTICS:"AD_STATISTICS",PLAY:"PLAY",MORE_SETTINGS:"MORE_SETTINGS",MUTE:"MUTE",UNDETERMINED_LANGUAGE:"UNDETERMINED_LANGUAGE",UNMUTE:"UNMUTE",LANGUAGE:"LANGUAGE",LOOP:"LOOP",NOT_APPLICABLE:"NOT_APPLICABLE",RESOLUTION:"RESOLUTION",BACK:"BACK",REWIND:"REWIND",ON:"ON",EXIT_LOOP_MODE:"EXIT_LOOP_MODE",STATISTICS:"STATISTICS",VOLUME:"VOLUME",QUALITY:"QUALITY",EXIT_FULL_SCREEN:"EXIT_FULL_SCREEN",PAUSE:"PAUSE",UNRECOGNIZED_LANGUAGE:"UNRECOGNIZED_LANGUAGE",REPLAY:"REPLAY",OFF:"OFF",AUTO_QUALITY:"AUTO_QUALITY",
360
+ PLAYBACK_RATE:"PLAYBACK_RATE",SKIP_AD:"SKIP_AD",AD_TIME:"AD_TIME",ENTER_PICTURE_IN_PICTURE:"ENTER_PICTURE_IN_PICTURE",CAST:"CAST",MULTIPLE_LANGUAGES:"MULTIPLE_LANGUAGES",FULL_SCREEN:"FULL_SCREEN"};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)};
361
361
  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)};
362
362
  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)};
363
363
  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()}};
@@ -892,10 +892,10 @@ shaka.media.MediaSourceEngine.prototype.clear=function(a){var b=this,c;return $j
892
892
  null),0):d.jumpTo(0)})};shaka.media.MediaSourceEngine.prototype.resetCaptionParser=function(){this.captionParser_&&this.captionParser_.reset()};
893
893
  shaka.media.MediaSourceEngine.prototype.flush=function(a){var b=this,c;return $jscomp.asyncExecutePromiseGeneratorProgram(function(d){return 1==d.nextAddress?(c=shaka.util.ManifestParserUtils.ContentType,a==c.TEXT?d.return():d.yield(b.enqueueOperation_(a,function(){return b.flush_(a)},null),2)):b.needSplitMuxedContent_?d.yield(b.enqueueOperation_(c.AUDIO,function(){return b.flush_(c.AUDIO)},null),0):d.jumpTo(0)})};
894
894
  shaka.media.MediaSourceEngine.prototype.setStreamProperties=function(a,b,c,d,e,f,g,h){var k=this,l,m,n;return $jscomp.asyncExecutePromiseGeneratorProgram(function(p){if(1==p.nextAddress){l=shaka.util.ManifestParserUtils.ContentType;if(a==l.TEXT)return e||k.textEngine_.setTimestampOffset(b),k.textEngine_.setAppendWindow(c,d),p.return();m=[];return p.yield(k.codecSwitchIfNecessary_(a,f,g,h),2)}n=p.yieldResult;n||(m.push(k.enqueueOperation_(a,function(){return k.abort_(a)},null)),k.needSplitMuxedContent_&&
895
- m.push(k.enqueueOperation_(l.AUDIO,function(){return k.abort_(l.AUDIO)},null)));e||(m.push(k.enqueueOperation_(a,function(){return k.setTimestampOffset_(a,b)},null)),k.needSplitMuxedContent_&&m.push(k.enqueueOperation_(l.AUDIO,function(){return k.setTimestampOffset_(l.AUDIO,b)},null)));m.push(k.enqueueOperation_(a,function(){return k.setAppendWindow_(a,c,d)},null));k.needSplitMuxedContent_&&m.push(k.enqueueOperation_(l.AUDIO,function(){return k.setAppendWindow_(l.AUDIO,c,d)},null));return p.yield(Promise.all(m),
896
- 0)})};
897
- shaka.media.MediaSourceEngine.prototype.resync=function(a,b){var c=this,d,e;return $jscomp.asyncExecutePromiseGeneratorProgram(function(f){if(1==f.nextAddress){d=shaka.util.ManifestParserUtils.ContentType;if(a==d.TEXT)return f.return();a==d.VIDEO&&(c.textSequenceModeOffset_=new shaka.util.PublicPromise);if(!c.sequenceMode_||(e=c.bufferEnd(a))&&.1>Math.abs(e-b))return f.return();c.enqueueOperation_(a,function(){return c.abort_(a)},null);c.needSplitMuxedContent_&&c.enqueueOperation_(d.AUDIO,function(){return c.abort_(d.AUDIO)},null);
898
- return f.yield(c.enqueueOperation_(a,function(){return c.setTimestampOffset_(a,b)},null),2)}return c.needSplitMuxedContent_?f.yield(c.enqueueOperation_(d.AUDIO,function(){return c.setTimestampOffset_(d.AUDIO,b)},null),0):f.jumpTo(0)})};
895
+ m.push(k.enqueueOperation_(l.AUDIO,function(){return k.abort_(l.AUDIO)},null)));e||(m.push(k.enqueueOperation_(a,function(){return k.setTimestampOffset_(a,b)},null)),k.needSplitMuxedContent_&&m.push(k.enqueueOperation_(l.AUDIO,function(){return k.setTimestampOffset_(l.AUDIO,b)},null)));if(0!=c||Infinity!=d)m.push(k.enqueueOperation_(a,function(){return k.setAppendWindow_(a,c,d)},null)),k.needSplitMuxedContent_&&m.push(k.enqueueOperation_(l.AUDIO,function(){return k.setAppendWindow_(l.AUDIO,c,d)},
896
+ null));return m.length?p.yield(Promise.all(m),0):p.jumpTo(0)})};
897
+ shaka.media.MediaSourceEngine.prototype.resync=function(a,b){var c=this,d,e;return $jscomp.asyncExecutePromiseGeneratorProgram(function(f){if(1==f.nextAddress){d=shaka.util.ManifestParserUtils.ContentType;if(a==d.TEXT)return f.return();a==d.VIDEO&&(c.textSequenceModeOffset_=new shaka.util.PublicPromise);if(!c.sequenceMode_||(e=c.bufferEnd(a))&&.1>Math.abs(e-b))return f.return();c.enqueueOperation_(a,function(){return c.abort_(a)},null);c.needSplitMuxedContent_&&c.enqueueOperation_(d.AUDIO,function(){return c.abort_(d.AUDIO)},
898
+ null);return f.yield(c.enqueueOperation_(a,function(){return c.setTimestampOffset_(a,b)},null),2)}return c.needSplitMuxedContent_?f.yield(c.enqueueOperation_(d.AUDIO,function(){return c.setTimestampOffset_(d.AUDIO,b)},null),0):f.jumpTo(0)})};
899
899
  shaka.media.MediaSourceEngine.prototype.endOfStream=function(a){var b=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(c){return c.yield(b.enqueueBlockingOperation_(function(){b.ended()||b.closed()||(a?b.mediaSource_.endOfStream(a):b.mediaSource_.endOfStream())}),0)})};
900
900
  shaka.media.MediaSourceEngine.prototype.setDuration=function(a){var b=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(c){return c.yield(b.enqueueBlockingOperation_(function(){if(a<b.mediaSource_.duration)for(var d in b.sourceBuffers_){var e={start:function(){},p:new shaka.util.PublicPromise,uri:null};b.queues_[d].unshift(e)}b.mediaSource_.duration=a;b.lastDuration_=a}),0)})};shaka.media.MediaSourceEngine.prototype.getDuration=function(){return this.mediaSource_.duration};
901
901
  shaka.media.MediaSourceEngine.prototype.append_=function(a,b,c){a==shaka.util.ManifestParserUtils.ContentType.VIDEO&&this.lcevcDec_&&this.lcevcDec_.appendBuffer(b,c);this.sourceBuffers_[a].appendBuffer(b)};shaka.media.MediaSourceEngine.prototype.remove_=function(a,b,c){if(c<=b)this.onUpdateEnd_(a);else this.sourceBuffers_[a].remove(b,c)};
@@ -959,10 +959,10 @@ shaka.media.StallDetector.prototype.onStall=function(a){this.onStall_=a};shaka.m
959
959
  shaka.media.StallDetector.prototype.poll=function(){var a=this.implementation_,b=a.shouldBeMakingProgress(),c=a.getPresentationSeconds(),d=a.getWallSeconds();if(this.value_!=c||this.wasMakingProgress_!=b)this.lastUpdateSeconds_=d,this.value_=c,this.wasMakingProgress_=b,this.didJump_=!1;c=d-this.lastUpdateSeconds_;if(b=c>=this.stallThresholdSeconds_&&b&&!this.didJump_)this.onStall_(this.value_,c),this.didJump_=!0,this.value_=a.getPresentationSeconds(),this.stallsDetected_++,this.onEvent_(new shaka.util.FakeEvent(shaka.util.FakeEvent.EventName.StallDetected));
960
960
  return b};shaka.media.StallDetector.Implementation=function(){};shaka.media.StallDetector.Implementation.prototype.shouldBeMakingProgress=function(){};shaka.media.StallDetector.Implementation.prototype.getPresentationSeconds=function(){};shaka.media.StallDetector.Implementation.prototype.getWallSeconds=function(){};shaka.media.StallDetector.MediaElementImplementation=function(a){this.mediaElement_=a};
961
961
  shaka.media.StallDetector.MediaElementImplementation.prototype.shouldBeMakingProgress=function(){return this.mediaElement_.paused||0==this.mediaElement_.playbackRate||0==this.mediaElement_.buffered.length?!1:shaka.media.StallDetector.MediaElementImplementation.hasContentFor_(this.mediaElement_.buffered,this.mediaElement_.currentTime)};shaka.media.StallDetector.MediaElementImplementation.prototype.getPresentationSeconds=function(){return this.mediaElement_.currentTime};
962
- shaka.media.StallDetector.MediaElementImplementation.prototype.getWallSeconds=function(){return Date.now()/1E3};shaka.media.StallDetector.MediaElementImplementation.hasContentFor_=function(a,b){a=$jscomp.makeIterator(shaka.media.TimeRangesUtils.getBufferedInfo(a));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5))return!0;return!1};shaka.media.GapJumpingController=function(a,b,c,d,e){var f=this;this.onEvent_=e;this.video_=a;this.timeline_=b;this.config_=c;this.eventManager_=new shaka.util.EventManager;this.seekingEventReceived_=!1;this.prevReadyState_=a.readyState;this.gapsJumped_=this.startTime_=0;this.stallDetector_=d;this.hadSegmentAppended_=!1;this.eventManager_.listen(a,"waiting",function(){return f.onPollGapJump_()});this.gapJumpTimer_=(new shaka.util.Timer(function(){f.onPollGapJump_()})).tickEvery(this.config_.gapJumpTimerTime)};
962
+ shaka.media.StallDetector.MediaElementImplementation.prototype.getWallSeconds=function(){return Date.now()/1E3};shaka.media.StallDetector.MediaElementImplementation.hasContentFor_=function(a,b){a=$jscomp.makeIterator(shaka.media.TimeRangesUtils.getBufferedInfo(a));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5))return!0;return!1};shaka.media.GapJumpingController=function(a,b,c,d,e){var f=this;this.onEvent_=e;this.video_=a;this.timeline_=b;this.config_=c;this.eventManager_=new shaka.util.EventManager;this.seekingEventReceived_=this.started_=!1;this.prevReadyState_=a.readyState;this.gapsJumped_=this.startTime_=0;this.stallDetector_=d;this.hadSegmentAppended_=!1;this.eventManager_.listen(a,"waiting",function(){return f.onPollGapJump_()});this.gapJumpTimer_=new shaka.util.Timer(function(){f.onPollGapJump_()})};
963
963
  shaka.media.GapJumpingController.prototype.release=function(){this.eventManager_&&(this.eventManager_.release(),this.eventManager_=null);null!=this.gapJumpTimer_&&(this.gapJumpTimer_.stop(),this.gapJumpTimer_=null);this.stallDetector_&&(this.stallDetector_.release(),this.stallDetector_=null);this.video_=this.timeline_=this.onEvent_=null};shaka.media.GapJumpingController.prototype.onSegmentAppended=function(){this.hadSegmentAppended_=!0;this.onPollGapJump_()};
964
- shaka.media.GapJumpingController.prototype.onStarted=function(a){this.video_.seeking&&!this.seekingEventReceived_&&(this.seekingEventReceived_=!0,this.startTime_=a)};shaka.media.GapJumpingController.prototype.onSeeking=function(){this.seekingEventReceived_=!0;this.hadSegmentAppended_=!1};shaka.media.GapJumpingController.prototype.getGapsJumped=function(){return this.gapsJumped_};
965
- shaka.media.GapJumpingController.prototype.onPollGapJump_=function(){if(0!=this.video_.readyState){if(this.video_.seeking){if(!this.seekingEventReceived_)return}else this.seekingEventReceived_=!1;if(!this.video_.paused||this.video_.currentTime==this.startTime_&&(this.video_.autoplay||this.video_.currentTime!=this.startTime_))if(this.video_.readyState!=this.prevReadyState_&&(this.prevReadyState_=this.video_.readyState),!this.stallDetector_||!this.stallDetector_.poll()){var a=this.video_.currentTime,
964
+ shaka.media.GapJumpingController.prototype.onStarted=function(a){this.started_=!0;this.video_.seeking&&!this.seekingEventReceived_&&(this.seekingEventReceived_=!0,this.startTime_=a);this.gapJumpTimer_&&this.gapJumpTimer_.tickEvery(this.config_.gapJumpTimerTime);this.onPollGapJump_()};shaka.media.GapJumpingController.prototype.onSeeking=function(){this.seekingEventReceived_=!0;this.hadSegmentAppended_=!1;this.onPollGapJump_()};shaka.media.GapJumpingController.prototype.getGapsJumped=function(){return this.gapsJumped_};
965
+ shaka.media.GapJumpingController.prototype.onPollGapJump_=function(){if(0!=this.video_.readyState&&this.started_){if(this.video_.seeking){if(!this.seekingEventReceived_)return}else this.seekingEventReceived_=!1;if(!this.video_.paused||this.video_.currentTime==this.startTime_&&(this.video_.autoplay||this.video_.currentTime!=this.startTime_))if(this.video_.readyState!=this.prevReadyState_&&(this.prevReadyState_=this.video_.readyState),!this.stallDetector_||!this.stallDetector_.poll()){var a=this.video_.currentTime,
966
966
  b=this.video_.buffered,c=shaka.media.TimeRangesUtils.getGapIndex(b,a,this.config_.gapDetectionThreshold);if(null!=c&&(0!=c||this.hadSegmentAppended_)){var d=b.start(c);if(shaka.util.Platform.isLegacyEdge()||shaka.util.Platform.isXboxOne()||shaka.util.Platform.isTizen())d=Math.ceil(100*(d+this.config_.gapPadding))/100;var e=this.timeline_.getSeekRangeEnd();d>=e||(e=d-a,e<shaka.media.GapJumpingController.BROWSER_GAP_TOLERANCE||(0==c?shaka.log.info("Jumping forward",e,"seconds because of gap before start time of",
967
967
  d):shaka.log.info("Jumping forward",e,"seconds because of gap starting at",b.end(c-1),"and ending at",d),this.video_.currentTime=d,a==this.startTime_&&(this.startTime_=d),this.gapsJumped_++,this.onEvent_(new shaka.util.FakeEvent(shaka.util.FakeEvent.EventName.GapJumped))))}}}};shaka.media.GapJumpingController.BROWSER_GAP_TOLERANCE=.001;shaka.util.MediaReadyState=function(){};shaka.util.MediaReadyState.waitForReadyState=function(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=shaka.util.MediaReadyState.READY_STATES_TO_EVENT_NAMES_.value().get(b),c.listenOnce(a,b,d))};
968
968
  shaka.util.MediaReadyState.READY_STATES_TO_EVENT_NAMES_=new shaka.util.Lazy(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});shaka.media.VideoWrapper=function(a,b,c,d){var e=this;this.video_=a;this.onSeek_=b;this.onStarted_=c;this.startTime_=null;this.getStartTime_=function(){null==e.startTime_&&(e.startTime_=d());return e.startTime_};this.started_=!1;this.eventManager_=new shaka.util.EventManager;this.mover_=new shaka.media.VideoWrapper.PlayheadMover(a,10);shaka.util.MediaReadyState.waitForReadyState(this.video_,HTMLMediaElement.HAVE_METADATA,this.eventManager_,function(){e.setStartTime_(e.getStartTime_())})};
@@ -1635,7 +1635,7 @@ goog.exportProperty(shaka.Player.prototype,"getMediaElement",shaka.Player.protot
1635
1635
  goog.exportProperty(shaka.Player.prototype,"getNonDefaultConfiguration",shaka.Player.prototype.getNonDefaultConfiguration);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,"destroyAllPreloads",shaka.Player.prototype.destroyAllPreloads);
1636
1636
  goog.exportProperty(shaka.Player.prototype,"preload",shaka.Player.prototype.preload);goog.exportProperty(shaka.Player.prototype,"detachAndSavePreload",shaka.Player.prototype.detachAndSavePreload);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);
1637
1637
  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);
1638
- 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.11.20-debug";
1638
+ 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.11.21-debug";
1639
1639
  goog.exportProperty(shaka.Player,"version",shaka.Player.version);shaka.Deprecate.init(shaka.Player.version);shaka.Player.supportPlugins_={};shaka.Player.adManagerFactory_=null;shaka.Player.TextTrackLabel="Shaka Player TextTrack";shaka.ads={};shaka.ads.AdsStats=function(){this.loadTimes_=[];this.errors_=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_++};shaka.ads.AdsStats.prototype.incrementErrors=function(){this.errors_++};
1640
1640
  shaka.ads.AdsStats.prototype.getAverageLoadTime_=function(){return this.loadTimes_.length?this.loadTimes_.reduce(function(a,b){return a+b},0)/this.loadTimes_.length:0};shaka.ads.AdsStats.prototype.getBlob=function(){return{loadTimes:this.loadTimes_,averageLoadTime:this.getAverageLoadTime_(),started:this.started_,playedCompletely:this.playedCompletely_,skipped:this.skipped_,errors:this.errors_}};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.needsSkipUI=function(){return!1};
1641
1641
  shaka.ads.ClientSideAd.prototype.isClientRendering=function(){return!0};shaka.ads.ClientSideAd.prototype.getDuration=function(){return this.ad_.getDuration()};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_};
@@ -2003,8 +2003,8 @@ shaka.cea.DtvccPacketBuilder.DTVCC_PACKET_DATA=2;shaka.cea.DtvccPacketBuilder.DT
2003
2003
  shaka.cea.Cea708Service.prototype.handleCea708ControlCode=function(a){var b=a.readByte(),c=b.value;b=b.pts;if(c===shaka.cea.Cea708Service.EXT_CEA708_CTRL_CODE_BYTE1){var d=a.readByte();c=c<<16|d.value}if(0<=c&&31>=c)return this.handleC0_(a,c,b);if(128<=c&&159>=c)return this.handleC1_(a,c,b);4096<=c&&4127>=c?this.handleC2_(a,c&255):4224<=c&&4255>=c?this.handleC3_(a,c&255):32<=c&&127>=c?this.handleG0_(c):160<=c&&255>=c?this.handleG1_(c):4128<=c&&4223>=c?this.handleG2_(c&255):4256<=c&&4351>=c&&this.handleG3_(c&
2004
2004
  255);return null};shaka.cea.Cea708Service.prototype.handleG0_=function(a){this.currentWindow_&&(127===a?this.currentWindow_.setCharacter("\u266a"):this.currentWindow_.setCharacter(String.fromCharCode(a)))};shaka.cea.Cea708Service.prototype.handleG1_=function(a){this.currentWindow_&&this.currentWindow_.setCharacter(String.fromCharCode(a))};
2005
2005
  shaka.cea.Cea708Service.prototype.handleG2_=function(a){this.currentWindow_&&(shaka.cea.Cea708Service.G2Charset.has(a)?(a=shaka.cea.Cea708Service.G2Charset.get(a),this.currentWindow_.setCharacter(a)):this.currentWindow_.setCharacter("_"))};shaka.cea.Cea708Service.prototype.handleG3_=function(a){this.currentWindow_&&(160!=a?this.currentWindow_.setCharacter("_"):this.currentWindow_.setCharacter("[CC]"))};
2006
- shaka.cea.Cea708Service.prototype.handleC0_=function(a,b,c){if(!this.currentWindow_)return null;if(24==b){var d=a.readByte().value,e=a.readByte().value;if((32<=d&&127>=d||160<=d&&255>=d)&&(32<=e&&127>=e||160<=e&&255>=e))return b=function(f){return f.map(function(g){return("0"+(g&255).toString(16)).slice(-2)}).join("")}([d,e]),b=String.fromCharCode(parseInt(b,16)),this.currentWindow_.setCharacter(b),null;a.rewind(2)}a=this.currentWindow_;d=null;switch(b){case shaka.cea.Cea708Service.ASCII_BACKSPACE:a.backspace();
2007
- break;case shaka.cea.Cea708Service.ASCII_CARRIAGE_RETURN:a.isVisible()&&(d=a.forceEmit(c,this.serviceNumber_));a.carriageReturn();break;case shaka.cea.Cea708Service.ASCII_HOR_CARRIAGE_RETURN:a.isVisible()&&(d=a.forceEmit(c,this.serviceNumber_));a.horizontalCarriageReturn();break;case shaka.cea.Cea708Service.ASCII_FORM_FEED:a.isVisible()&&(d=a.forceEmit(c,this.serviceNumber_)),a.resetMemory(),a.setPenLocation(0,0)}return d};
2006
+ shaka.cea.Cea708Service.prototype.handleC0_=function(a,b,c){if(!this.currentWindow_)return null;if(24==b)return b=a.readByte().value,c=a.readByte().value,b=function(e){return e.map(function(f){return("0"+(f&255).toString(16)).slice(-2)}).join("")}([b,c]),b=String.fromCharCode(parseInt(b,16)),this.currentWindow_.setCharacter(b),null;a=this.currentWindow_;var d=null;switch(b){case shaka.cea.Cea708Service.ASCII_BACKSPACE:a.backspace();break;case shaka.cea.Cea708Service.ASCII_CARRIAGE_RETURN:a.isVisible()&&
2007
+ (d=a.forceEmit(c,this.serviceNumber_));a.carriageReturn();break;case shaka.cea.Cea708Service.ASCII_HOR_CARRIAGE_RETURN:a.isVisible()&&(d=a.forceEmit(c,this.serviceNumber_));a.horizontalCarriageReturn();break;case shaka.cea.Cea708Service.ASCII_FORM_FEED:a.isVisible()&&(d=a.forceEmit(c,this.serviceNumber_)),a.resetMemory(),a.setPenLocation(0,0)}return d};
2008
2008
  shaka.cea.Cea708Service.prototype.handleC1_=function(a,b,c){if(128<=b&&135>=b)this.setCurrentWindow_(b&7);else{if(136===b)return a=a.readByte().value,this.clearWindows_(a,c);if(137===b)a=a.readByte().value,this.displayWindows_(a,c);else{if(138===b)return a=a.readByte().value,this.hideWindows_(a,c);if(139===b)return a=a.readByte().value,this.toggleWindows_(a,c);if(140===b)return a=a.readByte().value,this.deleteWindows_(a,c);if(143===b)return this.reset_(c);144===b?this.setPenAttributes_(a):145===b?
2009
2009
  this.setPenColor_(a):146===b?this.setPenLocation_(a):151===b?this.setWindowAttributes_(a):152<=b&&159>=b&&this.defineWindow_(a,(b&15)-8,c)}}return null};shaka.cea.Cea708Service.prototype.handleC2_=function(a,b){8<=b&&15>=b?a.skip(1):16<=b&&23>=b?a.skip(2):24<=b&&31>=b&&a.skip(3)};shaka.cea.Cea708Service.prototype.handleC3_=function(a,b){128<=b&&135>=b?a.skip(4):136<=b&&143>=b&&a.skip(5)};shaka.cea.Cea708Service.prototype.setCurrentWindow_=function(a){this.windows_[a]&&(this.currentWindow_=this.windows_[a])};
2010
2010
  shaka.cea.Cea708Service.prototype.getSpecifiedWindowIds_=function(a){for(var b=[],c=0;8>c;c++)1===(a&1)&&this.windows_[c]&&b.push(c),a>>=1;return b};shaka.cea.Cea708Service.prototype.clearWindows_=function(a,b){var c=null;a=$jscomp.makeIterator(this.getSpecifiedWindowIds_(a));for(var d=a.next();!d.done;d=a.next())d=this.windows_[d.value],d.isVisible()&&(c=d.forceEmit(b,this.serviceNumber_)),d.resetMemory();return c};
@@ -2134,9 +2134,9 @@ shaka.dash.SegmentList.parseMediaSegments_=function(a){var b=[a.representation.s
2134
2134
  var f=d.htmlUnescape(e.attributes.media);e=c.parseAttr(e,"mediaRange",c.parseRange,{start:0,end:null});return{mediaUri:f,start:e.start,end:e.end}})};shaka.dash.SegmentTemplate=function(){};
2135
2135
  shaka.dash.SegmentTemplate.createStreamInfo=function(a,b,c,d,e,f,g,h,k){goog.asserts.assert(a.representation.segmentTemplate,"Should only be called with SegmentTemplate or segment info defined");var l=shaka.dash.MpdUtils,m=shaka.dash.SegmentTemplate,n=shaka.dash.TimelineSegmentIndex;k||a.representation.initialization||(a.representation.initialization=l.inheritAttribute(a,m.fromInheritance_,"initialization"));var p=a.representation.initialization?m.createInitSegment_(a,g):null,q=m.parseSegmentTemplateInfo_(a);
2136
2136
  m.checkSegmentTemplateInfo_(a,q);var r=shaka.util.ObjectUtils.shallowCloneObject(a);if(q.indexTemplate)return shaka.dash.SegmentBase.checkSegmentIndexSupport(a,p),{generateSegmentIndex:function(){return m.generateSegmentIndexFromIndexTemplate_(r,b,p,q)}};if(q.segmentDuration)return d||"image"===a.adaptationSet.contentType||"text"===a.adaptationSet.contentType||(c=a.periodInfo.start,n=a.period.id,d=a.periodInfo.duration,n=(n=null!=n&&f[n]||d)?c+n:Infinity,a.presentationTimeline.notifyMaxSegmentDuration(q.segmentDuration),
2137
- a.presentationTimeline.notifyPeriodDuration(c,n)),{generateSegmentIndex:function(){return m.generateSegmentIndexFromDuration_(r,q,e,p,f,g,h,a.representation.segmentSequenceCadence)}};var t=null;d=d=null;a.period.id&&a.representation.id&&(d=a.period.id+","+a.representation.id,d=c[d])&&(t=d.segmentIndex);var u=a.periodInfo.start,v=a.periodInfo.duration?u+a.periodInfo.duration:Infinity;shaka.log.debug("New manifest "+u+" - "+v);var w=!(a.dynamic&&a.periodInfo.isLastPeriod);t?(c=t,c.appendTemplateInfo(q,
2138
- u,v,w,p),n=a.presentationTimeline.getSegmentAvailabilityStart(),c.evict(n)):(shaka.log.debug("Creating TSI with end "+v),t=new n(q,a.representation.id,a.bandwidth,a.representation.getBaseUris,a.urlParams,u,v,p,w,g,a.representation.segmentSequenceCadence));q.timeline&&"image"!==a.adaptationSet.contentType&&"text"!==a.adaptationSet.contentType&&a.presentationTimeline.notifyTimeRange(q.timeline,u);d&&a.dynamic&&(d.segmentIndex=t);return{generateSegmentIndex:function(){t instanceof shaka.dash.TimelineSegmentIndex&&
2139
- t.isEmpty()&&t.appendTemplateInfo(q,u,v,w,p);return Promise.resolve(t)}}};shaka.dash.SegmentTemplate.modifyTimepoints=function(a,b){var c=shaka.util.TXml;a=shaka.dash.MpdUtils.inheritChild(a,shaka.dash.SegmentTemplate.fromInheritance_,"SegmentTimeline");goog.asserts.assert(a,"timeline node not found");var d=c.findChildren(a,"S");goog.asserts.assert(d,"timepoints should exist");c.modifyNodes(d,b);a.children=d};
2137
+ a.presentationTimeline.notifyPeriodDuration(c,n)),{generateSegmentIndex:function(){return m.generateSegmentIndexFromDuration_(r,q,e,p,f,g,h,a.representation.segmentSequenceCadence)}};var t=null;d=d=null;a.period.id&&a.representation.id&&(d=a.period.id+","+a.representation.id,d=c[d])&&(t=d.segmentIndex);var u=a.periodInfo.start,v=a.periodInfo.duration?u+a.periodInfo.duration:Infinity;shaka.log.debug("New manifest "+u+" - "+v);t?(c=t,c.appendTemplateInfo(q,u,v,p),n=a.presentationTimeline.getSegmentAvailabilityStart(),
2138
+ c.evict(n)):(shaka.log.debug("Creating TSI with end "+v),t=new n(q,a.representation.id,a.bandwidth,a.representation.getBaseUris,a.urlParams,u,v,p,g,a.representation.segmentSequenceCadence));q.timeline&&"image"!==a.adaptationSet.contentType&&"text"!==a.adaptationSet.contentType&&(c=t.getTimeline(),a.presentationTimeline.notifyTimeRange(c,u));d&&a.dynamic&&(d.segmentIndex=t);return{generateSegmentIndex:function(){t instanceof shaka.dash.TimelineSegmentIndex&&t.isEmpty()&&t.appendTemplateInfo(q,u,v,
2139
+ p);return Promise.resolve(t)}}};shaka.dash.SegmentTemplate.modifyTimepoints=function(a,b){var c=shaka.util.TXml;a=shaka.dash.MpdUtils.inheritChild(a,shaka.dash.SegmentTemplate.fromInheritance_,"SegmentTimeline");goog.asserts.assert(a,"timeline node not found");var d=c.findChildren(a,"S");goog.asserts.assert(d,"timepoints should exist");c.modifyNodes(d,b);a.children=d};
2140
2140
  shaka.dash.SegmentTemplate.removeTimepoints=function(a){a=shaka.dash.MpdUtils.inheritChild(a,shaka.dash.SegmentTemplate.fromInheritance_,"SegmentTimeline");goog.asserts.assert(a,"timeline node not found");a.children=[]};shaka.dash.SegmentTemplate.fromInheritance_=function(a){return a.segmentTemplate};
2141
2141
  shaka.dash.SegmentTemplate.parseSegmentTemplateInfo_=function(a){var b=shaka.dash.SegmentTemplate,c=shaka.dash.MpdUtils,d=shaka.util.StringUtils,e=c.parseSegmentInfo(a,b.fromInheritance_),f=c.inheritAttribute(a,b.fromInheritance_,"media"),g=c.inheritAttribute(a,b.fromInheritance_,"index");b=c.inheritAttribute(a,b.fromInheritance_,"k");c=0;b&&(c=parseInt(b,10));return{unscaledSegmentDuration:e.unscaledSegmentDuration,segmentDuration:e.segmentDuration,timescale:e.timescale,startNumber:e.startNumber,
2142
2142
  scaledPresentationTimeOffset:e.scaledPresentationTimeOffset,unscaledPresentationTimeOffset:e.unscaledPresentationTimeOffset,timeline:e.timeline,mediaTemplate:f&&d.htmlUnescape(f),indexTemplate:g,mimeType:a.representation.mimeType,codecs:a.representation.codecs,bandwidth:a.bandwidth,numChunks:c}};
@@ -2152,12 +2152,14 @@ K,"Generated a segment outside of the period!");var O=[],P=b.numChunks;if(P)for(
2152
2152
  A=m.getSegmentAvailabilityEnd()<r();H=m.isLive();if(A||H){var F=Math.max(c,g+1);c=t;a.representation.availabilityTimeOffset&&(c=.1);E.updateEvery(c,function(){var L=m.getSegmentAvailabilityStart();E.evict(L);var J=$jscomp.makeIterator(y());J.next();J=J.next().value;for(var M=[];F<=J;){var K=D(F);M.push(K);F++}return L>r()&&!M.length?null:M})}return Promise.resolve(E)};
2153
2153
  shaka.dash.SegmentTemplate.createInitSegment_=function(a,b){var c=shaka.dash.MpdUtils,d=shaka.util.ManifestParserUtils,e=shaka.dash.SegmentTemplate,f=a.representation.initialization;f||(f=c.inheritAttribute(a,e.fromInheritance_,"initialization"));if(!f)return null;f=shaka.util.StringUtils.htmlUnescape(f);var g=a.representation.id,h=a.bandwidth||null,k=a.representation.getBaseUris,l=a.urlParams;e=shaka.dash.SegmentBase.createQualityInfo(a);b=new shaka.media.InitSegmentReference(function(){goog.asserts.assert(f,
2154
2154
  "Should have returned earler");var m=c.fillUriTemplate(f,g,null,null,h,null);return d.resolveUris(k(),[m],l())},0,null,e,null,null,b);b.codecs=a.representation.codecs;b.mimeType=a.representation.mimeType;return b};
2155
- shaka.dash.TimelineSegmentIndex=function(a,b,c,d,e,f,g,h,k,l,m){shaka.media.SegmentIndex.call(this,[]);this.templateInfo_=a;this.representationId_=b;this.bandwidth_=c;this.getBaseUris_=d;this.urlParams_=e;this.periodStart_=f;this.periodEnd_=g;this.initSegmentReference_=h;this.aesKey_=l;this.segmentSequenceCadence_=m;k&&this.fitTimeline()};$jscomp.inherits(shaka.dash.TimelineSegmentIndex,shaka.media.SegmentIndex);
2155
+ shaka.dash.TimelineSegmentIndex=function(a,b,c,d,e,f,g,h,k,l){shaka.media.SegmentIndex.call(this,[]);this.templateInfo_=a;this.representationId_=b;this.bandwidth_=c;this.getBaseUris_=d;this.urlParams_=e;this.periodStart_=f;this.periodEnd_=g;this.initSegmentReference_=h;this.aesKey_=k;this.segmentSequenceCadence_=l;this.fitTimeline()};$jscomp.inherits(shaka.dash.TimelineSegmentIndex,shaka.media.SegmentIndex);
2156
2156
  shaka.dash.TimelineSegmentIndex.prototype.getNumReferences=function(){return this.templateInfo_?this.templateInfo_.timeline.length:0};shaka.dash.TimelineSegmentIndex.prototype.release=function(){shaka.media.SegmentIndex.prototype.release.call(this);this.templateInfo_=null};
2157
2157
  shaka.dash.TimelineSegmentIndex.prototype.evict=function(a){if(this.templateInfo_){shaka.log.debug(this.representationId_+" Evicting at "+a);for(var b=0,c=this.templateInfo_.timeline,d=0;d<c.length;d+=1){var e=c[d],f=e.end+this.periodStart_;e=e.start+this.periodStart_;if(f<=a)shaka.log.debug("Evicting "+e+" - "+f),b+=1;else break}0<b&&(this.templateInfo_.timeline=c.slice(b),this.references.length>=b&&(this.references=this.references.slice(b)),this.numEvicted_+=b,0===this.getNumReferences()&&this.release())}};
2158
- shaka.dash.TimelineSegmentIndex.prototype.appendTemplateInfo=function(a,b,c,d,e){this.updateInitSegmentReference(e);if(this.templateInfo_){b=this.templateInfo_.timeline;this.templateInfo_.mediaTemplate!==a.mediaTemplate&&(this.templateInfo_.mediaTemplate=a.mediaTemplate);if(b.length){var f=b[b.length-1];a=a.timeline.filter(function(g){return g.end>f.end})}else a=a.timeline.slice();0<a.length&&(shaka.log.debug("Appending "+a.length+" entries"),this.templateInfo_.timeline.push.apply(this.templateInfo_.timeline,
2159
- $jscomp.arrayFromIterable(a)));this.periodEnd_!==c&&(this.periodEnd_=c)}else this.templateInfo_=a,this.periodStart_=b,this.periodEnd_=c;d&&this.fitTimeline()};shaka.dash.TimelineSegmentIndex.prototype.updateInitSegmentReference=function(a){if(this.initSegmentReference_!==a){this.initSegmentReference_=a;for(var b=$jscomp.makeIterator(this.references),c=b.next();!c.done;c=b.next())(c=c.value)&&c.updateInitSegmentReference(a)}};
2160
- shaka.dash.TimelineSegmentIndex.prototype.isBeforeFirstEntry=function(a){return this.templateInfo_&&this.templateInfo_.timeline&&this.templateInfo_.timeline.length?a<this.templateInfo_.timeline[0].start+this.periodStart_:!1};shaka.dash.TimelineSegmentIndex.prototype.fitTimeline=function(){if(!this.getIsImmutable()){for(var a=this.templateInfo_.timeline;a.length;)if(a[a.length-1].start>=this.periodEnd_)a.pop();else break;this.evict(this.periodStart_)}};
2158
+ shaka.dash.TimelineSegmentIndex.prototype.appendTemplateInfo=function(a,b,c,d){this.updateInitSegmentReference(d);if(this.templateInfo_){b=this.templateInfo_.timeline;this.templateInfo_.mediaTemplate!==a.mediaTemplate&&(this.templateInfo_.mediaTemplate=a.mediaTemplate);if(b.length){var e=b[b.length-1];a=a.timeline.filter(function(f){return f.end>e.end})}else a=a.timeline.slice();0<a.length&&(shaka.log.debug("Appending "+a.length+" entries"),this.templateInfo_.timeline.push.apply(this.templateInfo_.timeline,
2159
+ $jscomp.arrayFromIterable(a)));this.periodEnd_!==c&&(this.periodEnd_=c)}else this.templateInfo_=a,this.periodStart_=b,this.periodEnd_=c;this.fitTimeline()};shaka.dash.TimelineSegmentIndex.prototype.updateInitSegmentReference=function(a){if(this.initSegmentReference_!==a){this.initSegmentReference_=a;for(var b=$jscomp.makeIterator(this.references),c=b.next();!c.done;c=b.next())(c=c.value)&&c.updateInitSegmentReference(a)}};
2160
+ shaka.dash.TimelineSegmentIndex.prototype.isBeforeFirstEntry=function(a){return this.templateInfo_&&this.templateInfo_.timeline&&this.templateInfo_.timeline.length?a<this.templateInfo_.timeline[0].start+this.periodStart_:!1};
2161
+ shaka.dash.TimelineSegmentIndex.prototype.fitTimeline=function(){if(!this.getIsImmutable()){var a=this.templateInfo_.timeline;goog.asserts.assert(a,"Timeline should be non-null!");var b=[];a=$jscomp.makeIterator(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.start>=this.periodEnd_||0>=c.end||b.push(c);this.templateInfo_.timeline=b;this.evict(this.periodStart_)}};
2162
+ shaka.dash.TimelineSegmentIndex.prototype.getTimeline=function(){if(!this.templateInfo_)return[];var a=this.templateInfo_.timeline;goog.asserts.assert(a,"Timeline should be non-null!");return a};
2161
2163
  shaka.dash.TimelineSegmentIndex.prototype.find=function(a){shaka.log.debug("Find "+a);if(this.isBeforeFirstEntry(a))return this.numEvicted_;if(!this.templateInfo_)return null;var b=this.templateInfo_.timeline;if(a<this.periodStart_||a>=this.periodEnd_)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.periodStart_;e=d<c?b[d+1].start+this.periodStart_:Infinity===this.periodEnd_?e.end+this.periodStart_:this.periodEnd_;if(a>=f&&a<e)return d+this.numEvicted_}return null};
2162
2164
  shaka.dash.TimelineSegmentIndex.prototype.get=function(a){var b=this;a-=this.numEvicted_;if(0>a||a>=this.getNumReferences()||!this.templateInfo_)return null;var c=this.references[a];if(!c){var d=this.templateInfo_.timeline[a],e=d.segmentPosition,f=d.unscaledStart+this.templateInfo_.unscaledPresentationTimeOffset;c=this.periodStart_-this.templateInfo_.scaledPresentationTimeOffset;var g=this.periodStart_+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.periodEnd_&&(h=this.periodEnd_);for(var k=
2163
2165
  this.templateInfo_.codecs,l=this.templateInfo_.mimeType,m=this.templateInfo_.bandwidth,n=[],p=(d.end-d.start)/d.partialSegments,q={},r=0;r<d.partialSegments;q={uris$jscomp$13:void 0,subNumber$jscomp$2:void 0},r++){var t=d.start+p*r,u=t+p;q.subNumber$jscomp$2=r+1;q.uris$jscomp$13=null;q=function(v){return function(){if(!b.templateInfo_)return[];null==v.uris$jscomp$13&&(v.uris$jscomp$13=shaka.dash.TimelineSegmentIndex.createUris_(b.templateInfo_.mediaTemplate,b.representationId_,e,b.bandwidth_,f,v.subNumber$jscomp$2,
@@ -2252,18 +2254,18 @@ p);return q.return(p)})};
2252
2254
  shaka.dash.DashParser.prototype.parseManifest_=function(a,b,c){var d=this,e,f,g,h,k,l,m,n,p,q,r;return $jscomp.asyncExecutePromiseGeneratorProgram(function(t){if(1==t.nextAddress){e=a;f=d.config_.dash.manifestPreprocessor;g=shaka.util.PlayerConfiguration.defaultManifestPreprocessor;if(f!=g){shaka.Deprecate.deprecateFeature(5,"manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=shaka.util.XmlUtils.parseXml(e,c);if(!h)throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,
2253
2255
  shaka.util.Error.Category.MANIFEST,shaka.util.Error.Code.DASH_INVALID_XML,b);f(h);e=shaka.util.XmlUtils.toArrayBuffer(h)}k=shaka.util.TXml.parseXml(e,c);if(!k)throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.MANIFEST,shaka.util.Error.Code.DASH_INVALID_XML,b);l=d.config_.dash.manifestPreprocessorTXml;m=shaka.util.PlayerConfiguration.defaultManifestPreprocessorTXml;l!=m&&l(k);if("Patch"===c)return t.return(d.processPatchManifest_(k));if(n=d.config_.dash.disableXlinkProcessing)return t.return(d.processManifest_(k,
2254
2256
  b));p=d.config_.dash.xlinkFailGracefully;q=shaka.dash.MpdUtils.processXlinks(k,d.config_.retryParameters,p,b,d.playerInterface_.networkingEngine);d.operationManager_.manage(q);return t.yield(q.promise,2)}r=t.yieldResult;return t.return(d.processManifest_(r,b))})};
2255
- shaka.dash.DashParser.prototype.processManifest_=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,r,t,u,v,w,x,z,B,C,y,A,D,H,G,E,F,L,J,M,K,I,O,P,N,Q,S,T,W,U,R,X,V,Y,ba,ca,Z,fa,ha,ia,ea,ja,da,oa,ka,la,ma,na;return $jscomp.asyncExecutePromiseGeneratorProgram(function(aa){switch(aa.nextAddress){case 1:d=shaka.util.TXml;goog.asserts.assert(c.config_,"Must call configure() before processManifest_()!");c.contentSteeringManager_&&c.contentSteeringManager_.clearPreviousLocations();e=[b];f=[];g=new Map;h=d.findChildren(a,
2257
+ shaka.dash.DashParser.prototype.processManifest_=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,r,t,u,v,w,x,z,B,C,y,A,D,H,G,E,F,L,J,M,K,I,O,P,N,Q,S,T,W,U,R,X,V,Y,ba,ca,Z,da,ha,fa,ia,ea,na,ja,ka,la,ma;return $jscomp.asyncExecutePromiseGeneratorProgram(function(aa){switch(aa.nextAddress){case 1:d=shaka.util.TXml;goog.asserts.assert(c.config_,"Must call configure() before processManifest_()!");c.contentSteeringManager_&&c.contentSteeringManager_.clearPreviousLocations();e=[b];f=[];g=new Map;h=d.findChildren(a,
2256
2258
  "Location");k=$jscomp.makeIterator(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=m.attributes.serviceLocation,p=d.getContents(m))q=shaka.util.ManifestParserUtils.resolveUris(e,[p])[0],n&&(c.contentSteeringManager_?c.contentSteeringManager_.addLocation("Location",n,q):g.set(n,q)),f.push(q);c.contentSteeringManager_?(r=c.contentSteeringManager_.getLocations("Location",!0),0<r.length&&(e=c.manifestUris_=r)):f.length&&(e=c.manifestUris_=f);c.manifestPatchContext_.mpdId=a.attributes.id||"";c.manifestPatchContext_.publishTime=
2257
2259
  d.parseAttr(a,"publishTime",d.parseDate)||0;c.patchLocationNodes_=d.findChildren(a,"PatchLocation");t=Promise.resolve();if((u=d.findChild(a,"ContentSteering"))&&c.playerInterface_){v=u.attributes.defaultServiceLocation;if(c.contentSteeringManager_)c.contentSteeringManager_.setBaseUris(e),c.contentSteeringManager_.setDefaultPathwayId(v);else if(c.contentSteeringManager_=new shaka.util.ContentSteeringManager(c.playerInterface_),c.contentSteeringManager_.configure(c.config_),c.contentSteeringManager_.setManifestType(shaka.media.ManifestParser.DASH),
2258
2260
  c.contentSteeringManager_.setBaseUris(e),c.contentSteeringManager_.setDefaultPathwayId(v),w=d.getContents(u))(x=d.parseAttr(u,"queryBeforeStart",d.parseBoolean,!1))?t=c.contentSteeringManager_.requestInfo(w):c.contentSteeringManager_.requestInfo(w);z=$jscomp.makeIterator(g.keys());for(B=z.next();!B.done;B=z.next())C=B.value,y=g.get(C),c.contentSteeringManager_.addLocation("Location",C,y)}A=d.findChildren(a,"BaseURL");D=!1;if(c.contentSteeringManager_)for(H=$jscomp.makeIterator(A),G=H.next();!G.done;G=
2259
2261
  H.next())E=G.value,F=E.attributes.serviceLocation,L=d.getContents(E),F&&L&&(c.contentSteeringManager_.addLocation("BaseURL",F,L),D=!0);c.lastCalculatedBaseUris_=null;D&&c.contentSteeringManager_||(J=A.map(d.getContents),c.lastCalculatedBaseUris_=shaka.util.ManifestParserUtils.resolveUris(e,J));M=function(){return c.contentSteeringManager_&&D?c.contentSteeringManager_.getLocations("BaseURL"):c.lastCalculatedBaseUris_?c.lastCalculatedBaseUris_:[]};c.manifestPatchContext_.getBaseUris=M;K=0;A&&A.length&&
2260
2262
  (K=d.parseAttr(A[0],"availabilityTimeOffset",d.parseFloat)||0);c.manifestPatchContext_.availabilityTimeOffset=K;I=c.config_.dash.ignoreMinBufferTime;O=0;I||(O=d.parseAttr(a,"minBufferTime",d.parseDuration)||0);c.updatePeriod_=d.parseAttr(a,"minimumUpdatePeriod",d.parseDuration,-1);P=d.parseAttr(a,"availabilityStartTime",d.parseDate);N=d.parseAttr(a,"timeShiftBufferDepth",d.parseDuration);Q=c.config_.dash.ignoreSuggestedPresentationDelay;S=null;Q||(S=d.parseAttr(a,"suggestedPresentationDelay",d.parseDuration));
2261
2263
  T=c.config_.dash.ignoreMaxSegmentDuration;W=null;T||(W=d.parseAttr(a,"maxSegmentDuration",d.parseDuration));U=a.attributes.type||"static";c.manifest_&&c.manifest_.presentationTimeline&&(c.isTransitionFromDynamicToStatic_=c.manifest_.presentationTimeline.isLive()&&"static"==U);c.manifestPatchContext_.type=U;c.cleanStreamMap_();if(c.manifest_)for(R=c.manifest_.presentationTimeline,X=R.getSegmentAvailabilityStart(),V=$jscomp.makeIterator(Object.values(c.streamMap_)),Y=V.next();!Y.done;Y=V.next())ba=
2262
- Y.value,ba.segmentIndex&&ba.segmentIndex.evict(X);else ca=c.config_.defaultPresentationDelay||1.5*O,Z=null!=S?S:ca,R=new shaka.media.PresentationTimeline(P,Z,c.config_.dash.autoCorrectDrift);R.setStatic("static"==U);(fa=R.isLive())&&!isNaN(c.config_.availabilityWindowOverride)&&(N=c.config_.availabilityWindowOverride);null==N&&(N=Infinity);R.setSegmentAvailabilityDuration(N);ha=a.attributes.profiles||"";c.manifestPatchContext_.profiles=ha.split(",");ia={dynamic:"static"!=U,presentationTimeline:R,
2263
- period:null,periodInfo:null,adaptationSet:null,representation:null,bandwidth:0,indexRangeWarningGiven:!1,availabilityTimeOffset:K,mediaPresentationDuration:null,profiles:ha.split(","),roles:null,urlParams:function(){return""}};c.gapCount_=0;ea=c.parsePeriods_(ia,M,a,!1);ja=ea.duration;da=ea.periods;("static"!=U||c.isTransitionFromDynamicToStatic_)&&ea.durationDerivedFromPeriods||R.setDuration(ja||Infinity);c.isLowLatency_&&!c.lowLatencyMode_&&(oa=c.playerInterface_.isAutoLowLatencyMode())&&(c.playerInterface_.enableLowLatencyMode(),
2264
- c.lowLatencyMode_=c.playerInterface_.isLowLatencyMode());c.lowLatencyMode_&&R.setAvailabilityTimeOffset(c.minTotalAvailabilityTimeOffset_);R.notifyMaxSegmentDuration(W||1);goog.DEBUG&&!c.isTransitionFromDynamicToStatic_&&R.assertIsValid();return aa.yield(t,2);case 2:c.lowLatencyMode_&&(O=0,ka=null!=S?S:c.config_.defaultPresentationDelay,R.setDelay(ka));if(!c.manifest_)return aa.yield(c.periodCombiner_.combinePeriods(da,ia.dynamic),6);c.manifest_.periodCount=da.length;c.manifest_.gapCount=c.gapCount_;
2265
- return aa.yield(c.postPeriodProcessing_(da,!1),4);case 6:c.manifest_={presentationTimeline:R,variants:c.periodCombiner_.getVariants(),textStreams:c.periodCombiner_.getTextStreams(),imageStreams:c.periodCombiner_.getImageStreams(),offlineSessionIds:[],minBufferTime:O||0,sequenceMode:c.config_.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:shaka.media.ManifestParser.DASH,serviceDescription:c.parseServiceDescription_(a),nextUrl:c.parseMpdChaining_(a),periodCount:da.length,gapCount:c.gapCount_,
2266
- isLowLatency:c.isLowLatency_,startTime:null};if(!R.usingPresentationStartTime()){aa.jumpTo(7);break}la=shaka.util.TXml;ma=la.findChildren(a,"UTCTiming");return aa.yield(c.parseUtcTiming_(M,ma),8);case 8:na=aa.yieldResult;if(!c.playerInterface_)return aa.return();R.setClockOffset(na);case 7:R.lockStartTime();case 4:c.playerInterface_.makeTextStreamsForClosedCaptions(c.manifest_),aa.jumpToEnd()}})};
2264
+ Y.value,ba.segmentIndex&&ba.segmentIndex.evict(X);else ca=0,ca=null!=S?Math.min(S,N||Infinity):0<c.config_.defaultPresentationDelay?c.config_.defaultPresentationDelay:Math.min(1.5*O,N||Infinity),R=new shaka.media.PresentationTimeline(P,ca,c.config_.dash.autoCorrectDrift);R.setStatic("static"==U);(Z=R.isLive())&&!isNaN(c.config_.availabilityWindowOverride)&&(N=c.config_.availabilityWindowOverride);null==N&&(N=Infinity);R.setSegmentAvailabilityDuration(N);da=a.attributes.profiles||"";c.manifestPatchContext_.profiles=
2265
+ da.split(",");ha={dynamic:"static"!=U,presentationTimeline:R,period:null,periodInfo:null,adaptationSet:null,representation:null,bandwidth:0,indexRangeWarningGiven:!1,availabilityTimeOffset:K,mediaPresentationDuration:null,profiles:da.split(","),roles:null,urlParams:function(){return""}};c.gapCount_=0;fa=c.parsePeriods_(ha,M,a,!1);ia=fa.duration;ea=fa.periods;("static"!=U||c.isTransitionFromDynamicToStatic_)&&fa.durationDerivedFromPeriods||R.setDuration(ia||Infinity);c.isLowLatency_&&!c.lowLatencyMode_&&
2266
+ (na=c.playerInterface_.isAutoLowLatencyMode())&&(c.playerInterface_.enableLowLatencyMode(),c.lowLatencyMode_=c.playerInterface_.isLowLatencyMode());c.lowLatencyMode_&&R.setAvailabilityTimeOffset(c.minTotalAvailabilityTimeOffset_);R.notifyMaxSegmentDuration(W||1);goog.DEBUG&&!c.isTransitionFromDynamicToStatic_&&R.assertIsValid();return aa.yield(t,2);case 2:c.lowLatencyMode_&&(O=0,ja=null!=S?S:c.config_.defaultPresentationDelay,R.setDelay(ja));if(!c.manifest_)return aa.yield(c.periodCombiner_.combinePeriods(ea,
2267
+ ha.dynamic),6);c.manifest_.periodCount=ea.length;c.manifest_.gapCount=c.gapCount_;return aa.yield(c.postPeriodProcessing_(ea,!1),4);case 6:c.manifest_={presentationTimeline:R,variants:c.periodCombiner_.getVariants(),textStreams:c.periodCombiner_.getTextStreams(),imageStreams:c.periodCombiner_.getImageStreams(),offlineSessionIds:[],minBufferTime:O||0,sequenceMode:c.config_.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:shaka.media.ManifestParser.DASH,serviceDescription:c.parseServiceDescription_(a),
2268
+ nextUrl:c.parseMpdChaining_(a),periodCount:ea.length,gapCount:c.gapCount_,isLowLatency:c.isLowLatency_,startTime:null};if(!R.usingPresentationStartTime()){aa.jumpTo(7);break}ka=shaka.util.TXml;la=ka.findChildren(a,"UTCTiming");return aa.yield(c.parseUtcTiming_(M,la),8);case 8:ma=aa.yieldResult;if(!c.playerInterface_)return aa.return();R.setClockOffset(ma);case 7:R.lockStartTime();case 4:c.playerInterface_.makeTextStreamsForClosedCaptions(c.manifest_),aa.jumpToEnd()}})};
2267
2269
  shaka.dash.DashParser.prototype.postPeriodProcessing_=function(a,b){var c=this,d;return $jscomp.asyncExecutePromiseGeneratorProgram(function(e){if(1==e.nextAddress)return e.yield(c.periodCombiner_.combinePeriods(a,!0,b),2);c.manifest_.variants=c.periodCombiner_.getVariants();d=c.periodCombiner_.getTextStreams();0<d.length&&(c.manifest_.textStreams=d);c.manifest_.imageStreams=c.periodCombiner_.getImageStreams();c.playerInterface_.filter(c.manifest_);e.jumpToEnd()})};
2268
2270
  shaka.dash.DashParser.prototype.processPatchManifest_=function(a){var b=this,c,d,e,f,g,h,k,l,m,n,p,q,r,t,u,v,w,x,z,B,C,y,A,D,H,G,E,F,L;return $jscomp.asyncExecutePromiseGeneratorProgram(function(J){if(1==J.nextAddress){c=shaka.util.TXml;d=a.attributes.mpdId;e=c.parseAttr(a,"originalPublishTime",c.parseDate);if(!d||d!==b.manifestPatchContext_.mpdId||e!==b.manifestPatchContext_.publishTime)throw b.patchLocationNodes_=[],new shaka.util.Error(shaka.util.Error.Severity.RECOVERABLE,shaka.util.Error.Category.MANIFEST,
2269
2271
  shaka.util.Error.Code.DASH_INVALID_PATCH);f=[];g=[];h=new Set;k=$jscomp.makeIterator(c.getChildNodes(a));for(l=k.next();!l.done;l=k.next()){m=l.value;n=!0;p=c.parseXpath(m.attributes.sel||"");q=p[p.length-1];r=c.getContents(m)||"";if("MPD"===q.name)"mediaPresentationDuration"===q.attribute?(t=c.getContents(m)||"",b.parsePatchMediaPresentationDurationChange_(t)):"type"===q.attribute?b.parsePatchMpdTypeChange_(r):"publishTime"===q.attribute?b.manifestPatchContext_.publishTime=c.parseDate(r)||0:null===
@@ -2457,7 +2459,7 @@ shaka.hls.HlsParser.prototype.notifySegmentsForStreams_=function(a){var b=[];a=$
2457
2459
  shaka.hls.HlsParser.prototype.finalizeStreams_=function(a){if(!this.isLive_())for(var b=this.getMinDuration_(),c=$jscomp.makeIterator(a),d=c.next();!d.done;d=c.next())d.value.stream.segmentIndex.fit(0,b);this.notifySegmentsForStreams_(a.map(function(f){return f.stream}));c=Array.from(this.uriToStreamInfosMap_.values()).filter(function(f){return f.stream.segmentIndex});var e=shaka.util.ManifestParserUtils.ContentType;b=c.some(function(f){return f.stream.type==e.AUDIO});d=c.some(function(f){return f.stream.type==
2458
2460
  e.VIDEO});c=this.isLive_()&&!this.usesProgramDateTime_;b=!this.isLive_()&&this.usesProgramDateTime_&&!(b&&d);this.config_.hls.ignoreManifestProgramDateTime||c||b?this.syncStreamsWithSequenceNumber_(a,c):(this.syncStreamsWithProgramDateTime_(a),0<this.config_.hls.ignoreManifestProgramDateTimeForTypes.length&&this.syncStreamsWithSequenceNumber_(a))};shaka.hls.HlsParser.prototype.ignoreManifestProgramDateTimeFor_=function(a){return this.config_.hls.ignoreManifestProgramDateTime?!0:this.config_.hls.ignoreManifestProgramDateTimeForTypes.includes(a)};
2459
2461
  shaka.hls.HlsParser.prototype.hasEnoughInfoToFinalizeStreams_=function(){if(!this.manifest_)return!1;for(var a=[],b=[],c=$jscomp.makeIterator(this.manifest_.variants),d=c.next();!d.done;d=c.next())d=d.value,d.video&&a.push(d.video),d.audio&&b.push(d.audio);return 0<a.length&&!a.some(function(e){return e.segmentIndex})||0<b.length&&!b.some(function(e){return e.segmentIndex})?!1:!0};
2460
- shaka.hls.HlsParser.prototype.convertParsedPlaylistIntoStreamInfo_=function(a,b,c,d,e,f,g,h,k,l,m,n,p,q,r,t,u,v,w){v=void 0===v?!0:v;w=void 0===w?!0:w;var x=this,z,B,C,y,A,D,H,G,E,F,L,J,M,K,I,O,P,N,Q,S,T,W,U,R,X,V,Y,ba,ca;return $jscomp.asyncExecutePromiseGeneratorProgram(function(Z){switch(Z.nextAddress){case 1:z=c.segments||[];B=z.every(function(fa){return shaka.hls.Utils.getFirstTagWithName(fa.tags,"EXT-X-GAP")?!0:!1});if(!z.length||B)throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,
2462
+ shaka.hls.HlsParser.prototype.convertParsedPlaylistIntoStreamInfo_=function(a,b,c,d,e,f,g,h,k,l,m,n,p,q,r,t,u,v,w){v=void 0===v?!0:v;w=void 0===w?!0:w;var x=this,z,B,C,y,A,D,H,G,E,F,L,J,M,K,I,O,P,N,Q,S,T,W,U,R,X,V,Y,ba,ca;return $jscomp.asyncExecutePromiseGeneratorProgram(function(Z){switch(Z.nextAddress){case 1:z=c.segments||[];B=z.every(function(da){return shaka.hls.Utils.getFirstTagWithName(da.tags,"EXT-X-GAP")?!0:!1});if(!z.length||B)throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,
2461
2463
  shaka.util.Error.Category.MANIFEST,shaka.util.Error.Code.HLS_EMPTY_MEDIA_PLAYLIST);x.determinePresentationType_(c);x.isLive_()&&x.determineLastTargetDuration_(c);C=x.isLive_()?x.mediaSequenceToStartTimeByType_.get(g):new Map;y=x.createSegments_(c,C,b,d,g);A=y.segments;D=y.bandwidth;L=F=E=G=H=null;if(!(0<A.length&&v)){Z.jumpTo(2);break}return Z.yield(x.getBasicInfoFromSegments_(A),3);case 3:J=Z.yieldResult,g=J.type,h=J.language,m=J.channelCount,r=J.sampleRate,x.config_.disableText||(n=J.closedCaptions),
2462
2464
  G=J.height,H=J.width,E=J.videoRange,F=J.colorGamut,L=J.frameRate,w&&(u=J.mimeType,f=J.codecs);case 2:if(u){Z.jumpTo(4);break}return Z.yield(x.guessMimeType_(g,f,A),5);case 5:u=Z.yieldResult,g!=shaka.util.ManifestParserUtils.ContentType.TEXT||f||"application/mp4"!=u||!A[0]||A[0].initSegmentReference||(u="text/vtt");case 4:return Z.yield(x.parseDrmInfo_(c,u,d,b),6);case 6:M=Z.yieldResult;K=M.drmInfos;I=M.keyIds;O=M.encrypted;P=M.aesEncrypted;if(O&&!K.length&&!P)throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,
2463
2465
  shaka.util.Error.Category.MANIFEST,shaka.util.Error.Code.HLS_KEYFORMATS_NOT_SUPPORTED);N=x.makeStreamObject_(a,f,g,h,k,l,m,n,p,q,r,t);N.encrypted=O;N.drmInfos=K;N.keyIds=I;N.mimeType=u;D&&(N.bandwidth=D);x.setFullTypeForStream_(N);g==shaka.util.ManifestParserUtils.ContentType.VIDEO&&(H||G||E||F)&&x.addVideoAttributes_(N,H,G,L,E,null,F);x.isLive_()&&x.determineLastTargetDuration_(c);Q=A[0].startTime;S=A[A.length-1];T=S.endTime;W=new shaka.media.SegmentIndex(A);N.segmentIndex=W;R=(U=shaka.hls.Utils.getFirstTagWithName(c.tags,
@@ -3217,7 +3219,7 @@ englishName:"Serbian (Serbia)"},su:{nativeName:"Basa Sunda",englishName:"Sundane
3217
3219
  tl:{nativeName:"Filipino",englishName:"Filipino"},"tl-PH":{nativeName:"Filipino",englishName:"Filipino"},tlh:{nativeName:"tlhIngan-Hol",englishName:"Klingon"},tr:{nativeName:"T\u00fcrk\u00e7e",englishName:"Turkish"},"tr-TR":{nativeName:"T\u00fcrk\u00e7e",englishName:"Turkish"},"tt-RU":{nativeName:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",englishName:"Tatar"},uk:{nativeName:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",englishName:"Ukrainian"},"uk-UA":{nativeName:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
3218
3220
  englishName:"Ukrainian"},ur:{nativeName:"\u0627\u0631\u062f\u0648",englishName:"Urdu"},"ur-PK":{nativeName:"\u0627\u0631\u062f\u0648",englishName:"Urdu"},uz:{nativeName:"O'zbek",englishName:"Uzbek"},"uz-UZ":{nativeName:"O'zbek",englishName:"Uzbek"},vi:{nativeName:"Ti\u1ebfng Vi\u1ec7t",englishName:"Vietnamese"},"vi-VN":{nativeName:"Ti\u1ebfng Vi\u1ec7t",englishName:"Vietnamese"},"xh-ZA":{nativeName:"isiXhosa",englishName:"Xhosa"},yi:{nativeName:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",englishName:"Yiddish"},
3219
3221
  "yi-DE":{nativeName:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",englishName:"Yiddish (German)"},zh:{nativeName:"\u4e2d\u6587",englishName:"Chinese"},"zh-HANS":{nativeName:"\u4e2d\u6587\u7b80\u4f53",englishName:"Chinese Simplified"},"zh-HANT":{nativeName:"\u4e2d\u6587\u7e41\u9ad4",englishName:"Chinese Traditional"},"zh-CN":{nativeName:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",englishName:"Chinese Simplified (China)"},"zh-HK":{nativeName:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",englishName:"Chinese Traditional (Hong Kong)"},
3220
- "zh-SG":{nativeName:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",englishName:"Chinese Simplified (Singapore)"},"zh-TW":{nativeName:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",englishName:"Chinese Traditional (Taiwan)"},"zu-ZA":{nativeName:"isiZulu",englishName:"Zulu"}}},$jscomp$iter$596=$jscomp.makeIterator(Object.keys(mozilla.LanguageMapping)),$jscomp$key$2089745539$0$key$jscomp$164=$jscomp$iter$596.next();!$jscomp$key$2089745539$0$key$jscomp$164.done;$jscomp$key$2089745539$0$key$jscomp$164=$jscomp$iter$596.next()){var key$jscomp$164=
3222
+ "zh-SG":{nativeName:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",englishName:"Chinese Simplified (Singapore)"},"zh-TW":{nativeName:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",englishName:"Chinese Traditional (Taiwan)"},"zu-ZA":{nativeName:"isiZulu",englishName:"Zulu"}}},$jscomp$iter$597=$jscomp.makeIterator(Object.keys(mozilla.LanguageMapping)),$jscomp$key$2089745539$0$key$jscomp$164=$jscomp$iter$597.next();!$jscomp$key$2089745539$0$key$jscomp$164.done;$jscomp$key$2089745539$0$key$jscomp$164=$jscomp$iter$597.next()){var key$jscomp$164=
3221
3223
  $jscomp$key$2089745539$0$key$jscomp$164.value;mozilla.LanguageMapping[key$jscomp$164.toLowerCase()]=mozilla.LanguageMapping[key$jscomp$164]};shaka.ui.Element=function(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new shaka.util.EventManager;this.localization=this.controls.getLocalization();this.player=this.controls.getPlayer();this.video=this.controls.getVideo();this.adManager=this.player.getAdManager();this.ad=b.getAd();this.eventManager.listen(this.adManager,shaka.ads.Utils.AD_STARTED,function(d){c.ad=d.ad});this.eventManager.listen(this.adManager,shaka.ads.Utils.AD_STOPPED,function(){c.ad=null})};
3222
3224
  shaka.ui.Element.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};goog.exportSymbol("shaka.ui.Element",shaka.ui.Element);goog.exportProperty(shaka.ui.Element.prototype,"release",shaka.ui.Element.prototype.release);shaka.ui.Enums={};
3223
3225
  shaka.ui.Enums.MaterialDesignIcons={FULLSCREEN:"fullscreen",EXIT_FULLSCREEN:"fullscreen_exit",CLOSE:"close",CLOSED_CAPTIONS:"closed_caption",CLOSED_CAPTIONS_OFF:"closed_caption_disabled",CHECKMARK:"done",LANGUAGE:"language",PIP:"picture_in_picture_alt",EXIT_PIP:"branding_watermark",BACK:"arrow_back",RESOLUTION:"settings",MUTE:"volume_up",UNMUTE:"volume_off",CAST:"cast",EXIT_CAST:"cast_connected",OPEN_OVERFLOW:"more_vert",REWIND:"fast_rewind",FAST_FORWARD:"fast_forward",PLAY:"play_arrow",PLAYBACK_RATE:"slow_motion_video",