shaka-player 4.9.20 → 4.9.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 CHANGED
@@ -761,49 +761,49 @@ shaka.ui.Locales.addTo = function(localization) {
761
761
  * @const
762
762
  */
763
763
  shaka.ui.Locales.Ids = {
764
- EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
765
- MORE_SETTINGS: 'MORE_SETTINGS',
766
- OFF: 'OFF',
767
- SKIP_TO_LIVE: 'SKIP_TO_LIVE',
768
- EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
769
- AD_DURATION: 'AD_DURATION',
770
- TOGGLE_STEREOSCOPIC: 'TOGGLE_STEREOSCOPIC',
771
- UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
772
764
  AD_TIME: 'AD_TIME',
773
- ENTER_LOOP_MODE: 'ENTER_LOOP_MODE',
774
- SKIP_AD: 'SKIP_AD',
765
+ MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES',
766
+ LOOP: 'LOOP',
767
+ PLAY: 'PLAY',
768
+ CAST: 'CAST',
769
+ SKIP_TO_LIVE: 'SKIP_TO_LIVE',
775
770
  VOLUME: 'VOLUME',
776
- AUTO_QUALITY: 'AUTO_QUALITY',
777
- ON: 'ON',
778
- PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE',
779
- LIVE: 'LIVE',
771
+ SURROUND: 'SURROUND',
780
772
  BACK: 'BACK',
773
+ SUBTITLE_FORCED: 'SUBTITLE_FORCED',
774
+ AD_DURATION: 'AD_DURATION',
775
+ RESOLUTION: 'RESOLUTION',
776
+ AD_STATISTICS: 'AD_STATISTICS',
777
+ FAST_FORWARD: 'FAST_FORWARD',
778
+ AUTO_QUALITY: 'AUTO_QUALITY',
779
+ ENTER_LOOP_MODE: 'ENTER_LOOP_MODE',
781
780
  UNMUTE: 'UNMUTE',
781
+ AD_PROGRESS: 'AD_PROGRESS',
782
+ SKIP_AD: 'SKIP_AD',
783
+ TOGGLE_STEREOSCOPIC: 'TOGGLE_STEREOSCOPIC',
782
784
  MUTE: 'MUTE',
785
+ QUALITY: 'QUALITY',
786
+ REPLAY: 'REPLAY',
787
+ RECENTER_VR: 'RECENTER_VR',
788
+ ON: 'ON',
789
+ PAUSE: 'PAUSE',
790
+ STATISTICS: 'STATISTICS',
783
791
  LANGUAGE: 'LANGUAGE',
784
- CAST: 'CAST',
785
- PLAYBACK_RATE: 'PLAYBACK_RATE',
786
- EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN',
787
- AIRPLAY: 'AIRPLAY',
788
- FAST_FORWARD: 'FAST_FORWARD',
789
- FULL_SCREEN: 'FULL_SCREEN',
790
792
  NOT_APPLICABLE: 'NOT_APPLICABLE',
791
- PLAY: 'PLAY',
792
- SEEK: 'SEEK',
793
- UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
793
+ REWIND: 'REWIND',
794
794
  ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE',
795
- PAUSE: 'PAUSE',
796
- MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES',
797
- RESOLUTION: 'RESOLUTION',
795
+ UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
796
+ AIRPLAY: 'AIRPLAY',
797
+ LIVE: 'LIVE',
798
798
  CAPTIONS: 'CAPTIONS',
799
- SUBTITLE_FORCED: 'SUBTITLE_FORCED',
800
- STATISTICS: 'STATISTICS',
801
- LOOP: 'LOOP',
802
- QUALITY: 'QUALITY',
803
- AD_STATISTICS: 'AD_STATISTICS',
804
- RECENTER_VR: 'RECENTER_VR',
805
- SURROUND: 'SURROUND',
806
- REPLAY: 'REPLAY',
807
- REWIND: 'REWIND',
808
- AD_PROGRESS: 'AD_PROGRESS',
799
+ EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
800
+ EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
801
+ FULL_SCREEN: 'FULL_SCREEN',
802
+ OFF: 'OFF',
803
+ PLAYBACK_RATE: 'PLAYBACK_RATE',
804
+ PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE',
805
+ UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
806
+ MORE_SETTINGS: 'MORE_SETTINGS',
807
+ SEEK: 'SEEK',
808
+ EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN',
809
809
  };
@@ -1010,9 +1010,9 @@ A.projection=F.projection}).box("hfov",function(F){F=I.parseHFOV(F.reader);A.hfo
1010
1010
  break;case 2:throw G=H.enterCatchBlock(),a.lastInitSegmentReference=null,G;}})},c.playerInterface_.onInitSegmentAppended(b.startTime,b.initSegmentReference),h.push(u()))),c.manifest_.sequenceMode&&(x=a.lastSegmentReference?a.lastSegmentReference.discontinuitySequence:null,b.discontinuitySequence!=x&&h.push(c.playerInterface_.mediaSourceEngine.resync(a.type,b.startTime))),w.yield(Promise.all(h),0)}})};
