shaka-player 4.11.19 → 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.
- package/dist/locales.js +37 -37
- package/dist/shaka-player.compiled.debug.js +45 -43
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +519 -517
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.debug.js +56 -54
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +726 -724
- package/dist/shaka-player.ui.map +3 -3
- package/externs/shaka/player.js +7 -4
- package/lib/cea/cea708_service.js +9 -17
- package/lib/dash/dash_parser.js +24 -13
- package/lib/dash/segment_template.js +41 -39
- package/lib/hls/manifest_text_parser.js +1 -0
- package/lib/media/gap_jumping_controller.js +14 -1
- package/lib/media/media_source_engine.js +13 -9
- package/lib/media/streaming_engine.js +1 -1
- package/lib/net/networking_utils.js +1 -0
- package/lib/player.js +3 -2
- package/lib/util/player_configuration.js +12 -1
- package/lib/util/tXml.js +2 -1
- package/package.json +2 -1
- package/ui/controls.js +2 -6
- package/ui/range_element.js +0 -1
package/dist/locales.js
CHANGED
|
@@ -912,51 +912,51 @@ shaka.ui.Locales.addTo = function(localization) {
|
|
|
912
912
|
* @const
|
|
913
913
|
*/
|
|
914
914
|
shaka.ui.Locales.Ids = {
|
|
915
|
-
FAST_FORWARD: 'FAST_FORWARD',
|
|
916
|
-
LOOP: 'LOOP',
|
|
917
|
-
UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
|
|
918
|
-
BACK: 'BACK',
|
|
919
|
-
AD_STATISTICS: 'AD_STATISTICS',
|
|
920
|
-
CAST: 'CAST',
|
|
921
|
-
EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN',
|
|
922
|
-
MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES',
|
|
923
|
-
LANGUAGE: 'LANGUAGE',
|
|
924
|
-
MUTE: 'MUTE',
|
|
925
|
-
OFF: 'OFF',
|
|
926
|
-
ON: 'ON',
|
|
927
|
-
PAUSE: 'PAUSE',
|
|
928
|
-
PLAY: 'PLAY',
|
|
929
|
-
PLAYBACK_RATE: 'PLAYBACK_RATE',
|
|
930
|
-
RESOLUTION: 'RESOLUTION',
|
|
931
|
-
SKIP_AD: 'SKIP_AD',
|
|
932
|
-
STATISTICS: 'STATISTICS',
|
|
933
|
-
TOGGLE_STEREOSCOPIC: 'TOGGLE_STEREOSCOPIC',
|
|
934
|
-
REWIND: 'REWIND',
|
|
935
|
-
UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
|
|
936
|
-
REPLAY: 'REPLAY',
|
|
937
915
|
RECENTER_VR: 'RECENTER_VR',
|
|
938
|
-
|
|
939
|
-
EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
|
|
940
|
-
SUBTITLE_FORCED: 'SUBTITLE_FORCED',
|
|
916
|
+
AD_PROGRESS: 'AD_PROGRESS',
|
|
941
917
|
ENTER_LOOP_MODE: 'ENTER_LOOP_MODE',
|
|
918
|
+
LIVE: 'LIVE',
|
|
942
919
|
PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE',
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
NOT_APPLICABLE: 'NOT_APPLICABLE',
|
|
946
|
-
QUALITY: 'QUALITY',
|
|
947
|
-
SURROUND: 'SURROUND',
|
|
920
|
+
SUBTITLE_FORCED: 'SUBTITLE_FORCED',
|
|
921
|
+
FAST_FORWARD: 'FAST_FORWARD',
|
|
948
922
|
CHAPTERS: 'CHAPTERS',
|
|
949
|
-
|
|
923
|
+
TOGGLE_STEREOSCOPIC: 'TOGGLE_STEREOSCOPIC',
|
|
924
|
+
AD_DURATION: 'AD_DURATION',
|
|
925
|
+
DOWNLOAD_VIDEO_FRAME: 'DOWNLOAD_VIDEO_FRAME',
|
|
926
|
+
CAPTIONS: 'CAPTIONS',
|
|
950
927
|
AIRPLAY: 'AIRPLAY',
|
|
951
|
-
|
|
952
|
-
|
|
928
|
+
EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
|
|
929
|
+
SURROUND: 'SURROUND',
|
|
953
930
|
SKIP_TO_LIVE: 'SKIP_TO_LIVE',
|
|
931
|
+
SEEK: 'SEEK',
|
|
932
|
+
AD_STATISTICS: 'AD_STATISTICS',
|
|
933
|
+
PLAY: 'PLAY',
|
|
934
|
+
MORE_SETTINGS: 'MORE_SETTINGS',
|
|
935
|
+
MUTE: 'MUTE',
|
|
936
|
+
UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
|
|
954
937
|
UNMUTE: 'UNMUTE',
|
|
955
|
-
|
|
938
|
+
LANGUAGE: 'LANGUAGE',
|
|
939
|
+
LOOP: 'LOOP',
|
|
940
|
+
NOT_APPLICABLE: 'NOT_APPLICABLE',
|
|
941
|
+
RESOLUTION: 'RESOLUTION',
|
|
942
|
+
BACK: 'BACK',
|
|
943
|
+
REWIND: 'REWIND',
|
|
944
|
+
ON: 'ON',
|
|
945
|
+
EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
|
|
946
|
+
STATISTICS: 'STATISTICS',
|
|
956
947
|
VOLUME: 'VOLUME',
|
|
957
|
-
|
|
948
|
+
QUALITY: 'QUALITY',
|
|
949
|
+
EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN',
|
|
950
|
+
PAUSE: 'PAUSE',
|
|
951
|
+
UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
|
|
952
|
+
REPLAY: 'REPLAY',
|
|
953
|
+
OFF: 'OFF',
|
|
954
|
+
AUTO_QUALITY: 'AUTO_QUALITY',
|
|
955
|
+
PLAYBACK_RATE: 'PLAYBACK_RATE',
|
|
956
|
+
SKIP_AD: 'SKIP_AD',
|
|
957
|
+
AD_TIME: 'AD_TIME',
|
|
958
958
|
ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE',
|
|
959
|
-
|
|
960
|
-
|
|
959
|
+
CAST: 'CAST',
|
|
960
|
+
MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES',
|
|
961
961
|
FULL_SCREEN: 'FULL_SCREEN',
|
|
962
962
|
};
|
|
@@ -243,7 +243,7 @@ e)}var e=0;return c("")};shaka.util.TXml.isNode=function(a){return!!a.tagName};s
|
|
|
243
243
|
shaka.util.TXml.findChildren=function(a,b){var c=[];if(!a.children)return[];a=$jscomp.makeIterator(a.children);for(var d=a.next();!d.done;d=a.next())d=d.value,d.tagName===b&&c.push(d);return c};shaka.util.TXml.getTextContents=function(a){var b=shaka.util.StringUtils;if("string"===typeof a)return b.htmlUnescape(a);a=a.children.reduce(function(c,d){return"string"===typeof d?c+d:c},"");return""===a?null:b.htmlUnescape(a)};
|
|
244
244
|
shaka.util.TXml.getContents=function(a){if(!Array.from(a.children).every(function(b){return"string"===typeof b}))return null;(a=shaka.util.TXml.getTextContents(a))&&(a=a.trim());return a};shaka.util.TXml.getElementsByTagName=function(a,b,c){c=void 0===c?[]:c;a.tagName===b&&c.push(a);if(a.children){a=$jscomp.makeIterator(a.children);for(var d=a.next();!d.done;d=a.next())shaka.util.TXml.getElementsByTagName(d.value,b,c)}return c};
|
|
245
245
|
shaka.util.TXml.findChild=function(a,b){a=shaka.util.TXml.findChildren(a,b);return 1!=a.length?null:a[0]};shaka.util.TXml.findChildNS=function(a,b,c){a=shaka.util.TXml.findChildrenNS(a,b,c);return 1!=a.length?null:a[0]};shaka.util.TXml.parseAttr=function(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.attributes[b];null!=a&&(e=c(a));return null==e?d:e};shaka.util.TXml.getAttributeNS=function(a,b,c){b=shaka.util.TXml.getKnownNameSpace(b);return a.attributes[b+":"+c]||null};
|
|
246
|
-
shaka.util.TXml.findChildrenNS=function(a,b,c){
|
|
246
|
+
shaka.util.TXml.findChildrenNS=function(a,b,c){var d=shaka.util.TXml.getKnownNameSpace(b);b=[];if(a.children)for(c=d?d+":"+c:c,a=$jscomp.makeIterator(a.children),d=a.next();!d.done;d=a.next())(d=d.value)&&d.tagName===c&&b.push(d);return b};shaka.util.TXml.getAttributeNSList=function(a,b,c){b=$jscomp.makeIterator(b);for(var d=b.next();!d.done;d=b.next())if(d=shaka.util.TXml.getAttributeNS(a,d.value,c))return d;return null};
|
|
247
247
|
shaka.util.TXml.parseDate=function(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3};
|
|
248
248
|
shaka.util.TXml.parseDuration=function(a){if(!a)return null;var b=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!b)return shaka.log.warning("Invalid duration string:",a),null;a=31536E3*Number(b[1]||null)+2592E3*Number(b[2]||null)+86400*Number(b[3]||null)+3600*Number(b[4]||null)+60*Number(b[5]||null)+Number(b[6]||null);return isFinite(a)?a:null};
|
|
249
249
|
shaka.util.TXml.parseRange=function(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null};shaka.util.TXml.parseInt=function(a){a=Number(a);return 0===a%1?a:null};shaka.util.TXml.parsePositiveInt=function(a){a=Number(a);return 0===a%1&&0<a?a:null};shaka.util.TXml.parseNonNegativeInt=function(a){a=Number(a);return 0===a%1&&0<=a?a:null};
|
|
@@ -797,10 +797,10 @@ shaka.media.MediaSourceEngine.prototype.clear=function(a){var b=this,c;return $j
|
|
|
797
797
|
null),0):d.jumpTo(0)})};shaka.media.MediaSourceEngine.prototype.resetCaptionParser=function(){this.captionParser_&&this.captionParser_.reset()};
|
|
798
798
|
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)})};
|
|
799
799
|
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_&&
|
|
800
|
-
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))
|
|
801
|
-
0)})};
|
|
802
|
-
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)},
|
|
803
|
-
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)})};
|
|
800
|
+
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)},
|
|
801
|
+
null));return m.length?p.yield(Promise.all(m),0):p.jumpTo(0)})};
|
|
802
|
+
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)},
|
|
803
|
+
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)})};
|
|
804
804
|
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)})};
|
|
805
805
|
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};
|
|
806
806
|
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)};
|
|
@@ -864,10 +864,10 @@ shaka.media.StallDetector.prototype.onStall=function(a){this.onStall_=a};shaka.m
|
|
|
864
864
|
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));
|
|
865
865
|
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};
|
|
866
866
|
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};
|
|
867
|
-
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_=
|
|
867
|
+
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_()})};
|
|
868
868
|
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_()};
|
|
869
|
-
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_};
|
|
870
|
-
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,
|
|
869
|
+
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_};
|
|
870
|
+
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,
|
|
871
871
|
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",
|
|
872
872
|
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))};
|
|
873
873
|
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_())})};
|
|
@@ -1072,9 +1072,9 @@ c.reader.getPosition());if(b&&b.includes(d)||this.config_.dispatchAllEmsgBoxes)i
|
|
|
1072
1072
|
d)&&(d=shaka.util.Id3Utils.getID3Frames(a),d.length))this.playerInterface_.onMetadata([{cueTime:l,data:a,frames:d,dts:l,pts:l}],0,b)};
|
|
1073
1073
|
shaka.media.StreamingEngine.prototype.parsePrft_=function(a,b){if(!this.parsedPrftEventRaised_&&a.initSegmentReference.timescale){goog.asserts.assert(0==b.version||1==b.version,"PRFT version can only be 0 or 1");b=shaka.util.Mp4BoxParsers.parsePRFTInaccurate(b.reader,b.version);a=a.initSegmentReference.timescale;var c=this.convertNtp(b.ntpTimestamp);a={wallClockTime:c,programStartDate:new Date(c-b.mediaTime/a*1E3)};b=shaka.util.FakeEvent.EventName.Prft;a=(new Map).set("detail",a);b=new shaka.util.FakeEvent(b,
|
|
1074
1074
|
a);this.playerInterface_.onEvent(b);this.parsedPrftEventRaised_=!0}};shaka.media.StreamingEngine.prototype.convertNtp=function(a){var b=new Date(Date.UTC(1900,0,1,0,0,0));return(new Date(b.getTime()+a)).getTime()};
|
|
1075
|
-
shaka.media.StreamingEngine.prototype.evict_=function(a,b){var c=this,d,e,f,g,h,k;return $jscomp.asyncExecutePromiseGeneratorProgram(function(l){if(1==l.nextAddress){d=a.stream.segmentIndex;d instanceof shaka.media.MetaSegmentIndex&&d.evict(c.manifest_.presentationTimeline.
|
|
1076
|
-
if(null==g)return c.lastTextMediaStateBeforeUnload_==a&&(c.lastTextMediaStateBeforeUnload_=null),shaka.log.v2(e,"buffer behind okay because nothing buffered:","presentationTime="+b,"bufferBehind="+f),l.return();h=b-g;k=h-f;if(k<=c.config_.evictionGoal)return shaka.log.v2(e,"buffer behind okay:","presentationTime="+b,"bufferedBehind="+h,"bufferBehind="+f,"evictionGoal="+c.config_.evictionGoal,"underflow="+Math.abs(k)),l.return();shaka.log.v1(e,
|
|
1077
|
-
h,"bufferBehind="+f,"evictionGoal="+c.config_.evictionGoal,"overflow="+k);return l.yield(c.playerInterface_.mediaSourceEngine.remove(a.type,g,g+k),2)}if(4!=l.nextAddress)return c.destroyer_.ensureNotDestroyed(),shaka.log.v1(e,"evicted "+k+" seconds"),c.lastTextMediaStateBeforeUnload_?l.yield(c.evict_(c.lastTextMediaStateBeforeUnload_,b),4):l.jumpTo(0);c.destroyer_.ensureNotDestroyed();l.jumpToEnd()})};
|
|
1075
|
+
shaka.media.StreamingEngine.prototype.evict_=function(a,b){var c=this,d,e,f,g,h,k;return $jscomp.asyncExecutePromiseGeneratorProgram(function(l){if(1==l.nextAddress){d=a.stream.segmentIndex;d instanceof shaka.media.MetaSegmentIndex&&d.evict(c.manifest_.presentationTimeline.getSegmentAvailabilityStart());e=shaka.media.StreamingEngine.logPrefix_(a);shaka.log.v2(e,"checking buffer length");f=Math.max(c.config_.bufferBehind*c.bufferingScale_,c.manifest_.presentationTimeline.getMaxSegmentDuration());g=
|
|
1076
|
+
c.playerInterface_.mediaSourceEngine.bufferStart(a.type);if(null==g)return c.lastTextMediaStateBeforeUnload_==a&&(c.lastTextMediaStateBeforeUnload_=null),shaka.log.v2(e,"buffer behind okay because nothing buffered:","presentationTime="+b,"bufferBehind="+f),l.return();h=b-g;k=h-f;if(k<=c.config_.evictionGoal)return shaka.log.v2(e,"buffer behind okay:","presentationTime="+b,"bufferedBehind="+h,"bufferBehind="+f,"evictionGoal="+c.config_.evictionGoal,"underflow="+Math.abs(k)),l.return();shaka.log.v1(e,
|
|
1077
|
+
"buffer behind too large:","presentationTime="+b,"bufferedBehind="+h,"bufferBehind="+f,"evictionGoal="+c.config_.evictionGoal,"overflow="+k);return l.yield(c.playerInterface_.mediaSourceEngine.remove(a.type,g,g+k),2)}if(4!=l.nextAddress)return c.destroyer_.ensureNotDestroyed(),shaka.log.v1(e,"evicted "+k+" seconds"),c.lastTextMediaStateBeforeUnload_?l.yield(c.evict_(c.lastTextMediaStateBeforeUnload_,b),4):l.jumpTo(0);c.destroyer_.ensureNotDestroyed();l.jumpToEnd()})};
|
|
1078
1078
|
shaka.media.StreamingEngine.isEmbeddedText_=function(a){var b=shaka.util.MimeUtils,c=b.CEA608_CLOSED_CAPTION_MIMETYPE;b=b.CEA708_CLOSED_CAPTION_MIMETYPE;return a&&a.type==shaka.util.ManifestParserUtils.ContentType.TEXT&&(a.stream.mimeType==c||a.stream.mimeType==b)};
|
|
1079
1079
|
shaka.media.StreamingEngine.prototype.fetch_=function(a,b,c){var d=this,e,f,g,h,k;return $jscomp.asyncExecutePromiseGeneratorProgram(function(l){switch(l.nextAddress){case 1:if(e=b.getSegmentData())return l.return(e);f=null;a.segmentPrefetch&&(f=a.segmentPrefetch.getPrefetchedSegment(b,c));f||(f=d.dispatchFetch_(b,a.stream,c));g=0;a.segmentIterator&&(g=a.segmentIterator.currentPosition());a.operation=f;return l.yield(f.promise,2);case 2:h=l.yieldResult;a.operation=null;k=h.data;if(!b.aesKey){l.jumpTo(3);
|
|
1080
1080
|
break}return l.yield(shaka.media.SegmentUtils.aesDecrypt(k,b.aesKey,g),4);case 4:k=l.yieldResult;case 3:return l.return(k)}})};shaka.media.StreamingEngine.prototype.dispatchFetch_=function(a,b,c,d){goog.asserts.assert(this.playerInterface_.netEngine,"Must have net engine");return shaka.media.StreamingEngine.dispatchFetch(a,b,c||null,this.config_.retryParameters,this.playerInterface_.netEngine)};
|
|
@@ -1120,18 +1120,18 @@ mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',liveSegm
|
|
|
1120
1120
|
"79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var e={retryParameters:shaka.net.NetworkingEngine.defaultRetryParameters(),failureCallback:function(m){shaka.log.error("Unhandled streaming error",m);return shaka.util.ConfigUtils.referenceParametersAndReturn([m],void 0)},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:.01,gapJumpTimerTime:.25,durationBackoff:1,
|
|
1121
1121
|
safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16E3,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,parsePrftBox:!1,segmentPrefetchLimit:0,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,
|
|
1122
1122
|
targetLatencyTolerance:.5,maxPlaybackRate:1.1,minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,infiniteLiveStreamDuration:!1,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:shaka.util.Platform.isPS4()||shaka.util.Platform.isPS5(),
|
|
1123
|
-
dontChooseCodecs:!1,shouldFixTimestampOffset:shaka.util.Platform.isWebOS()||shaka.util.Platform.isTizen()};if(shaka.util.Platform.isWebOS()||shaka.util.Platform.isTizen()||shaka.util.Platform.isChromecast()||shaka.util.Platform.isHisense())e.stallSkip=0;shaka.util.Platform.isTizen()&&(e.gapPadding=2);
|
|
1124
|
-
p.nextAddress)return navigator.storage&&navigator.storage.estimate?p.yield(navigator.storage.estimate(),3):p.return(!0);n=p.yieldResult;return p.return(n.usage+m<.95*n.quota)})},progressCallback:function(m,n){return shaka.util.ConfigUtils.referenceParametersAndReturn([m,n],void 0)},usePersistentLicense:!0,numberOfParallelDownloads:5};a={enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,
|
|
1125
|
-
maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:20,
|
|
1126
|
-
addExtraFeaturesToSourceBuffer:function(m){return shaka.util.ConfigUtils.referenceParametersAndReturn([m],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(m,n){return shaka.util.ConfigUtils.referenceParametersAndReturn([m,n],void 0)}};var g=!1,h=!1,k=!0;shaka.util.Platform.isSmartTV()&&(h=g=!0,k=!1);var l={drm:b,manifest:d,streaming:e,mediaSource:c,offline:f,
|
|
1127
|
-
preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,
|
|
1128
|
-
maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,
|
|
1129
|
-
f.trackSelectionCallback=function(m){return $jscomp.asyncExecutePromiseGeneratorProgram(function(n){return n.return(shaka.util.PlayerConfiguration.defaultTrackSelect(m,l.preferredAudioLanguage,l.preferredVideoHdrLevel))})};return l};
|
|
1123
|
+
dontChooseCodecs:!1,shouldFixTimestampOffset:shaka.util.Platform.isWebOS()||shaka.util.Platform.isTizen()},f=shaka.util.Platform.safariVersion();f&&17<=f&&(e.infiniteLiveStreamDuration=!0);if(shaka.util.Platform.isWebOS()||shaka.util.Platform.isTizen()||shaka.util.Platform.isChromecast()||shaka.util.Platform.isHisense())e.stallSkip=0;shaka.util.Platform.isTizen()&&(e.gapPadding=2);f={trackSelectionCallback:function(m){return $jscomp.asyncExecutePromiseGeneratorProgram(function(n){return n.return(m)})},
|
|
1124
|
+
downloadSizeCallback:function(m){var n;return $jscomp.asyncExecutePromiseGeneratorProgram(function(p){if(1==p.nextAddress)return navigator.storage&&navigator.storage.estimate?p.yield(navigator.storage.estimate(),3):p.return(!0);n=p.yieldResult;return p.return(n.usage+m<.95*n.quota)})},progressCallback:function(m,n){return shaka.util.ConfigUtils.referenceParametersAndReturn([m,n],void 0)},usePersistentLicense:!0,numberOfParallelDownloads:5};a={enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,
|
|
1125
|
+
switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:20,
|
|
1126
|
+
minTimeToSwitch:shaka.util.Platform.isApple()?.5:0,preferNetworkInformationBandwidth:!1};c={codecSwitchingStrategy:c,addExtraFeaturesToSourceBuffer:function(m){return shaka.util.ConfigUtils.referenceParametersAndReturn([m],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(m,n){return shaka.util.ConfigUtils.referenceParametersAndReturn([m,n],void 0)}};var g=!1,h=!1,k=!0;shaka.util.Platform.isSmartTV()&&(h=g=!0,k=!1);var l={drm:b,manifest:d,streaming:e,mediaSource:c,offline:f,
|
|
1127
|
+
abrFactory:function(){return new shaka.abr.SimpleAbrManager},abr:a,autoShowText:shaka.config.AutoShowText.IF_SUBTITLES_MAY_BE_NEEDED,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,
|
|
1128
|
+
maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,
|
|
1129
|
+
dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:g,skipPlayDetection:h,supportsMultipleMediaElements:k}};f.trackSelectionCallback=function(m){return $jscomp.asyncExecutePromiseGeneratorProgram(function(n){return n.return(shaka.util.PlayerConfiguration.defaultTrackSelect(m,l.preferredAudioLanguage,l.preferredVideoHdrLevel))})};return l};
|
|
1130
1130
|
shaka.util.PlayerConfiguration.mergeConfigObjects=function(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return shaka.util.ConfigUtils.mergeConfigObjects(a,b,c||shaka.util.PlayerConfiguration.createDefault(),d,"")};
|
|
1131
|
-
shaka.util.PlayerConfiguration.defaultTrackSelect=function(a,b,c){var d=shaka.util.ManifestParserUtils.ContentType,e=shaka.util.LanguageUtils,f=c;"AUTO"==f&&(f=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");var g=a.filter(function(l){return"variant"!=l.type||l.hdr&&l.hdr!=f?!1:!0});c=[];var h=e.findClosestLocale(b,g.map(function(l){return l.language}));h&&(c=g.filter(function(l){return e.normalize(l.language)==h}));0==c.length&&
|
|
1132
|
-
(1<(new Set(g.map(function(l){return l.language}))).size&&shaka.log.warning("Could not choose a good audio track based on language preferences or primary tracks. An arbitrary language will be stored!"),c=g);var k=c.filter(function(l){return l.height&&480>=l.height});k.length&&(k.sort(function(l,m){goog.asserts.assert(null!=l.height,"Null height");goog.asserts.assert(null!=m.height,"Null height");return m.height-l.height}),c=k.filter(function(l){return l.height==
|
|
1133
|
-
2),c.sort(function(l,m){return l.bandwidth-m.bandwidth}),b.push(c[g]));a=$jscomp.makeIterator(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=d.TEXT&&c.type!=d.IMAGE||b.push(c);return b};shaka.util.PlayerConfiguration.defaultManifestPreprocessor=function(a){return shaka.util.ConfigUtils.referenceParametersAndReturn([a],a)};
|
|
1134
|
-
goog.exportSymbol("shaka.util.PlayerConfiguration",shaka.util.PlayerConfiguration);goog.exportProperty(shaka.util.PlayerConfiguration,"mergeConfigObjects",shaka.util.PlayerConfiguration.mergeConfigObjects);goog.exportProperty(shaka.util.PlayerConfiguration,"createDefault",shaka.util.PlayerConfiguration.createDefault);shaka.media.PreloadManager=function(a,b,c,d){shaka.util.FakeEventTarget.call(this);this.assetUri_=a;this.mimeType_=b;this.networkingEngine_=d.networkingEngine;this.startTime_=c;this.currentAdaptationSetCriteria_=null;this.startTimeOfDrm_=0;this.createDrmEngine_=d.createDrmEngine;this.manifestFilterer_=d.manifestFilterer;this.manifestPlayerInterface_=d.manifestPlayerInterface;this.config_=d.config;this.parser_=this.parserFactory_=this.manifest_=null;this.parserEntrusted_=!1;this.regionTimeline_=d.regionTimeline;
|
|
1131
|
+
shaka.util.PlayerConfiguration.defaultTrackSelect=function(a,b,c){var d=shaka.util.ManifestParserUtils.ContentType,e=shaka.util.LanguageUtils,f=c;"AUTO"==f&&(f=window.matchMedia("(color-gamut: p3)").matches?a.some(function(l){return l.hdr&&"HLG"==l.hdr?!0:!1})?"HLG":"PQ":"SDR");var g=a.filter(function(l){return"variant"!=l.type||l.hdr&&l.hdr!=f?!1:!0});c=[];var h=e.findClosestLocale(b,g.map(function(l){return l.language}));h&&(c=g.filter(function(l){return e.normalize(l.language)==h}));0==c.length&&
|
|
1132
|
+
(c=g.filter(function(l){return l.primary}));0==c.length&&(1<(new Set(g.map(function(l){return l.language}))).size&&shaka.log.warning("Could not choose a good audio track based on language preferences or primary tracks. An arbitrary language will be stored!"),c=g);var k=c.filter(function(l){return l.height&&480>=l.height});k.length&&(k.sort(function(l,m){goog.asserts.assert(null!=l.height,"Null height");goog.asserts.assert(null!=m.height,"Null height");return m.height-l.height}),c=k.filter(function(l){return l.height==
|
|
1133
|
+
k[0].height}));b=[];c.length&&(g=Math.floor(c.length/2),c.sort(function(l,m){return l.bandwidth-m.bandwidth}),b.push(c[g]));a=$jscomp.makeIterator(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=d.TEXT&&c.type!=d.IMAGE||b.push(c);return b};shaka.util.PlayerConfiguration.defaultManifestPreprocessor=function(a){return shaka.util.ConfigUtils.referenceParametersAndReturn([a],a)};
|
|
1134
|
+
shaka.util.PlayerConfiguration.defaultManifestPreprocessorTXml=function(a){return shaka.util.ConfigUtils.referenceParametersAndReturn([a],a)};goog.exportSymbol("shaka.util.PlayerConfiguration",shaka.util.PlayerConfiguration);goog.exportProperty(shaka.util.PlayerConfiguration,"mergeConfigObjects",shaka.util.PlayerConfiguration.mergeConfigObjects);goog.exportProperty(shaka.util.PlayerConfiguration,"createDefault",shaka.util.PlayerConfiguration.createDefault);shaka.media.PreloadManager=function(a,b,c,d){shaka.util.FakeEventTarget.call(this);this.assetUri_=a;this.mimeType_=b;this.networkingEngine_=d.networkingEngine;this.startTime_=c;this.currentAdaptationSetCriteria_=null;this.startTimeOfDrm_=0;this.createDrmEngine_=d.createDrmEngine;this.manifestFilterer_=d.manifestFilterer;this.manifestPlayerInterface_=d.manifestPlayerInterface;this.config_=d.config;this.parser_=this.parserFactory_=this.manifest_=null;this.parserEntrusted_=!1;this.regionTimeline_=d.regionTimeline;
|
|
1135
1135
|
this.regionTimelineEntrusted_=!1;this.drmEngine_=null;this.drmEngineEntrusted_=!1;this.abrManager_=this.abrManagerFactory_=null;this.abrManagerEntrusted_=!1;this.segmentPrefetchById_=new Map;this.segmentPrefetchEntrusted_=!1;this.qualityObserver_=d.qualityObserver;this.stats_=new shaka.util.Stats;this.manifestPromise_=new shaka.util.PublicPromise;this.successPromise_=new shaka.util.PublicPromise;this.eventHandoffTarget_=null;this.destroyed_=!1;this.allowPrefetch_=d.allowPrefetch;this.prefetchedVariant_=
|
|
1136
1136
|
null;this.allowMakeAbrManager_=d.allowMakeAbrManager;this.hasBeenAttached_=!1;this.queuedOperations_=[];this.latePhaseQueuedOperations_=[];this.isPreload_=!0};$jscomp.inherits(shaka.media.PreloadManager,shaka.util.FakeEventTarget);shaka.media.PreloadManager.prototype.markIsLoad=function(){this.isPreload_=!1};shaka.media.PreloadManager.prototype.addQueuedOperation=function(a,b){(a=a?this.latePhaseQueuedOperations_:this.queuedOperations_)?a.push(b):b()};
|
|
1137
1137
|
shaka.media.PreloadManager.prototype.stopQueuingLatePhaseQueuedOperations=function(){if(this.latePhaseQueuedOperations_)for(var a=$jscomp.makeIterator(this.latePhaseQueuedOperations_),b=a.next();!b.done;b=a.next())b=b.value,b();this.latePhaseQueuedOperations_=null};
|
|
@@ -1167,8 +1167,8 @@ shaka.media.RegionObserver.prototype.poll=function(a,b){var c=shaka.media.Region
|
|
|
1167
1167
|
shaka.media.RegionObserver.prototype.onEvent_=function(a,b,c){a=new shaka.util.FakeEvent(a,new Map([["region",b],["seeking",c]]));this.dispatchEvent(a)};shaka.media.RegionObserver.determinePositionRelativeTo_=function(a,b){var c=shaka.media.RegionObserver.RelativePosition_;return b<a.startTime?c.BEFORE_THE_REGION:b>a.endTime?c.AFTER_THE_REGION:c.IN_THE_REGION};shaka.media.RegionObserver.RelativePosition_={BEFORE_THE_REGION:1,IN_THE_REGION:2,AFTER_THE_REGION:3};shaka.net.NetworkingUtils=function(){};
|
|
1168
1168
|
shaka.net.NetworkingUtils.getMimeType=function(a,b,c){var d,e,f,g,h,k,l;return $jscomp.asyncExecutePromiseGeneratorProgram(function(m){switch(m.nextAddress){case 1:d=shaka.net.NetworkingUtils.getExtension_(a);if(e=shaka.net.NetworkingUtils.EXTENSIONS_TO_MIME_TYPES_[d])return m.return(e);f=shaka.net.NetworkingEngine.RequestType.MANIFEST;g=shaka.net.NetworkingEngine.makeRequest([a],c);m.setCatchFinallyBlocks(2);g.method="HEAD";return m.yield(b.request(f,g).promise,4);case 4:h=m.yieldResult;e=h.headers["content-type"];
|
|
1169
1169
|
m.leaveTryBlock(3);break;case 2:k=m.enterCatchBlock();if(!k||k.code!=shaka.util.Error.Code.HTTP_ERROR&&k.code!=shaka.util.Error.Code.BAD_HTTP_STATUS){m.jumpTo(3);break}g.method="GET";return m.yield(b.request(f,g).promise,6);case 6:l=m.yieldResult,e=l.headers["content-type"];case 3:return m.return(e?e.toLowerCase().split(";").shift():"")}})};shaka.net.NetworkingUtils.getExtension_=function(a){a=(new goog.Uri(a)).getPath().split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()};
|
|
1170
|
-
shaka.net.NetworkingUtils.EXTENSIONS_TO_MIME_TYPES_={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",
|
|
1171
|
-
ssa:"text/x-ssa",ass:"text/x-ssa",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"};shaka.text.Utils=function(){};
|
|
1170
|
+
shaka.net.NetworkingUtils.EXTENSIONS_TO_MIME_TYPES_={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",mov:"video/quicktime",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",
|
|
1171
|
+
lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"};shaka.text.Utils=function(){};
|
|
1172
1172
|
shaka.text.Utils.flattenPayload_=function(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return shaka.text.Utils.flattenPayload_(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=a.fontWeight>=shaka.text.Cue.fontWeight.BOLD,e=a.fontStyle==shaka.text.Cue.fontStyle.ITALIC,f=a.textDecoration.includes(shaka.text.Cue.textDecoration.UNDERLINE);d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=shaka.text.Utils.getColorName_(e))&&
|
|
1173
1173
|
(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=shaka.text.Utils.getColorName_(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=$jscomp.makeIterator(h);h=k.next().value;k=k.next().value;return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)};
|
|
1174
1174
|
shaka.text.Utils.getColorName_=function(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
|
|
@@ -1524,8 +1524,8 @@ shaka.Player.getLanguageAndRolesFrom_=function(a){var b=new Map,c=new Map;a=$jsc
|
|
|
1524
1524
|
l){k=$jscomp.makeIterator(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));h.push({language:l,role:m,label:n})}});return h};
|
|
1525
1525
|
shaka.Player.prototype.isBufferedToEndMS_=function(){goog.asserts.assert(this.video_,"We need a video element to get buffering information");goog.asserts.assert(this.mediaSourceEngine_,"We need a media source engine to get buffering information");goog.asserts.assert(this.manifest_,"We need a manifest to get buffering information");if(this.isEnded()||this.mediaSourceEngine_.ended())return!0;if(this.manifest_.presentationTimeline.isLive()){var a=this.manifest_.presentationTimeline.getSegmentAvailabilityEnd(),
|
|
1526
1526
|
b=shaka.media.TimeRangesUtils.bufferEnd(this.video_.buffered);if(null!=b&&b>=a)return!0}return!1};shaka.Player.prototype.isBufferedToEndSrc_=function(){goog.asserts.assert(this.video_,"We need a video element to get buffering information");if(this.isEnded())return!0;var a=shaka.media.TimeRangesUtils.bufferEnd(this.video_.buffered);return null!=a&&a>=this.video_.duration-1};
|
|
1527
|
-
shaka.Player.prototype.createAbortLoadError_=function(){return new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.PLAYER,shaka.util.Error.Code.LOAD_INTERRUPTED)};shaka.Player.prototype.isRemotePlayback=function(){return this.video_&&this.video_.remote?"disconnected"!=this.video_.remote.state:!1};shaka.Player.prototype.isEnded=function(){return!this.video_||this.video_.ended?!0:this.video_.currentTime>=this.seekRange().end};
|
|
1528
|
-
goog.exportProperty(shaka.Player.prototype,"isEnded",shaka.Player.prototype.isEnded);goog.exportProperty(shaka.Player.prototype,"isRemotePlayback",shaka.Player.prototype.isRemotePlayback);goog.exportProperty(shaka.Player.prototype,"addFont",shaka.Player.prototype.addFont);goog.exportProperty(shaka.Player.prototype,"setVideoContainer",shaka.Player.prototype.setVideoContainer);goog.exportProperty(shaka.Player.prototype,"getFetchedPlaybackInfo",shaka.Player.prototype.getFetchedPlaybackInfo);
|
|
1527
|
+
shaka.Player.prototype.createAbortLoadError_=function(){return new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.PLAYER,shaka.util.Error.Code.LOAD_INTERRUPTED)};shaka.Player.prototype.isRemotePlayback=function(){return this.video_&&this.video_.remote?"disconnected"!=this.video_.remote.state:!1};shaka.Player.prototype.isEnded=function(){return!this.video_||this.video_.ended?!0:this.fullyLoaded_&&!this.isLive()&&this.video_.currentTime>=this.seekRange().end};
|
|
1528
|
+
goog.exportSymbol("shaka.Player",shaka.Player);goog.exportProperty(shaka.Player.prototype,"isEnded",shaka.Player.prototype.isEnded);goog.exportProperty(shaka.Player.prototype,"isRemotePlayback",shaka.Player.prototype.isRemotePlayback);goog.exportProperty(shaka.Player.prototype,"addFont",shaka.Player.prototype.addFont);goog.exportProperty(shaka.Player.prototype,"setVideoContainer",shaka.Player.prototype.setVideoContainer);goog.exportProperty(shaka.Player.prototype,"getFetchedPlaybackInfo",shaka.Player.prototype.getFetchedPlaybackInfo);
|
|
1529
1529
|
goog.exportProperty(shaka.Player.prototype,"getManifestParserFactory",shaka.Player.prototype.getManifestParserFactory);goog.exportProperty(shaka.Player.prototype,"getManifest",shaka.Player.prototype.getManifest);goog.exportProperty(shaka.Player.prototype,"retryStreaming",shaka.Player.prototype.retryStreaming);goog.exportProperty(shaka.Player.prototype,"setMaxHardwareResolution",shaka.Player.prototype.setMaxHardwareResolution);goog.exportProperty(shaka.Player.prototype,"addChaptersTrack",shaka.Player.prototype.addChaptersTrack);
|
|
1530
1530
|
goog.exportProperty(shaka.Player.prototype,"addThumbnailsTrack",shaka.Player.prototype.addThumbnailsTrack);goog.exportProperty(shaka.Player.prototype,"addTextTrackAsync",shaka.Player.prototype.addTextTrackAsync);goog.exportProperty(shaka.Player.prototype,"getStats",shaka.Player.prototype.getStats);goog.exportProperty(shaka.Player.prototype,"getBufferedInfo",shaka.Player.prototype.getBufferedInfo);goog.exportProperty(shaka.Player.prototype,"getSegmentAvailabilityDuration",shaka.Player.prototype.getSegmentAvailabilityDuration);
|
|
1531
1531
|
goog.exportProperty(shaka.Player.prototype,"getPresentationStartTimeAsDate",shaka.Player.prototype.getPresentationStartTimeAsDate);goog.exportProperty(shaka.Player.prototype,"getPlayheadTimeAsDate",shaka.Player.prototype.getPlayheadTimeAsDate);goog.exportProperty(shaka.Player.prototype,"setTextTrackVisibility",shaka.Player.prototype.setTextTrackVisibility);goog.exportProperty(shaka.Player.prototype,"getChapters",shaka.Player.prototype.getChapters);
|
|
@@ -1540,7 +1540,7 @@ goog.exportProperty(shaka.Player.prototype,"getMediaElement",shaka.Player.protot
|
|
|
1540
1540
|
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);
|
|
1541
1541
|
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);
|
|
1542
1542
|
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);
|
|
1543
|
-
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.
|
|
1543
|
+
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";
|
|
1544
1544
|
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_++};
|
|
1545
1545
|
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};
|
|
1546
1546
|
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_};
|
|
@@ -1908,8 +1908,8 @@ shaka.cea.DtvccPacketBuilder.DTVCC_PACKET_DATA=2;shaka.cea.DtvccPacketBuilder.DT
|
|
|
1908
1908
|
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&
|
|
1909
1909
|
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))};
|
|
1910
1910
|
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]"))};
|
|
1911
|
-
shaka.cea.Cea708Service.prototype.handleC0_=function(a,b,c){if(!this.currentWindow_)return null;if(24==b)
|
|
1912
|
-
|
|
1911
|
+
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()&&
|
|
1912
|
+
(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};
|
|
1913
1913
|
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?
|
|
1914
1914
|
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])};
|
|
1915
1915
|
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};
|
|
@@ -2039,9 +2039,9 @@ shaka.dash.SegmentList.parseMediaSegments_=function(a){var b=[a.representation.s
|
|
|
2039
2039
|
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(){};
|
|
2040
2040
|
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);
|
|
2041
2041
|
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),
|
|
2042
|
-
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);
|
|
2043
|
-
|
|
2044
|
-
|
|
2042
|
+
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(),
|
|
2043
|
+
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,
|
|
2044
|
+
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};
|
|
2045
2045
|
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};
|
|
2046
2046
|
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,
|
|
2047
2047
|
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}};
|
|
@@ -2057,12 +2057,14 @@ K,"Generated a segment outside of the period!");var O=[],P=b.numChunks;if(P)for(
|
|
|
2057
2057
|
A=m.getSegmentAvailabilityEnd()<r();F=m.isLive();if(A||F){var G=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=[];G<=J;){var K=D(G);M.push(K);G++}return L>r()&&!M.length?null:M})}return Promise.resolve(E)};
|
|
2058
2058
|
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,
|
|
2059
2059
|
"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};
|
|
2060
|
-
shaka.dash.TimelineSegmentIndex=function(a,b,c,d,e,f,g,h,k,l
|
|
2060
|
+
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);
|
|
2061
2061
|
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};
|
|
2062
2062
|
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())}};
|
|
2063
|
-
shaka.dash.TimelineSegmentIndex.prototype.appendTemplateInfo=function(a,b,c,d
|
|
2064
|
-
$jscomp.arrayFromIterable(a)));this.periodEnd_!==c&&(this.periodEnd_=c)}else this.templateInfo_=a,this.periodStart_=b,this.periodEnd_=c;
|
|
2065
|
-
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};
|
|
2063
|
+
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,
|
|
2064
|
+
$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)}};
|
|
2065
|
+
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};
|
|
2066
|
+
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_)}};
|
|
2067
|
+
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};
|
|
2066
2068
|
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};
|
|
2067
2069
|
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=
|
|
2068
2070
|
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,
|
|
@@ -2163,12 +2165,12 @@ d.parseAttr(a,"publishTime",d.parseDate)||0;c.patchLocationNodes_=d.findChildren
|
|
|
2163
2165
|
c.contentSteeringManager_.setBaseUris(e),c.contentSteeringManager_.setDefaultPathwayId(v),x=d.getContents(u))(w=d.parseAttr(u,"queryBeforeStart",d.parseBoolean,!1))?t=c.contentSteeringManager_.requestInfo(x):c.contentSteeringManager_.requestInfo(x);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(F=$jscomp.makeIterator(A),H=F.next();!H.done;H=
|
|
2164
2166
|
F.next())E=H.value,G=E.attributes.serviceLocation,L=d.getContents(E),G&&L&&(c.contentSteeringManager_.addLocation("BaseURL",G,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&&
|
|
2165
2167
|
(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));
|
|
2166
|
-
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=$jscomp.makeIterator(Object.values(c.streamMap_)),V
|
|
2167
|
-
else
|
|
2168
|
-
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_&&
|
|
2169
|
-
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,
|
|
2170
|
-
{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),
|
|
2171
|
-
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()}})};
|
|
2168
|
+
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=
|
|
2169
|
+
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=
|
|
2170
|
+
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_&&
|
|
2171
|
+
(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,
|
|
2172
|
+
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),
|
|
2173
|
+
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()}})};
|
|
2172
2174
|
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()})};
|
|
2173
2175
|
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,x,w,z,B,C,y,A,D,F,H,E,G,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,
|
|
2174
2176
|
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===
|
|
@@ -2263,7 +2265,7 @@ shaka.util.Error.Code.HLS_INVALID_PLAYLIST_HIERARCHY);c=d.splice(f,d.length-f);c
|
|
|
2263
2265
|
shaka.hls.ManifestTextParser.prototype.parseSegments_=function(a,b){var c=[],d=[],e=[],f=null;a=$jscomp.makeIterator(a);for(var g=a.next();!g.done;g=a.next())g=g.value,/^(#EXT)/.test(g)?(g=this.parseTag_(g),shaka.hls.ManifestTextParser.MEDIA_PLAYLIST_TAGS.includes(g.name)?b.push(g):"EXT-X-MAP"==g.name?f=g:"EXT-X-PART"==g.name?e.push(g):"EXT-X-PRELOAD-HINT"==g.name?"PART"==g.getAttributeValue("TYPE")?e.push(g):"MAP"==g.getAttributeValue("TYPE")&&(g.setName("EXT-X-MAP"),f=g):d.push(g)):shaka.hls.Utils.isComment(g)||
|
|
2264
2266
|
(g=g.trim(),f&&d.push(f),d=new shaka.hls.Segment(g,d,e),c.push(d),d=[],e=[]);e.length&&(f&&d.push(f),b=new shaka.hls.Segment("",d,e),c.push(b));return c};shaka.hls.ManifestTextParser.prototype.parseTag_=function(a){return shaka.hls.ManifestTextParser.parseTag(this.globalId_++,a)};
|
|
2265
2267
|
shaka.hls.ManifestTextParser.parseTag=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.MANIFEST,shaka.util.Error.Code.INVALID_HLS_TAG,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new shaka.util.TextParser(d);var f,g=d.readRegex(/^([^,=]+)(?:,|$)/g);g&&(e=g[1]);for(g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=d.readRegex(g);)f=new shaka.hls.Attribute(f[1],f[2]||f[3]),c.push(f),d.skipWhitespace()}return new shaka.hls.Tag(a,
|
|
2266
|
-
b,c,e)};shaka.hls.ManifestTextParser.MEDIA_PLAYLIST_TAGS="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF EXT-X-DATERANGE".split(" ");shaka.hls.ManifestTextParser.SEGMENT_TAGS="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP".split(" ");shaka.net.DataUriPlugin=function(){};shaka.net.DataUriPlugin.parse=function(a,b,c,d){try{var e=shaka.net.DataUriPlugin.parseRaw(a);return shaka.util.AbortableOperation.completed({uri:a,originalUri:a,data:e.data,headers:{"content-type":e.contentType}})}catch(f){return shaka.util.AbortableOperation.failed(f)}};
|
|
2268
|
+
b,c,e)};shaka.hls.ManifestTextParser.MEDIA_PLAYLIST_TAGS="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF EXT-X-DATERANGE".split(" ");shaka.hls.ManifestTextParser.SEGMENT_TAGS="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP EXT-X-TILES".split(" ");shaka.net.DataUriPlugin=function(){};shaka.net.DataUriPlugin.parse=function(a,b,c,d){try{var e=shaka.net.DataUriPlugin.parseRaw(a);return shaka.util.AbortableOperation.completed({uri:a,originalUri:a,data:e.data,headers:{"content-type":e.contentType}})}catch(f){return shaka.util.AbortableOperation.failed(f)}};
|
|
2267
2269
|
shaka.net.DataUriPlugin.parseRaw=function(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw shaka.log.error("Bad data URI, failed to parse scheme"),new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.NETWORK,shaka.util.Error.Code.MALFORMED_DATA_URI,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw shaka.log.error("Bad data URI, failed to extract encoding and MIME type"),new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.NETWORK,
|
|
2268
2270
|
shaka.util.Error.Code.MALFORMED_DATA_URI,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());return{data:d?shaka.util.Uint8ArrayUtils.fromBase64(a):shaka.util.StringUtils.toUTF8(a),contentType:c}};goog.exportSymbol("shaka.net.DataUriPlugin",shaka.net.DataUriPlugin);goog.exportProperty(shaka.net.DataUriPlugin,"parse",shaka.net.DataUriPlugin.parse);shaka.net.NetworkingEngine.registerScheme("data",shaka.net.DataUriPlugin.parse);shaka.hls.HlsParser=function(){var a=this;this.config_=this.playerInterface_=null;this.globalId_=1;this.globalVariables_=new Map;this.groupIdToStreamInfosMap_=new Map;this.mediaSequenceToStartTimeByType_=new Map;var b=shaka.util.ManifestParserUtils.ContentType;this.mediaSequenceToStartTimeByType_.set(b.VIDEO,new Map);this.mediaSequenceToStartTimeByType_.set(b.AUDIO,new Map);this.mediaSequenceToStartTimeByType_.set(b.TEXT,new Map);this.mediaSequenceToStartTimeByType_.set(b.IMAGE,new Map);this.variantUriSet_=
|
|
2269
2271
|
new Set;this.uriToStreamInfosMap_=new Map;this.presentationTimeline_=null;this.masterPlaylistUri_="";this.manifestTextParser_=new shaka.hls.ManifestTextParser;this.minSequenceNumber_=-1;this.lowestSyncTime_=Infinity;this.codecInfoInManifest_=this.streamsFinalized_=this.usesProgramDateTime_=!1;this.updatePlaylistTimer_=new shaka.util.Timer(function(){if(a.mediaElement_&&!a.config_.continueLoadingWhenPaused&&(a.eventManager_.unlisten(a.mediaElement_,"timeupdate"),a.mediaElement_.paused)){a.eventManager_.listenOnce(a.mediaElement_,
|