1011
1011
  shaka.media.StreamingEngine.prototype.append_=function(a,b,c,d,e,f){f=void 0===f?!1:f;var g=this,h,k,l,m,n,p,q;return $jscomp.asyncExecutePromiseGeneratorProgram(function(r){switch(r.nextAddress){case 1:h=shaka.media.StreamingEngine.logPrefix_(a);k=c.closedCaptions&&0<c.closedCaptions.size;m=null!=c.emsgSchemeIdUris&&0<c.emsgSchemeIdUris.length||g.config_.dispatchAllEmsgBoxes;n=g.config_.parsePrftBox&&!g.parsedPrftEventRaised_;if(m||n)l=new shaka.util.Mp4Parser;m&&l.fullBox("emsg",function(t){return g.parseEMSG_(d,
1012
1012
  c.emsgSchemeIdUris,t)});n&&l.fullBox("prft",function(t){return g.parsePrft_(d,t)});(m||n)&&l.parse(e);return r.yield(g.evict_(a,b),2);case 2:return g.destroyer_.ensureNotDestroyed(),p=a.seeked,a.seeked=!1,q=a.adaptation,a.adaptation=!1,r.yield(g.playerInterface_.beforeAppendSegment(a.type,e),3);case 3:return r.yield(g.playerInterface_.mediaSourceEngine.appendBuffer(a.type,e,d,c,k,p,q,f),4);case 4:g.destroyer_.ensureNotDestroyed(),shaka.log.v2(h,"appended media segment"),r.jumpToEnd()}})};
1013
- shaka.media.StreamingEngine.prototype.parseEMSG_=function(a,b,c){if(0===c.version){var d=c.reader.readTerminatedString();var e=c.reader.readTerminatedString();var f=c.reader.readUint32();var g=c.reader.readUint32();var h=c.reader.readUint32();var k=c.reader.readUint32();var l=a.startTime+g/f}else f=c.reader.readUint32(),l=c.reader.readUint64()/f+a.timestampOffset,g=l-a.startTime,h=c.reader.readUint32(),k=c.reader.readUint32(),d=c.reader.readTerminatedString(),e=c.reader.readTerminatedString();c=c.reader.readBytes(c.reader.getLength()-
1014
- c.reader.getPosition());if(b&&b.includes(d)||this.config_.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==d)this.playerInterface_.onManifestUpdate();else if(f={startTime:l,endTime:l+h/f,schemeIdUri:d,value:e,timescale:f,presentationTimeDelta:g,eventDuration:h,id:k,messageData:c},b=shaka.util.FakeEvent.EventName.Emsg,f=(new Map).set("detail",f),b=new shaka.util.FakeEvent(b,f),b.cancelable=!0,this.playerInterface_.onEvent(b),!b.defaultPrevented&&("https://aomedia.org/emsg/ID3"==d||"https://developer.apple.com/streaming/emsg-id3"==
1015
- d)&&(d=shaka.util.Id3Utils.getID3Frames(c),d.length&&a))this.playerInterface_.onMetadata([{cueTime:a.startTime,data:c,frames:d,dts:a.startTime,pts:a.startTime}],0,a.endTime)};
1013
+ shaka.media.StreamingEngine.prototype.parseEMSG_=function(a,b,c){if(0===c.version){var d=c.reader.readTerminatedString();var e=c.reader.readTerminatedString();var f=c.reader.readUint32();var g=c.reader.readUint32();var h=c.reader.readUint32();var k=c.reader.readUint32();var l=a.startTime+g/f}else f=c.reader.readUint32(),l=c.reader.readUint64()/f+a.timestampOffset,g=l-a.startTime,h=c.reader.readUint32(),k=c.reader.readUint32(),d=c.reader.readTerminatedString(),e=c.reader.readTerminatedString();a=c.reader.readBytes(c.reader.getLength()-
1014
+ c.reader.getPosition());if(b&&b.includes(d)||this.config_.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==d)this.playerInterface_.onManifestUpdate();else if(b=l+h/f,k={startTime:l,endTime:b,schemeIdUri:d,value:e,timescale:f,presentationTimeDelta:g,eventDuration:h,id:k,messageData:a},f=shaka.util.FakeEvent.EventName.Emsg,k=(new Map).set("detail",k),f=new shaka.util.FakeEvent(f,k),f.cancelable=!0,this.playerInterface_.onEvent(f),!f.defaultPrevented&&("https://aomedia.org/emsg/ID3"==d||"https://developer.apple.com/streaming/emsg-id3"==
1015
+ d)&&(d=shaka.util.Id3Utils.getID3Frames(a),d.length))this.playerInterface_.onMetadata([{cueTime:l,data:a,frames:d,dts:l,pts:l}],0,b)};
1016
1016
  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,
1017
1017
  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()};
1018
1018
  shaka.media.StreamingEngine.prototype.evict_=function(a,b){var c=this,d,e,f,g,h;return $jscomp.asyncExecutePromiseGeneratorProgram(function(k){if(1==k.nextAddress){d=shaka.media.StreamingEngine.logPrefix_(a);shaka.log.v2(d,"checking buffer length");e=Math.max(c.config_.bufferBehind,c.manifest_.presentationTimeline.getMaxSegmentDuration());f=c.playerInterface_.mediaSourceEngine.bufferStart(a.type);if(null==f)return shaka.log.v2(d,"buffer behind okay because nothing buffered:","presentationTime="+b,
@@ -1149,11 +1149,12 @@ shaka.text.UITextDisplayer.prototype.computeCuePositionAlignment_=function(a){va
1149
1149
  b.positionAlign.CENTER};
1150
1150
  shaka.text.UITextDisplayer.prototype.setCaptionStyles_=function(a,b,c,d){var e=shaka.text.Cue,f=a.style,g=0==b.nestedCues.length,h=1<c.length;f.whiteSpace="pre-wrap";var k=b.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=b.textStrokeColor;f.webkitTextStrokeWidth=b.textStrokeWidth;f.color=b.color;f.direction=b.direction;f.opacity=b.opacity;f.paddingLeft=shaka.text.UITextDisplayer.convertLengthValue_(b.linePadding,b,this.videoContainer_);f.paddingRight=
1151
1151
  shaka.text.UITextDisplayer.convertLengthValue_(b.linePadding,b,this.videoContainer_);f.textCombineUpright=b.textCombineUpright;f.textShadow=b.textShadow;if(b.backgroundImage)f.backgroundImage="url('"+b.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",b.backgroundColor&&(f.backgroundColor=b.backgroundColor),f.width="100%",f.height="100%";else{if(b.nestedCues.length)var l=a;else l=shaka.util.Dom.createHTMLElement("span"),a.appendChild(l);b.border&&
1152
- (l.style.border=b.border);!d&&((a=shaka.text.UITextDisplayer.inheritProperty_(c,function(m){return m.backgroundColor}))?l.style.backgroundColor=a:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),a=shaka.text.UITextDisplayer.inheritProperty_(c,function(m){return m.fontFamily}))&&(l.style.fontFamily=a);k&&(l.textContent=k)}h&&!c[c.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent=b.displayAlign==e.displayAlign.BEFORE?"flex-start":
1153
- b.displayAlign==e.displayAlign.CENTER?"center":"flex-end");g||(f.margin="0");f.fontFamily=b.fontFamily;f.fontWeight=b.fontWeight.toString();f.fontStyle=b.fontStyle;f.letterSpacing=b.letterSpacing;f.fontSize=shaka.text.UITextDisplayer.convertLengthValue_(b.fontSize,b,this.videoContainer_);c=b.line;null!=c&&(g=b.lineInterpretation,g==e.lineInterpretation.LINE_NUMBER&&(g=e.lineInterpretation.PERCENTAGE,h=16,this.aspectRatio_&&1>this.aspectRatio_&&(h=32),c=0>c?100+c/h*100:c/h*100),g==e.lineInterpretation.PERCENTAGE&&
1154
- (f.position="absolute",b.writingMode==e.writingMode.HORIZONTAL_TOP_TO_BOTTOM?(f.width="100%",b.lineAlign==e.lineAlign.START?f.top=c+"%":b.lineAlign==e.lineAlign.END&&(f.bottom=100-c+"%")):b.writingMode==e.writingMode.VERTICAL_LEFT_TO_RIGHT?(f.height="100%",b.lineAlign==e.lineAlign.START?f.left=c+"%":b.lineAlign==e.lineAlign.END&&(f.right=100-c+"%")):(f.height="100%",b.lineAlign==e.lineAlign.START?f.right=c+"%":b.lineAlign==e.lineAlign.END&&(f.left=100-c+"%"))));f.lineHeight=b.lineHeight;null!=b.position&&
1155
- (b.writingMode==e.writingMode.HORIZONTAL_TOP_TO_BOTTOM?f.paddingLeft=b.position:f.paddingTop=b.position);c=this.computeCuePositionAlignment_(b);c==e.positionAlign.LEFT?f.cssFloat="left":c==e.positionAlign.RIGHT&&(f.cssFloat="right");f.textAlign=b.textAlign;f.textDecoration=b.textDecoration.join(" ");f.writingMode=b.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==b.writingMode||(f.webkitWritingMode=b.writingMode);b.size&&(b.writingMode==e.writingMode.HORIZONTAL_TOP_TO_BOTTOM?
1156
- f.width=b.size+"%":f.height=b.size+"%")};shaka.text.UITextDisplayer.getLengthValueInfo_=function(a){return(a=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(a[1]),unit:a[2]}:null};
1152
+ (l.style.border=b.border);!d&&((a=shaka.text.UITextDisplayer.inheritProperty_(c,function(m){return m.backgroundColor}))?l.style.backgroundColor=a:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),a=shaka.text.UITextDisplayer.inheritProperty_(c,function(m){return m.fontFamily}))&&(l.style.fontFamily=a);k&&(l.textContent=k)}if(h&&!c[c.length-1].isContainer)f.display="inline";else{f.display="flex";f.flexDirection="column";f.alignItems="center";if(b.textAlign==e.textAlign.LEFT||b.textAlign==e.textAlign.START)f.width=
1153
+ "100%",f.alignItems="start";else if(b.textAlign==e.textAlign.RIGHT||b.textAlign==e.textAlign.END)f.width="100%",f.alignItems="end";f.justifyContent=b.displayAlign==e.displayAlign.BEFORE?"flex-start":b.displayAlign==e.displayAlign.CENTER?"center":"flex-end"}g||(f.margin="0");f.fontFamily=b.fontFamily;f.fontWeight=b.fontWeight.toString();f.fontStyle=b.fontStyle;f.letterSpacing=b.letterSpacing;f.fontSize=shaka.text.UITextDisplayer.convertLengthValue_(b.fontSize,b,this.videoContainer_);c=b.line;null!=
1154
+ c&&(g=b.lineInterpretation,g==e.lineInterpretation.LINE_NUMBER&&(g=e.lineInterpretation.PERCENTAGE,h=16,this.aspectRatio_&&1>this.aspectRatio_&&(h=32),c=0>c?100+c/h*100:c/h*100),g==e.lineInterpretation.PERCENTAGE&&(f.position="absolute",b.writingMode==e.writingMode.HORIZONTAL_TOP_TO_BOTTOM?(f.width="100%",b.lineAlign==e.lineAlign.START?f.top=c+"%":b.lineAlign==e.lineAlign.END&&(f.bottom=100-c+"%")):b.writingMode==e.writingMode.VERTICAL_LEFT_TO_RIGHT?(f.height="100%",b.lineAlign==e.lineAlign.START?
1155
+ f.left=c+"%":b.lineAlign==e.lineAlign.END&&(f.right=100-c+"%")):(f.height="100%",b.lineAlign==e.lineAlign.START?f.right=c+"%":b.lineAlign==e.lineAlign.END&&(f.left=100-c+"%"))));f.lineHeight=b.lineHeight;c=this.computeCuePositionAlignment_(b);c==e.positionAlign.LEFT?(f.cssFloat="left",null!==b.position&&(f.position="absolute",b.writingMode==e.writingMode.HORIZONTAL_TOP_TO_BOTTOM?(f.left=b.position+"%",f.width="auto"):f.top=b.position+"%")):c==e.positionAlign.RIGHT?(f.cssFloat="right",null!==b.position&&
1156
+ (f.position="absolute",b.writingMode==e.writingMode.HORIZONTAL_TOP_TO_BOTTOM?(f.right=b.position+"%",f.width="auto"):f.bottom=b.position+"%")):null!==b.position&&50!=b.position&&(f.position="absolute",b.writingMode==e.writingMode.HORIZONTAL_TOP_TO_BOTTOM?(f.left=b.position+"%",f.width="auto"):f.top=b.position+"%");f.textAlign=b.textAlign;f.textDecoration=b.textDecoration.join(" ");f.writingMode=b.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==b.writingMode||(f.webkitWritingMode=
1157
+ b.writingMode);b.size&&(b.writingMode==e.writingMode.HORIZONTAL_TOP_TO_BOTTOM?f.width=b.size+"%":f.height=b.size+"%")};shaka.text.UITextDisplayer.getLengthValueInfo_=function(a){return(a=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(a[1]),unit:a[2]}:null};
1157
1158
  shaka.text.UITextDisplayer.convertLengthValue_=function(a,b,c){var d=shaka.text.UITextDisplayer.getLengthValueInfo_(a);if(!d)return a;var e=d.value;switch(d.unit){case "%":return shaka.text.UITextDisplayer.getAbsoluteLengthInPixels_(e/100,b,c);case "c":return shaka.text.UITextDisplayer.getAbsoluteLengthInPixels_(e,b,c);default:return a}};shaka.text.UITextDisplayer.getAbsoluteLengthInPixels_=function(a,b,c){return c.clientHeight*a/b.cellResolution.rows+"px"};
1158
1159
  shaka.text.UITextDisplayer.inheritProperty_=function(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null};goog.exportSymbol("shaka.text.UITextDisplayer",shaka.text.UITextDisplayer);goog.exportProperty(shaka.text.UITextDisplayer.prototype,"setTextVisibility",shaka.text.UITextDisplayer.prototype.setTextVisibility);goog.exportProperty(shaka.text.UITextDisplayer.prototype,"isTextVisible",shaka.text.UITextDisplayer.prototype.isTextVisible);
1159
1160
  goog.exportProperty(shaka.text.UITextDisplayer.prototype,"remove",shaka.text.UITextDisplayer.prototype.remove);goog.exportProperty(shaka.text.UITextDisplayer.prototype,"destroy",shaka.text.UITextDisplayer.prototype.destroy);goog.exportProperty(shaka.text.UITextDisplayer.prototype,"append",shaka.text.UITextDisplayer.prototype.append);goog.exportProperty(shaka.text.UITextDisplayer.prototype,"configure",shaka.text.UITextDisplayer.prototype.configure);shaka.text.WebVttGenerator=function(){};
@@ -1277,7 +1278,8 @@ d.error?k.reject(c.videoErrorToShakaError_()):"none"==d.preload&&(shaka.log.alwa
1277
1278
  r.yield(Promise.race([k,l]),2);if((m=c.isLive())&&(c.config_.streaming.liveSync||c.config_.streaming.liveSyncPanicMode)||c.config_.streaming.vodDynamicPlaybackRate)n=function(){return c.onTimeUpdate_()},c.loadEventManager_.listen(d,"timeupdate",n);m||(p=function(){return c.onVideoProgress_()},c.loadEventManager_.listen(d,"timeupdate",p),c.onVideoProgress_());c.adManager_&&(c.adManager_.onManifestUpdated(m),m&&(q=c.seekRange().end,c.loadEventManager_.listen(d,"progress",function(){var t=c.seekRange().end;
1278
1279
  q!=t&&(c.adManager_.onManifestUpdated(c.isLive()),q=t)})));c.fullyLoaded_=!0;r.jumpToEnd()})};shaka.Player.prototype.setupPreferredAudioOnSrc_=function(){var a=this.config_.preferredAudioLanguage;""!=a&&this.selectAudioLanguage(a,this.config_.preferredVariantRole)};shaka.Player.prototype.setupPreferredTextOnSrc_=function(){var a=this.config_.preferredTextLanguage;""!=a&&this.selectTextLanguage(a,this.config_.preferredTextRole,this.config_.preferForcedSubs)};
1279
1280
  shaka.Player.prototype.processTimedMetadataSrcEqls_=function(a){var b=this;if("metadata"==a.kind){a.mode="hidden";this.loadEventManager_.listen(a,"cuechange",function(){if(a.activeCues)for(var d=$jscomp.makeIterator(a.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,b.dispatchMetadataEvent_(e.startTime,e.endTime,e.type,e.value),b.adManager_)b.adManager_.onCueMetadataChange(e.value)});var c=(new shaka.util.Timer(function(){var d=b.getMetadataTracks_();d=$jscomp.makeIterator(d);for(var e=d.next();!e.done;e=
1280
- d.next())e.value.mode="hidden"})).tickNow().tickAfter(.5);this.cleanupOnUnload_.push(function(){c.stop()})}};shaka.Player.prototype.processTimedMetadataMediaSrc_=function(a,b,c){a=$jscomp.makeIterator(a);for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.data&&d.cueTime&&d.frames){var e=d.cueTime+b,f=c;f&&e>f&&(f=e);for(var g=$jscomp.makeIterator(d.frames),h=g.next();!h.done;h=g.next())this.dispatchMetadataEvent_(e,f,"org.id3",h.value);if(this.adManager_)this.adManager_.onHlsTimedMetadata(d,e)}};
1281
+ d.next())e.value.mode="hidden"})).tickNow().tickAfter(.5);this.cleanupOnUnload_.push(function(){c.stop()})}};
1282
+ shaka.Player.prototype.processTimedMetadataMediaSrc_=function(a,b,c){a=$jscomp.makeIterator(a);for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.data&&"number"==typeof d.cueTime&&d.frames){var e=d.cueTime+b,f=c;f&&e>f&&(f=e);for(var g=$jscomp.makeIterator(d.frames),h=g.next();!h.done;h=g.next())this.dispatchMetadataEvent_(e,f,"org.id3",h.value);if(this.adManager_)this.adManager_.onHlsTimedMetadata(d,e)}};
1281
1283
  shaka.Player.prototype.dispatchMetadataEvent_=function(a,b,c,d){goog.asserts.assert(!b||a<=b,"Metadata start time should be less or equal to the end time!");var e=shaka.util.FakeEvent.EventName.Metadata;a=(new Map).set("startTime",a).set("endTime",b).set("metadataType",c).set("payload",d);this.dispatchEvent(shaka.Player.makeEvent_(e,a))};
1282
1284
  shaka.Player.prototype.activateChaptersTrack_=function(a){if(a&&"chapters"==a.kind){a.mode="hidden";var b=(new shaka.util.Timer(function(){a.mode="hidden"})).tickNow().tickAfter(.5);this.cleanupOnUnload_.push(function(){b.stop()})}};shaka.Player.prototype.releaseAllMutexes=function(){this.mutex_.releaseAll()};shaka.Player.prototype.createDrmEngine=function(a){return new shaka.media.DrmEngine(a)};
1283
1285
  shaka.Player.prototype.createNetworkingEngine=function(a){var b=this;a||(a=function(){return null});var c=function(e){a()?a().addQueuedOperation(!0,e):e()},d=function(e){a()?a().dispatchEvent(e):b.dispatchEvent(e)};return new shaka.net.NetworkingEngine(function(e,f,g,h){var k=a()?a().getAbrManager():b.abrManager_;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){var h=shaka.util.FakeEvent.EventName.DownloadHeadersReceived;f=(new Map).set("headers",e).set("request",f).set("requestType",g);d(shaka.Player.makeEvent_(h,
@@ -1449,7 +1451,7 @@ goog.exportProperty(shaka.Player.prototype,"resetConfiguration",shaka.Player.pro
1449
1451
  goog.exportProperty(shaka.Player.prototype,"releaseAllMutexes",shaka.Player.prototype.releaseAllMutexes);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);
1450
1452
  goog.exportProperty(shaka.Player.prototype,"updateStartTime",shaka.Player.prototype.updateStartTime);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);
1451
1453
  goog.exportProperty(shaka.Player,"isBrowserSupported",shaka.Player.isBrowserSupported);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);
1452
- shaka.Player.TYPICAL_BUFFERING_THRESHOLD_=.5;shaka.Player.version="v4.9.20-debug";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.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_++};
1454
+ shaka.Player.TYPICAL_BUFFERING_THRESHOLD_=.5;shaka.Player.version="v4.9.21-debug";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.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_++};
1453
1455
  shaka.ads.AdsStats.prototype.getBlob=function(){return{loadTimes:this.loadTimes_,started:this.started_,playedCompletely:this.playedCompletely_,skipped:this.skipped_}};shaka.ads.ClientSideAd=function(a,b,c){var d=this;this.ad_=a;this.manager_=b;this.video_=c;this.isPaused_=!1;this.volume_=this.manager_.getVolume();this.eventManager_=new shaka.util.EventManager;this.eventManager_.listen(this.manager_,google.ima.AdEvent.Type.PAUSED,function(){d.isPaused_=!0});this.eventManager_.listen(this.manager_,google.ima.AdEvent.Type.RESUMED,function(){d.isPaused_=!1})};shaka.ads.ClientSideAd.prototype.getDuration=function(){return this.ad_.getDuration()};
1454
1456
  shaka.ads.ClientSideAd.prototype.getMinSuggestedDuration=function(){return this.ad_.getMinSuggestedDuration()};shaka.ads.ClientSideAd.prototype.getRemainingTime=function(){return this.manager_.getRemainingTime()};shaka.ads.ClientSideAd.prototype.isPaused=function(){return this.isPaused_};shaka.ads.ClientSideAd.prototype.isSkippable=function(){return 0<=this.ad_.getSkipTimeOffset()};
1455
1457
  shaka.ads.ClientSideAd.prototype.getTimeUntilSkippable=function(){var a=this.ad_.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};shaka.ads.ClientSideAd.prototype.canSkipNow=function(){return this.manager_.getAdSkippableState()};shaka.ads.ClientSideAd.prototype.skip=function(){return this.manager_.skip()};shaka.ads.ClientSideAd.prototype.setPaused=function(a){this.isPaused_=a};shaka.ads.ClientSideAd.prototype.pause=function(){return this.manager_.pause()};