shaka-player 4.11.12 → 4.11.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3992,7 +3992,7 @@ declare namespace shaka.util.Error {
3992
3992
  UNEXPECTED_TEST_REQUEST = 1009.0 ,
3993
3993
  UNSUPPORTED_EXTERNAL_THUMBNAILS_URI = 2017.0 ,
3994
3994
  UNSUPPORTED_SCHEME = 1000.0 ,
3995
- VAST_INVALID_XML = 4001.0 ,
3995
+ VAST_INVALID_XML = 10007.0 ,
3996
3996
  VIDEO_ERROR = 3016.0 ,
3997
3997
  WEBM_CUES_ELEMENT_MISSING = 3007.0 ,
3998
3998
  WEBM_CUE_TIME_ELEMENT_MISSING = 3013.0 ,
@@ -3992,7 +3992,7 @@ declare namespace shaka.util.Error {
3992
3992
  UNEXPECTED_TEST_REQUEST = 1009.0 ,
3993
3993
  UNSUPPORTED_EXTERNAL_THUMBNAILS_URI = 2017.0 ,
3994
3994
  UNSUPPORTED_SCHEME = 1000.0 ,
3995
- VAST_INVALID_XML = 4001.0 ,
3995
+ VAST_INVALID_XML = 10007.0 ,
3996
3996
  VIDEO_ERROR = 3016.0 ,
3997
3997
  WEBM_CUES_ELEMENT_MISSING = 3007.0 ,
3998
3998
  WEBM_CUE_TIME_ELEMENT_MISSING = 3013.0 ,
@@ -399,7 +399,7 @@ shaka.util.Error.Code = {
399
399
  'CURRENT_DAI_REQUEST_NOT_FINISHED': 10004,
400
400
  'MT_AD_MANAGER_NOT_INITIALIZED': 10005,
401
401
  'INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED': 10006,
402
- 'VAST_INVALID_XML': 4001
402
+ 'VAST_INVALID_XML': 10007
403
403
  };
404
404
  /**
405
405
  * A timer allows a single function to be executed at a later time or at
@@ -197,7 +197,7 @@ DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPOR
197
197
  AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,HLS_EMPTY_MEDIA_PLAYLIST:4053,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,
198
198
  NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,
199
199
  CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,
200
- CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:4001};goog.exportProperty(shaka.util.Error,"Code",shaka.util.Error.Code);shaka.util.Lazy=function(a){this.gen_=a;this.value_=void 0};shaka.util.Lazy.prototype.value=function(){void 0==this.value_&&(this.value_=this.gen_(),goog.asserts.assert(void 0!=this.value_,"Unable to create lazy value"));return this.value_};shaka.util.Lazy.prototype.reset=function(){this.value_=void 0};shaka.util.DrmUtils=function(){};shaka.util.DrmUtils.isBrowserSupported=function(){return!!window.MediaKeys&&!!window.navigator&&!!window.navigator.requestMediaKeySystemAccess&&!!window.MediaKeySystemAccess&&!!window.MediaKeySystemAccess.prototype.getConfiguration};shaka.util.DrmUtils.areDrmCompatible=function(a,b){return a.length&&b.length&&a!==b?0<shaka.util.DrmUtils.getCommonDrmInfos(a,b).length:!0};
200
+ CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:10007};goog.exportProperty(shaka.util.Error,"Code",shaka.util.Error.Code);shaka.util.Lazy=function(a){this.gen_=a;this.value_=void 0};shaka.util.Lazy.prototype.value=function(){void 0==this.value_&&(this.value_=this.gen_(),goog.asserts.assert(void 0!=this.value_,"Unable to create lazy value"));return this.value_};shaka.util.Lazy.prototype.reset=function(){this.value_=void 0};shaka.util.DrmUtils=function(){};shaka.util.DrmUtils.isBrowserSupported=function(){return!!window.MediaKeys&&!!window.navigator&&!!window.navigator.requestMediaKeySystemAccess&&!!window.MediaKeySystemAccess&&!!window.MediaKeySystemAccess.prototype.getConfiguration};shaka.util.DrmUtils.areDrmCompatible=function(a,b){return a.length&&b.length&&a!==b?0<shaka.util.DrmUtils.getCommonDrmInfos(a,b).length:!0};
201
201
  shaka.util.DrmUtils.getCommonDrmInfos=function(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=$jscomp.makeIterator(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=$jscomp.makeIterator(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;var g=(d.initData||[]).concat(f.initData||[]);g=$jscomp.makeIterator(g);for(var h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat($jscomp.arrayFromIterable(d.keyIds),
202
202
  $jscomp.arrayFromIterable(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||f.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||f.persistentStateRequired,videoRobustness:d.videoRobustness||f.videoRobustness,audioRobustness:d.audioRobustness||f.audioRobustness,serverCertificate:d.serverCertificate||f.serverCertificate,serverCertificateUri:d.serverCertificateUri||
203
203
  f.serverCertificateUri,initData:e,keyIds:g});break}}return c};shaka.util.DrmUtils.keySystem=function(a){return a?a.keySystem:""};shaka.util.DrmUtils.isPlayReadyKeySystem=function(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1};shaka.util.DrmUtils.isFairPlayKeySystem=function(a){return a?!!a.match(/^com\.apple\.fps/):!1};shaka.util.DrmUtils.generateKeySystemCacheKey_=function(a,b,c){return a+"#"+b+"#"+c};
@@ -354,9 +354,9 @@ a.insert("tr",new Map([["AD_DURATION","Reklam s\u00fcresi"],["AD_PROGRESS","[AD_
354
354
  ["ENTER_LOOP_MODE","\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["ENTER_PICTURE_IN_PICTURE","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u87a2\u5e55\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["EXIT_PICTURE_IN_PICTURE","\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN","\u5168\u87a2\u5e55"],["LANGUAGE","\u8a9e\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u74b0\u64ad\u653e"],
355
355
  ["MORE_SETTINGS","\u986f\u793a\u66f4\u591a\u8a2d\u5b9a"],["MULTIPLE_LANGUAGES","\u591a\u7a2e\u8a9e\u8a00"],["MUTE","\u975c\u97f3"],["NOT_APPLICABLE","\u4e0d\u9069\u7528"],["OFF","\u95dc\u9589"],["ON","\u958b\u555f"],["PAUSE","\u66ab\u505c"],["PICTURE_IN_PICTURE","\u5b50\u6bcd\u756b\u9762"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["QUALITY","\u97f3\u8cea"],["RECENTER_VR","\u91cd\u65b0\u7f6e\u4e2d"],["REPLAY","\u91cd\u64ad"],["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND",
356
356
  "\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["STATISTICS","\u7d71\u8a08\u8cc7\u6599"],["SUBTITLE_FORCED","\u5f37\u5236\u986f\u793a"],["SURROUND","\u74b0\u5834\u97f3\u6548"],["TOGGLE_STEREOSCOPIC","\u5207\u63db\u7acb\u9ad4\u5f71\u50cf"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]))};
357
- shaka.ui.Locales.Ids={CHAPTERS:"CHAPTERS",STATISTICS:"STATISTICS",EXIT_FULL_SCREEN:"EXIT_FULL_SCREEN",REPLAY:"REPLAY",AD_STATISTICS:"AD_STATISTICS",LIVE:"LIVE",RECENTER_VR:"RECENTER_VR",UNDETERMINED_LANGUAGE:"UNDETERMINED_LANGUAGE",TOGGLE_STEREOSCOPIC:"TOGGLE_STEREOSCOPIC",CAST:"CAST",AD_TIME:"AD_TIME",EXIT_LOOP_MODE:"EXIT_LOOP_MODE",PAUSE:"PAUSE",REWIND:"REWIND",SURROUND:"SURROUND",SUBTITLE_FORCED:"SUBTITLE_FORCED",ENTER_PICTURE_IN_PICTURE:"ENTER_PICTURE_IN_PICTURE",RESOLUTION:"RESOLUTION",AIRPLAY:"AIRPLAY",
358
- DOWNLOAD_VIDEO_FRAME:"DOWNLOAD_VIDEO_FRAME",LOOP:"LOOP",CAPTIONS:"CAPTIONS",PLAY:"PLAY",FAST_FORWARD:"FAST_FORWARD",ON:"ON",ENTER_LOOP_MODE:"ENTER_LOOP_MODE",BACK:"BACK",FULL_SCREEN:"FULL_SCREEN",SKIP_AD:"SKIP_AD",AD_PROGRESS:"AD_PROGRESS",VOLUME:"VOLUME",AD_DURATION:"AD_DURATION",MORE_SETTINGS:"MORE_SETTINGS",UNRECOGNIZED_LANGUAGE:"UNRECOGNIZED_LANGUAGE",SEEK:"SEEK",PICTURE_IN_PICTURE:"PICTURE_IN_PICTURE",MULTIPLE_LANGUAGES:"MULTIPLE_LANGUAGES",MUTE:"MUTE",PLAYBACK_RATE:"PLAYBACK_RATE",AUTO_QUALITY:"AUTO_QUALITY",
359
- QUALITY:"QUALITY",LANGUAGE:"LANGUAGE",SKIP_TO_LIVE:"SKIP_TO_LIVE",NOT_APPLICABLE:"NOT_APPLICABLE",UNMUTE:"UNMUTE",EXIT_PICTURE_IN_PICTURE:"EXIT_PICTURE_IN_PICTURE",OFF:"OFF"};shaka.abr={};shaka.abr.Ewma=function(a){goog.asserts.assert(0<a,"expected halfLife to be positive");this.alpha_=Math.exp(Math.log(.5)/a);this.totalWeight_=this.estimate_=0};shaka.abr.Ewma.prototype.updateAlpha=function(a){goog.asserts.assert(0<a,"expected halfLife to be positive");this.alpha_=Math.exp(Math.log(.5)/a)};shaka.abr.Ewma.prototype.sample=function(a,b){var c=Math.pow(this.alpha_,a);b=b*(1-c)+c*this.estimate_;isNaN(b)||(this.estimate_=b,this.totalWeight_+=a)};
357
+ shaka.ui.Locales.Ids={SURROUND:"SURROUND",DOWNLOAD_VIDEO_FRAME:"DOWNLOAD_VIDEO_FRAME",LIVE:"LIVE",AD_PROGRESS:"AD_PROGRESS",PICTURE_IN_PICTURE:"PICTURE_IN_PICTURE",MULTIPLE_LANGUAGES:"MULTIPLE_LANGUAGES",PLAYBACK_RATE:"PLAYBACK_RATE",CAST:"CAST",LANGUAGE:"LANGUAGE",ENTER_PICTURE_IN_PICTURE:"ENTER_PICTURE_IN_PICTURE",MORE_SETTINGS:"MORE_SETTINGS",AIRPLAY:"AIRPLAY",FAST_FORWARD:"FAST_FORWARD",AD_DURATION:"AD_DURATION",LOOP:"LOOP",OFF:"OFF",NOT_APPLICABLE:"NOT_APPLICABLE",EXIT_PICTURE_IN_PICTURE:"EXIT_PICTURE_IN_PICTURE",
358
+ RESOLUTION:"RESOLUTION",RECENTER_VR:"RECENTER_VR",SUBTITLE_FORCED:"SUBTITLE_FORCED",AD_TIME:"AD_TIME",BACK:"BACK",CHAPTERS:"CHAPTERS",AD_STATISTICS:"AD_STATISTICS",REWIND:"REWIND",SEEK:"SEEK",UNRECOGNIZED_LANGUAGE:"UNRECOGNIZED_LANGUAGE",CAPTIONS:"CAPTIONS",AUTO_QUALITY:"AUTO_QUALITY",PAUSE:"PAUSE",MUTE:"MUTE",STATISTICS:"STATISTICS",TOGGLE_STEREOSCOPIC:"TOGGLE_STEREOSCOPIC",UNDETERMINED_LANGUAGE:"UNDETERMINED_LANGUAGE",ON:"ON",UNMUTE:"UNMUTE",EXIT_FULL_SCREEN:"EXIT_FULL_SCREEN",EXIT_LOOP_MODE:"EXIT_LOOP_MODE",
359
+ QUALITY:"QUALITY",VOLUME:"VOLUME",ENTER_LOOP_MODE:"ENTER_LOOP_MODE",FULL_SCREEN:"FULL_SCREEN",REPLAY:"REPLAY",PLAY:"PLAY",SKIP_TO_LIVE:"SKIP_TO_LIVE",SKIP_AD:"SKIP_AD"};shaka.abr={};shaka.abr.Ewma=function(a){goog.asserts.assert(0<a,"expected halfLife to be positive");this.alpha_=Math.exp(Math.log(.5)/a);this.totalWeight_=this.estimate_=0};shaka.abr.Ewma.prototype.updateAlpha=function(a){goog.asserts.assert(0<a,"expected halfLife to be positive");this.alpha_=Math.exp(Math.log(.5)/a)};shaka.abr.Ewma.prototype.sample=function(a,b){var c=Math.pow(this.alpha_,a);b=b*(1-c)+c*this.estimate_;isNaN(b)||(this.estimate_=b,this.totalWeight_+=a)};
360
360
  shaka.abr.Ewma.prototype.getEstimate=function(){return this.estimate_/(1-Math.pow(this.alpha_,this.totalWeight_))};shaka.abr.EwmaBandwidthEstimator=function(){this.fast_=new shaka.abr.Ewma(2);this.slow_=new shaka.abr.Ewma(5);this.bytesSampled_=0;this.minTotalBytes_=128E3;this.minBytes_=16E3};shaka.abr.EwmaBandwidthEstimator.prototype.configure=function(a){this.minTotalBytes_=a.minTotalBytes;this.minBytes_=a.minBytes;this.fast_.updateAlpha(a.fastHalfLife);this.slow_.updateAlpha(a.slowHalfLife)};
361
361
  shaka.abr.EwmaBandwidthEstimator.prototype.sample=function(a,b){if(!(b<this.minBytes_)){var c=8E3*b/a;a/=1E3;this.bytesSampled_+=b;this.fast_.sample(a,c);this.slow_.sample(a,c)}};shaka.abr.EwmaBandwidthEstimator.prototype.getBandwidthEstimate=function(a){return this.bytesSampled_<this.minTotalBytes_?a:Math.min(this.fast_.getEstimate(),this.slow_.getEstimate())};shaka.abr.EwmaBandwidthEstimator.prototype.hasGoodEstimate=function(){return this.bytesSampled_>=this.minTotalBytes_};shaka.util.EventManager=function(){this.bindingMap_=new shaka.util.MultiMap};shaka.util.EventManager.prototype.release=function(){this.removeAll();this.bindingMap_=null};shaka.util.EventManager.prototype.listen=function(a,b,c,d){this.bindingMap_&&(a=new shaka.util.EventManager.Binding_(a,b,c,d),this.bindingMap_.push(b,a))};shaka.util.EventManager.prototype.listenOnce=function(a,b,c,d){var e=this,f=function(g){e.unlisten(a,b,f);c(g)};this.listen(a,b,f,d)};
362
362
  shaka.util.EventManager.prototype.unlisten=function(a,b,c){if(this.bindingMap_){var d=this.bindingMap_.get(b)||[];d=$jscomp.makeIterator(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.unlisten(),this.bindingMap_.remove(b,e))}};shaka.util.EventManager.prototype.removeAll=function(){if(this.bindingMap_){var a=this.bindingMap_.getAll();a=$jscomp.makeIterator(a);for(var b=a.next();!b.done;b=a.next())b.value.unlisten();this.bindingMap_.clear()}};
@@ -577,7 +577,7 @@ shaka.net.NetworkingEngine.prototype.filterRequest_=function(a,b,c){var d=shaka.
577
577
  shaka.util.Error.Category.NETWORK,shaka.util.Error.Code.REQUEST_FILTER_ERROR,h);})};shaka.net.NetworkingEngine.prototype.makeRequestWithRetry_=function(a,b,c,d){var e=new shaka.net.Backoff(b.retryParameters,!1);return this.send_(a,b,c,e,0,null,d)};
578
578
  shaka.net.NetworkingEngine.prototype.send_=function(a,b,c,d,e,f,g){var h=this;this.forceHTTP_&&(b.uris[e]=b.uris[e].replace("https://","http://"));this.forceHTTPS_&&(b.uris[e]=b.uris[e].replace("http://","https://"));if(0<e&&this.onRetry_)this.onRetry_(a,c,b.uris[e],b.uris[e-1]);var k=new goog.Uri(b.uris[e]),l=k.getScheme(),m=!1;l||(l=shaka.net.NetworkingEngine.getLocationProtocol_(),goog.asserts.assert(":"==l[l.length-1],"location.protocol expected to end with a colon!"),l=l.slice(0,-1),k.setScheme(l),
579
579
  b.uris[e]=k.toString());l=l.toLowerCase();var n=(l=shaka.net.NetworkingEngine.schemes_[l])?l.plugin:null;if(!n)return shaka.util.AbortableOperation.failed(new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.NETWORK,shaka.util.Error.Code.UNSUPPORTED_SCHEME,k));var p=l.progressSupport,q=null,r=null,t=!1,v=!1,u;return shaka.util.AbortableOperation.notAbortable(d.attempt()).chain(function(){if(h.destroyed_)return shaka.util.AbortableOperation.aborted();u=Date.now();var w=
580
- shaka.net.NetworkingEngine.RequestType.SEGMENT,y=0;b.requestStartTime=Date.now();var x=n(b.uris[e],b,a,function(A,B,D){q&&q.stop();r&&r.tickAfter(C/1E3);if(h.onProgressUpdated_&&a==w){y++;b.packetNumber=y;var H=h.allowSwitch_(c);h.onProgressUpdated_(A,B,H,b);m=!0;g.setBytes(D)}},function(A){if(h.onHeadersReceived_)h.onHeadersReceived_(A,b,a);v=!0;b.timeToFirstByte=Date.now()-b.requestStartTime},{minBytesForProgressEvents:h.minBytesForProgressEvents_});if(!p)return x;var z=b.retryParameters.connectionTimeout;
580
+ shaka.net.NetworkingEngine.RequestType.SEGMENT,y=0;b.requestStartTime=Date.now();var x=n(b.uris[e],b,a,function(A,B,D){q&&q.stop();r&&r.tickAfter(C/1E3);if(h.onProgressUpdated_&&a==w){y++;b.packetNumber=y;var H=h.allowSwitch_(c);h.onProgressUpdated_(A,B,H,b);m=!0;g.setBytes(D)}},function(A){v=!0;b.timeToFirstByte=Date.now()-b.requestStartTime;if(h.onHeadersReceived_)h.onHeadersReceived_(A,b,a)},{minBytesForProgressEvents:h.minBytesForProgressEvents_});if(!p)return x;var z=b.retryParameters.connectionTimeout;
581
581
  z&&(q=new shaka.util.Timer(function(){t=!0;x.abort()}),q.tickAfter(z/1E3));var C=b.retryParameters.stallTimeout;C&&(r=new shaka.util.Timer(function(){t=!0;x.abort()}));return x}).chain(function(w){q&&q.stop();r&&r.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-u);var y={response:w,gotProgress:m};if(!v&&h.onHeadersReceived_)h.onHeadersReceived_(w.headers,b,a);return y},function(w){q&&q.stop();r&&r.stop();if(h.onDownloadFailed_){var y=null,x=0;w instanceof shaka.util.Error&&(y=w,w.code==shaka.util.Error.Code.BAD_HTTP_STATUS&&
582
582
  (x=w.data[1]));h.onDownloadFailed_(b,y,x,t)}if(h.destroyed_)return shaka.util.AbortableOperation.aborted();t&&(w=new shaka.util.Error(shaka.util.Error.Severity.RECOVERABLE,shaka.util.Error.Category.NETWORK,shaka.util.Error.Code.TIMEOUT,b.uris[e],a));if(w instanceof shaka.util.Error){if(w.code==shaka.util.Error.Code.OPERATION_ABORTED)throw w;if(w.code==shaka.util.Error.Code.ATTEMPTS_EXHAUSTED)throw goog.asserts.assert(f,"Should have last error"),f;if(w.severity==shaka.util.Error.Severity.RECOVERABLE)return y=
583
583
  (new Map).set("error",w),y=new shaka.util.FakeEvent("retry",y),h.dispatchEvent(y),e=(e+1)%b.uris.length,h.send_(a,b,c,d,e,w,g)}throw w;})};
@@ -1274,13 +1274,13 @@ goog.exportProperty(shaka.text.SimpleTextDisplayer.prototype,"isTextVisible",sha
1274
1274
  goog.exportProperty(shaka.text.SimpleTextDisplayer.prototype,"configure",shaka.text.SimpleTextDisplayer.prototype.configure);shaka.text.StubTextDisplayer=function(){};shaka.text.StubTextDisplayer.prototype.configure=function(a){};shaka.text.StubTextDisplayer.prototype.remove=function(a,b){};shaka.text.StubTextDisplayer.prototype.append=function(a){};shaka.text.StubTextDisplayer.prototype.destroy=function(){};shaka.text.StubTextDisplayer.prototype.isTextVisible=function(){return!1};shaka.text.StubTextDisplayer.prototype.setTextVisibility=function(a){};goog.exportSymbol("shaka.text.StubTextDisplayer",shaka.text.StubTextDisplayer);
1275
1275
  goog.exportProperty(shaka.text.StubTextDisplayer.prototype,"setTextVisibility",shaka.text.StubTextDisplayer.prototype.setTextVisibility);goog.exportProperty(shaka.text.StubTextDisplayer.prototype,"isTextVisible",shaka.text.StubTextDisplayer.prototype.isTextVisible);goog.exportProperty(shaka.text.StubTextDisplayer.prototype,"destroy",shaka.text.StubTextDisplayer.prototype.destroy);goog.exportProperty(shaka.text.StubTextDisplayer.prototype,"append",shaka.text.StubTextDisplayer.prototype.append);
1276
1276
  goog.exportProperty(shaka.text.StubTextDisplayer.prototype,"remove",shaka.text.StubTextDisplayer.prototype.remove);goog.exportProperty(shaka.text.StubTextDisplayer.prototype,"configure",shaka.text.StubTextDisplayer.prototype.configure);shaka.util.Dom=function(){};shaka.util.Dom.createHTMLElement=function(a){return document.createElement(a)};shaka.util.Dom.createButton=function(){var a=document.createElement("button");a.setAttribute("type","button");return a};shaka.util.Dom.asHTMLElement=function(a){return a};shaka.util.Dom.asHTMLCanvasElement=function(a){return a};shaka.util.Dom.asHTMLMediaElement=function(a){return a};
1277
- shaka.util.Dom.getElementByClassName=function(a,b){b=b.getElementsByClassName(a);goog.asserts.assert(1==b.length,"Should only be one element with class name "+a);return shaka.util.Dom.asHTMLElement(b[0])};shaka.util.Dom.removeAllChildren=function(a){for(;a.firstChild;)a.removeChild(a.firstChild)};goog.exportSymbol("shaka.util.Dom",shaka.util.Dom);goog.exportProperty(shaka.util.Dom,"removeAllChildren",shaka.util.Dom.removeAllChildren);shaka.text.UITextDisplayer=function(a,b,c){var d=this;goog.asserts.assert(b,"videoContainer should be valid.");this.isTextVisible_=!1;this.cues_=[];this.video_=a;this.videoContainer_=b;this.aspectRatio_=null;this.textContainer_=shaka.util.Dom.createHTMLElement("div");this.textContainer_.classList.add("shaka-text-container");this.textContainer_.style.textAlign="center";this.textContainer_.style.display="flex";this.textContainer_.style.flexDirection="column";this.textContainer_.style.alignItems="center";
1278
- this.textContainer_.style.justifyContent="flex-end";this.videoContainer_.appendChild(this.textContainer_);c&&c.captionsUpdatePeriod||shaka.Deprecate.deprecateFeature(5,"UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");a=c&&c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25;this.captionsTimer_=(new shaka.util.Timer(function(){d.video_.paused||d.updateCaptions_()})).tickEvery(a);this.currentCuesMap_=new Map;this.eventManager_=new shaka.util.EventManager;this.eventManager_.listen(document,
1279
- "fullscreenchange",function(){d.updateCaptions_(!0)});this.eventManager_.listen(this.video_,"seeking",function(){d.updateCaptions_(!0)});this.eventManager_.listen(this.video_,"resize",function(){var e=d.video_,f=e.videoWidth;e=e.videoHeight;d.aspectRatio_=f&&e?f/e:null});this.resizeObserver_=null;"ResizeObserver"in window&&(this.resizeObserver_=new ResizeObserver(function(){d.updateCaptions_(!0)}),this.resizeObserver_.observe(this.textContainer_));this.regionElements_=new Map};
1280
- shaka.text.UITextDisplayer.prototype.configure=function(a){this.captionsTimer_&&this.captionsTimer_.tickEvery(a.captionsUpdatePeriod)};
1277
+ shaka.util.Dom.getElementByClassName=function(a,b){b=b.getElementsByClassName(a);goog.asserts.assert(1==b.length,"Should only be one element with class name "+a);return shaka.util.Dom.asHTMLElement(b[0])};shaka.util.Dom.removeAllChildren=function(a){for(;a.firstChild;)a.removeChild(a.firstChild)};goog.exportSymbol("shaka.util.Dom",shaka.util.Dom);goog.exportProperty(shaka.util.Dom,"removeAllChildren",shaka.util.Dom.removeAllChildren);shaka.text.UITextDisplayer=function(a,b,c){var d=this;goog.asserts.assert(b,"videoContainer should be valid.");document.fullscreenEnabled||shaka.log.alwaysWarn("Using UITextDisplayer in a browser without Fullscreen API support causes subtitles to not be rendered in fullscreen");this.isTextVisible_=!1;this.cues_=[];this.video_=a;this.videoContainer_=b;this.aspectRatio_=null;this.textContainer_=shaka.util.Dom.createHTMLElement("div");this.textContainer_.classList.add("shaka-text-container");this.textContainer_.style.textAlign=
1278
+ "center";this.textContainer_.style.display="flex";this.textContainer_.style.flexDirection="column";this.textContainer_.style.alignItems="center";this.textContainer_.style.justifyContent="flex-end";this.videoContainer_.appendChild(this.textContainer_);c&&c.captionsUpdatePeriod||shaka.Deprecate.deprecateFeature(5,"UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");a=c&&c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25;this.captionsTimer_=(new shaka.util.Timer(function(){d.video_.paused||
1279
+ d.updateCaptions_()})).tickEvery(a);this.currentCuesMap_=new Map;this.eventManager_=new shaka.util.EventManager;this.eventManager_.listen(document,"fullscreenchange",function(){d.updateCaptions_(!0)});this.eventManager_.listen(this.video_,"seeking",function(){d.updateCaptions_(!0)});this.eventManager_.listen(this.video_,"resize",function(){var e=d.video_,f=e.videoWidth;e=e.videoHeight;d.aspectRatio_=f&&e?f/e:null});this.resizeObserver_=null;"ResizeObserver"in window&&(this.resizeObserver_=new ResizeObserver(function(){d.updateCaptions_(!0)}),
1280
+ this.resizeObserver_.observe(this.textContainer_));this.regionElements_=new Map};shaka.text.UITextDisplayer.prototype.configure=function(a){this.captionsTimer_&&this.captionsTimer_.tickEvery(a.captionsUpdatePeriod)};
1281
1281
  shaka.text.UITextDisplayer.prototype.append=function(a){var b=[].concat($jscomp.arrayFromIterable(this.cues_));a=$jscomp.makeIterator(shaka.text.Utils.removeDuplicates(a));for(var c=a.next(),d={};!c.done;d={cue$jscomp$22:void 0},c=a.next())d.cue$jscomp$22=c.value,b.some(function(e){return function(f){return shaka.text.Cue.equal(f,e.cue$jscomp$22)}}(d))||this.cues_.push(d.cue$jscomp$22);this.updateCaptions_()};
1282
1282
  shaka.text.UITextDisplayer.prototype.destroy=function(){if(!this.textContainer_)return Promise.resolve();this.videoContainer_.removeChild(this.textContainer_);this.textContainer_=null;this.isTextVisible_=!1;this.cues_=[];this.captionsTimer_&&this.captionsTimer_.stop();this.currentCuesMap_.clear();this.eventManager_&&(this.eventManager_.release(),this.eventManager_=null);this.resizeObserver_&&(this.resizeObserver_.disconnect(),this.resizeObserver_=null);return Promise.resolve()};
1283
- shaka.text.UITextDisplayer.prototype.remove=function(a,b){if(!this.textContainer_)return!1;var c=this.cues_.length;this.cues_=this.cues_.filter(function(d){return d.startTime<a||d.endTime>=b});this.updateCaptions_(c>this.cues_.length);return!0};shaka.text.UITextDisplayer.prototype.isTextVisible=function(){return this.isTextVisible_};shaka.text.UITextDisplayer.prototype.setTextVisibility=function(a){this.isTextVisible_=a};
1283
+ shaka.text.UITextDisplayer.prototype.remove=function(a,b){if(!this.textContainer_)return!1;var c=this.cues_.length;this.cues_=this.cues_.filter(function(d){return d.startTime<a||d.endTime>=b});this.updateCaptions_(c>this.cues_.length);return!0};shaka.text.UITextDisplayer.prototype.isTextVisible=function(){return this.isTextVisible_};shaka.text.UITextDisplayer.prototype.setTextVisibility=function(a){this.isTextVisible_=a;this.updateCaptions_(!0)};
1284
1284
  shaka.text.UITextDisplayer.prototype.isElementUnderTextContainer_=function(a){for(;null!=a;){if(a==this.textContainer_)return!0;a=a.parentElement}return!1};
1285
1285
  shaka.text.UITextDisplayer.prototype.updateCuesRecursive_=function(a,b,c,d){var e=!1,f=[],g=[];a=$jscomp.makeIterator(a);for(var h=a.next();!h.done;h=a.next()){h=h.value;d.push(h);var k=this.currentCuesMap_.get(h),l=h.startTime<=c&&h.endTime>c,m=k?k.wrapper:null;k&&(f.push(k.cueElement),k.regionElement&&f.push(k.regionElement),l||(e=!0,this.currentCuesMap_.delete(h),k=null));l&&(g.push(h),k?this.isElementUnderTextContainer_(m)||(e=!0):(this.createCue_(h,d),k=this.currentCuesMap_.get(h),m=k.wrapper,
1286
1286
  e=!0));0<h.nestedCues.length&&m&&this.updateCuesRecursive_(h.nestedCues,m,c,d);k=d.pop();goog.asserts.assert(k==h,"Parent cues should be kept in order")}if(e){c=$jscomp.makeIterator(f);for(d=c.next();!d.done;d=c.next())d=d.value,d.parentElement&&d.parentElement.removeChild(d);g.sort(function(n,p){return n.startTime!=p.startTime?n.startTime-p.startTime:n.endTime-p.endTime});g=$jscomp.makeIterator(g);for(c=g.next();!c.done;c=g.next())c=this.currentCuesMap_.get(c.value),goog.asserts.assert(c,"cueRegistry should exist."),
@@ -1550,8 +1550,8 @@ shaka.Player.prototype.setMaxHardwareResolution=function(a,b){this.maxHwRes_.wid
1550
1550
  shaka.Player.prototype.getManifest=function(){shaka.log.alwaysWarn("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.manifest_};shaka.Player.prototype.getManifestParserFactory=function(){return this.parserFactory_};
1551
1551
  shaka.Player.prototype.getFetchedPlaybackInfo=function(){var a={video:null,audio:null,text:null};if(this.loadMode_!=shaka.Player.LoadMode.MEDIA_SOURCE)return a;var b=shaka.util.ManifestParserUtils.ContentType,c=this.streamingEngine_.getCurrentVariant(),d=this.streamingEngine_.getCurrentTextStream(),e=this.video_.currentTime;c=$jscomp.makeIterator([c.video,c.audio,d]);for(d=c.next();!d.done;d=c.next())if((d=d.value)&&d.segmentIndex){var f=d.segmentIndex.find(e);f=d.segmentIndex.get(f);f={codecs:f.codecs||
1552
1552
  d.codecs,mimeType:f.mimeType||d.mimeType,bandwidth:f.bandwidth||d.bandwidth};d.type==b.VIDEO?(f.width=d.width,f.height=d.height,a.video=f):d.type==b.AUDIO?a.audio=f:d.type==b.TEXT&&(a.text=f)}return a};shaka.Player.prototype.addVariantToSwitchHistory_=function(a,b){this.stats_.getSwitchHistory().updateCurrentVariant(a,b)};shaka.Player.prototype.addTextStreamToSwitchHistory_=function(a,b){this.stats_.getSwitchHistory().updateCurrentText(a,b)};
1553
- shaka.Player.prototype.defaultConfig_=function(){var a=this,b=shaka.util.PlayerConfiguration.createDefault();b.streaming.failureCallback=function(c){a.defaultStreamingFailureCallback_(c)};b.textDisplayFactory=function(){if(a.videoContainer_){var c=a.getConfiguration();return new shaka.text.UITextDisplayer(a.video_,a.videoContainer_,c.textDisplayer)}if(HTMLMediaElement.prototype.addTextTrack)return new shaka.text.SimpleTextDisplayer(a.video_,shaka.Player.TextTrackLabel);shaka.log.warning("Text tracks are not supported by the browser, disabling.");
1554
- return new shaka.text.StubTextDisplayer};return b};shaka.Player.prototype.setVideoContainer=function(a){this.videoContainer_=a};
1553
+ shaka.Player.prototype.defaultConfig_=function(){var a=this,b=shaka.util.PlayerConfiguration.createDefault();b.streaming.failureCallback=function(c){a.defaultStreamingFailureCallback_(c)};b.textDisplayFactory=function(){var c=shaka.util.Platform;if(!a.videoContainer_||c.safariVersion()&&!document.fullscreenEnabled){if(HTMLMediaElement.prototype.addTextTrack)return new shaka.text.SimpleTextDisplayer(a.video_,shaka.Player.TextTrackLabel);shaka.log.warning("Text tracks are not supported by the browser, disabling.");
1554
+ return new shaka.text.StubTextDisplayer}c=a.getConfiguration();return new shaka.text.UITextDisplayer(a.video_,a.videoContainer_,c.textDisplayer)};return b};shaka.Player.prototype.setVideoContainer=function(a){this.videoContainer_=a};
1555
1555
  shaka.Player.prototype.defaultStreamingFailureCallback_=function(a){if(this.isLive()){var b=null;a.code==shaka.util.Error.Code.BAD_HTTP_STATUS||a.code==shaka.util.Error.Code.HTTP_ERROR?(b=1,this.config_.streaming.lowLatencyMode&&(b=.1)):a.code==shaka.util.Error.Code.TIMEOUT&&(b=.1);null!=b&&(a.severity=shaka.util.Error.Severity.RECOVERABLE,shaka.log.warning("Live streaming error. Retrying automatically..."),this.retryStreaming(b))}};
1556
1556
  shaka.Player.prototype.makeTextStreamsForClosedCaptions_=function(a){for(var b=shaka.util.ManifestParserUtils.ContentType,c=shaka.util.ManifestParserUtils.TextStreamKind,d=shaka.util.MimeUtils.CEA608_CLOSED_CAPTION_MIMETYPE,e=shaka.util.MimeUtils.CEA708_CLOSED_CAPTION_MIMETYPE,f=new Set,g=$jscomp.makeIterator(a.textStreams),h=g.next();!h.done;h=g.next())h=h.value,h.mimeType!=d&&h.mimeType!=e||f.add(h.originalId);g=$jscomp.makeIterator(a.variants);for(h=g.next();!h.done;h=g.next())if((h=h.value.video)&&
1557
1557
  h.closedCaptions)for(var k=$jscomp.makeIterator(h.closedCaptions.keys()),l=k.next();!l.done;l=k.next())if(l=l.value,!f.has(l)){var m=l.startsWith("CC")?d:e,n=new shaka.media.MetaSegmentIndex,p=h.closedCaptions.get(l);m={id:this.nextExternalStreamId_++,originalId:l,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:n,mimeType:m,codecs:"",kind:c.CLOSED_CAPTION,encrypted:!1,drmInfos:[],keyIds:new Set,language:p,originalLanguage:p,label:null,type:b.TEXT,primary:!1,trickModeVideo:null,
@@ -1563,9 +1563,9 @@ var c=this.config_.streaming.liveSync.targetLatencyTolerance,d=this.config_.stre
1563
1563
  shaka.Player.prototype.onRateChange_=function(){var a=this.video_.playbackRate;0!=a&&(this.playRateController_&&this.playRateController_.set(a),a=shaka.Player.makeEvent_(shaka.util.FakeEvent.EventName.RateChange),this.dispatchEvent(a))};
1564
1564
  shaka.Player.prototype.updateStateHistory_=function(){if(this.stats_&&this.bufferObserver_){var a=shaka.media.BufferingObserver.State,b=this.stats_.getStateHistory(),c="playing";this.bufferObserver_.getState()==a.STARVING?c="buffering":this.video_.ended?c="ended":this.video_.paused&&(c="paused");b.update(c)&&(a=shaka.util.FakeEvent.EventName.StateChanged,c=(new Map).set("newstate",c),this.dispatchEvent(shaka.Player.makeEvent_(a,c)))}};
1565
1565
  shaka.Player.prototype.onTimeUpdate_=function(){var a=this.video_.playbackRate,b=this.isLive();if(this.config_.streaming.vodDynamicPlaybackRate&&!b){var c=this.config_.streaming.vodDynamicPlaybackRateLowBufferRate,d=this.getBufferFullness(),e=this.config_.streaming.vodDynamicPlaybackRateBufferRatio;d<=e?a!=c&&(shaka.log.debug("Buffer fullness ratio ("+d+") is less than the vodDynamicPlaybackRateBufferRatio ("+e+"). Updating playbackRate to "+c),this.trickPlay(c,!1)):1==d&&a!==this.playRateController_.getDefaultRate()&&
1566
- (shaka.log.debug("Buffer is full. Cancel trick play."),this.cancelTrickPlay())}if(b&&(b=this.seekRange(),Number.isFinite(b.end)&&!(this.video_.currentTime<b.start))){c=this.config_.streaming.liveSync.targetLatencyTolerance;d=this.config_.streaming.liveSync.dynamicTargetLatency.enabled;e=this.config_.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;if(this.config_.streaming.liveSync&&this.config_.streaming.liveSync.enabled){var f=this.config_.streaming.liveSync.targetLatency;var g=f+c;var h=
1567
- Math.max(0,f-c);var k=this.config_.streaming.liveSync.maxPlaybackRate;var l=this.config_.streaming.liveSync.minPlaybackRate}else this.manifest_&&this.manifest_.serviceDescription&&(f=this.manifest_.serviceDescription.targetLatency,null!=this.manifest_.serviceDescription.targetLatency?g=this.manifest_.serviceDescription.targetLatency+c:null!=this.manifest_.serviceDescription.maxLatency&&(g=this.manifest_.serviceDescription.maxLatency),null!=this.manifest_.serviceDescription.targetLatency?h=Math.max(0,
1568
- this.manifest_.serviceDescription.targetLatency-c):null!=this.manifest_.serviceDescription.minLatency&&(h=this.manifest_.serviceDescription.minLatency),k=this.manifest_.serviceDescription.maxPlaybackRate||this.config_.streaming.liveSync.maxPlaybackRate,l=this.manifest_.serviceDescription.minPlaybackRate||this.config_.streaming.liveSync.minPlaybackRate);this.currentTargetLatency_||"number"!==typeof f||(this.currentTargetLatency_=f);var m=this.config_.streaming.liveSync.dynamicTargetLatency.maxAttempts;
1566
+ (shaka.log.debug("Buffer is full. Cancel trick play."),this.cancelTrickPlay())}if(b&&(b=this.seekRange(),Number.isFinite(b.end)&&!(this.video_.currentTime<b.start||this.video_.paused))){c=this.config_.streaming.liveSync.targetLatencyTolerance;d=this.config_.streaming.liveSync.dynamicTargetLatency.enabled;e=this.config_.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;if(this.config_.streaming.liveSync&&this.config_.streaming.liveSync.enabled){var f=this.config_.streaming.liveSync.targetLatency;
1567
+ var g=f+c;var h=Math.max(0,f-c);var k=this.config_.streaming.liveSync.maxPlaybackRate;var l=this.config_.streaming.liveSync.minPlaybackRate}else this.manifest_&&this.manifest_.serviceDescription&&(f=this.manifest_.serviceDescription.targetLatency,null!=this.manifest_.serviceDescription.targetLatency?g=this.manifest_.serviceDescription.targetLatency+c:null!=this.manifest_.serviceDescription.maxLatency&&(g=this.manifest_.serviceDescription.maxLatency),null!=this.manifest_.serviceDescription.targetLatency?
1568
+ h=Math.max(0,this.manifest_.serviceDescription.targetLatency-c):null!=this.manifest_.serviceDescription.minLatency&&(h=this.manifest_.serviceDescription.minLatency),k=this.manifest_.serviceDescription.maxPlaybackRate||this.config_.streaming.liveSync.maxPlaybackRate,l=this.manifest_.serviceDescription.minPlaybackRate||this.config_.streaming.liveSync.minPlaybackRate);this.currentTargetLatency_||"number"!==typeof f||(this.currentTargetLatency_=f);var m=this.config_.streaming.liveSync.dynamicTargetLatency.maxAttempts;
1569
1569
  d&&this.targetLatencyReached_&&null!==this.currentTargetLatency_&&"number"===typeof f&&this.rebufferingCount_<m&&Date.now()-this.targetLatencyReached_>1E3*e&&(e=this.config_.streaming.liveSync.dynamicTargetLatency.minLatency,this.currentTargetLatency_=Math.max(this.currentTargetLatency_-(f-e)/2,e+c),this.targetLatencyReached_=Date.now());d&&null!==this.currentTargetLatency_&&(g=this.currentTargetLatency_+c,h=this.currentTargetLatency_-c);f=b.end-this.video_.currentTime;c=0;this.loadMode_==shaka.Player.LoadMode.SRC_EQUALS&&
1570
1570
  (d=this.video_.buffered,0<d.length&&(c=d.end(d.length-1),c=Math.max(k,c-b.end)));b=this.config_.streaming.liveSync.panicMode;d=1E3*this.config_.streaming.liveSync.panicThreshold;e=Date.now()-this.bufferObserver_.getLastRebufferTime();b&&!l&&(l=this.config_.streaming.liveSync.minPlaybackRate);b&&l&&e<=d?a!=l&&(shaka.log.debug("Time since last rebuffer ("+e+"s) is less than the live sync panicThreshold ("+d+"s). Updating playbackRate to "+l),this.trickPlay(l,!1)):g&&k&&f-c>g?(a!=k&&(shaka.log.debug("Latency ("+
1571
1571
  f+"s) is greater than live sync maxLatency ("+g+"s). Updating playbackRate to "+k),this.trickPlay(k,!1)),this.targetLatencyReached_=null):h&&l&&f-c<h?(a!=l&&(shaka.log.debug("Latency ("+f+"s) is smaller than live sync minLatency ("+h+"s). Updating playbackRate to "+l),this.trickPlay(l,!1)),this.targetLatencyReached_=null):a!==this.playRateController_.getDefaultRate()&&(this.cancelTrickPlay(),this.targetLatencyReached_=Date.now())}};
@@ -1626,7 +1626,7 @@ goog.exportProperty(shaka.Player.prototype,"getLoadMode",shaka.Player.prototype.
1626
1626
  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);goog.exportProperty(shaka.Player.prototype,"preload",shaka.Player.prototype.preload);goog.exportProperty(shaka.Player.prototype,"detachAndSavePreload",shaka.Player.prototype.detachAndSavePreload);
1627
1627
  goog.exportProperty(shaka.Player.prototype,"unloadAndSavePreload",shaka.Player.prototype.unloadAndSavePreload);goog.exportProperty(shaka.Player.prototype,"load",shaka.Player.prototype.load);goog.exportProperty(shaka.Player.prototype,"updateStartTime",shaka.Player.prototype.updateStartTime);goog.exportProperty(shaka.Player.prototype,"unload",shaka.Player.prototype.unload);goog.exportProperty(shaka.Player.prototype,"detach",shaka.Player.prototype.detach);
1628
1628
  goog.exportProperty(shaka.Player.prototype,"attachCanvas",shaka.Player.prototype.attachCanvas);goog.exportProperty(shaka.Player.prototype,"attach",shaka.Player.prototype.attach);goog.exportProperty(shaka.Player,"probeSupport",shaka.Player.probeSupport);goog.exportProperty(shaka.Player,"isBrowserSupported",shaka.Player.isBrowserSupported);goog.exportProperty(shaka.Player,"setAdManagerFactory",shaka.Player.setAdManagerFactory);goog.exportProperty(shaka.Player,"registerSupportPlugin",shaka.Player.registerSupportPlugin);
1629
- 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.12-debug";goog.exportProperty(shaka.Player,"version",shaka.Player.version);shaka.Deprecate.init(shaka.Player.version);shaka.Player.supportPlugins_={};shaka.Player.adManagerFactory_=null;
1629
+ 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.13-debug";goog.exportProperty(shaka.Player,"version",shaka.Player.version);shaka.Deprecate.init(shaka.Player.version);shaka.Player.supportPlugins_={};shaka.Player.adManagerFactory_=null;
1630
1630
  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_++};
1631
1631
  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};
1632
1632
  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_};
@@ -1702,22 +1702,22 @@ shaka.ads.InterstitialAdManager.prototype.determineIfUsingBaseVideo_=function(){
1702
1702
  this.video_=this.adVideo_))}};shaka.ads.InterstitialAdManager.prototype.stop=function(){this.adEventManager_&&this.adEventManager_.removeAll();this.interstitialIds_.clear();this.interstitials_.clear();this.player_.destroyAllPreloads();this.preloadManagerInterstitials_.clear();this.player_.detach();this.playingAd_=!1;this.lastPlayedAd_=this.lastTime_=null};
1703
1703
  shaka.ads.InterstitialAdManager.prototype.release=function(){this.stop();this.eventManager_&&this.eventManager_.release();this.adEventManager_&&this.adEventManager_.release();this.adContainer_&&shaka.util.Dom.removeAllChildren(this.adContainer_);this.timeUpdateTimer_&&(this.timeUpdateTimer_.stop(),this.timeUpdateTimer_=null);this.pollTimer_&&(this.pollTimer_.stop(),this.pollTimer_=null);this.player_.destroy()};
1704
1704
  shaka.ads.InterstitialAdManager.prototype.addMetadata=function(a){var b=this,c;return $jscomp.asyncExecutePromiseGeneratorProgram(function(d){if(1==d.nextAddress)return b.updatePlayerConfig_(),d.yield(b.getInterstitialsInfo_(a),2);c=d.yieldResult;c.length?b.addInterstitials(c):shaka.log.alwaysWarn("Unsupported HLS interstitial",a);d.jumpToEnd()})};
1705
- shaka.ads.InterstitialAdManager.prototype.addRegion=function(a){for(var b,c,d=$jscomp.makeIterator(a.eventNode.children),e=d.next();!e.done;e=d.next()){var f=e.value;if("AlternativeMPD"==f.tagName&&(e=f.attributes.uri,f=f.attributes.mode,e)){b=e;c=f;break}}b?(d="replace"==c,c="insert"==c,d||c?this.addInterstitials([{id:null,startTime:a.startTime,endTime:d?a.endTime:null,uri:b,isSkippable:!1,skipOffset:null,canJump:!0,resumeOffset:c?0:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:d&&
1706
- !c}]):shaka.log.warning("Unsupported MPD alternate",a)):shaka.log.alwaysWarn("Unsupported MPD alternate",a)};
1705
+ shaka.ads.InterstitialAdManager.prototype.addRegion=function(a){for(var b,c,d=$jscomp.makeIterator(a.eventNode.children),e=d.next();!e.done;e=d.next()){var f=e.value;if("AlternativeMPD"==f.tagName&&(e=f.attributes.uri,f=f.attributes.mode,e)){b=e;c=f;break}}b?(d="replace"==c,c="insert"==c,d||c?this.addInterstitials([{id:null,startTime:a.startTime,endTime:a.endTime,uri:b,isSkippable:!1,skipOffset:null,canJump:!0,resumeOffset:c?0:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:d&&!c}]):shaka.log.warning("Unsupported MPD alternate",
1706
+ a)):shaka.log.alwaysWarn("Unsupported MPD alternate",a)};
1707
1707
  shaka.ads.InterstitialAdManager.prototype.addAdUrlInterstitial=function(a){var b=this,c,d,e,f,g,h,k,l,m,n;return $jscomp.asyncExecutePromiseGeneratorProgram(function(p){switch(p.nextAddress){case 1:return c=shaka.net.NetworkingEngine,d={type:c.AdvancedRequestType.INTERSTITIAL_AD_URL},p.yield(b.makeAdRequest_(a,d),2);case 2:e=p.yieldResult;f=shaka.util.TXml.parseXml(e,"VAST,vmap:VMAP");if(!f)throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.ADS,shaka.util.Error.Code.VAST_INVALID_XML);
1708
1708
  g=[];if("VAST"==f.tagName){g=shaka.ads.Utils.parseVastToInterstitials(f,b.lastTime_);p.jumpTo(3);break}if("vmap:VMAP"!=f.tagName){p.jumpTo(3);break}h=$jscomp.makeIterator(shaka.ads.Utils.parseVMAP(f));k=h.next();case 5:if(k.done){p.jumpTo(3);break}l=k.value;return p.yield(b.makeAdRequest_(l.uri,d),8);case 8:m=p.yieldResult;n=shaka.util.TXml.parseXml(m,"VAST");if(!n)throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.ADS,shaka.util.Error.Code.VAST_INVALID_XML);g.push.apply(g,
1709
1709
  $jscomp.arrayFromIterable(shaka.ads.Utils.parseVastToInterstitials(n,l.time)));k=h.next();p.jumpTo(5);break;case 3:b.addInterstitials(g),p.jumpToEnd()}})};
1710
1710
  shaka.ads.InterstitialAdManager.prototype.addInterstitials=function(a){var b=!1;a=$jscomp.makeIterator(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=c.id||JSON.stringify(c);if(!this.interstitialIds_.has(d)){b=!0;this.interstitialIds_.add(d);this.interstitials_.add(c);d=!1;if(c.pre&&null==this.lastTime_)d=!0;else if(0==c.startTime&&!c.canJump)d=!0;else if(null!=this.lastTime_){var e=c.startTime-this.lastTime_;0<e&&10>=e&&(d=!0)}d&&(this.preloadManagerInterstitials_.has(c)||this.preloadManagerInterstitials_.set(c,
1711
1711
  this.player_.preload(c.uri)))}}b&&this.cuepointsChanged_()};shaka.ads.InterstitialAdManager.prototype.createMediaElement_=function(){var a=document.createElement(this.baseVideo_.tagName);a.autoplay=!0;a.style.position="absolute";a.style.top="0";a.style.left="0";a.style.width="100%";a.style.height="100%";a.style.backgroundColor="rgb(0, 0, 0)";a.setAttribute("playsinline","");return a};
1712
- shaka.ads.InterstitialAdManager.prototype.getCurrentInterstitial_=function(a,b,c){var d=0,e=null;if(this.interstitials_.size&&null!=this.lastTime_){var f=this.baseVideo_.ended,g=Array.from(this.interstitials_).sort(function(m,n){return n.startTime-m.startTime});g=$jscomp.makeIterator(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=!1;if(a)k=h.pre;else if(f)k=h.post;else if(!h.pre&&!h.post){var l=this.lastTime_-Math.round(1E3*h.startTime)/1E3;0<l&&(1>=l||!h.canJump)&&(k=1<l&&c&&!c.pre&&!c.post&&
1712
+ shaka.ads.InterstitialAdManager.prototype.getCurrentInterstitial_=function(a,b,c){var d=0,e=null;if(this.interstitials_.size&&null!=this.lastTime_){var f=this.baseVideo_.ended,g=Array.from(this.interstitials_).sort(function(m,n){return n.startTime-m.startTime});g=$jscomp.makeIterator(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=!1;if(a)k=h.pre;else if(f)k=h.post;else if(!h.pre&&!h.post){var l=this.lastTime_-Math.round(1E3*h.startTime)/1E3;0<l&&(1>=l||!h.canJump)&&(k=c&&!c.pre&&!c.post&&
1713
1713
  c.startTime>=h.startTime?!1:!0)}if(k){if(d==b){e=h;break}d++}}}return e};
1714
1714
  shaka.ads.InterstitialAdManager.prototype.setupAd_=function(a,b,c,d,e){e=void 0===e?0:e;var f=this,g,h,k,l,m,n,p,q,r,t,v,u,w,y,x,z;return $jscomp.asyncExecutePromiseGeneratorProgram(function(C){switch(C.nextAddress){case 1:f.determineIfUsingBaseVideo_();goog.asserts.assert(f.video_,"Must have video");f.lastPlayedAd_=a;shaka.log.info("Starting interstitial",a.startTime,"at",f.lastTime_);g=Date.now();!f.video_.parentElement&&f.adContainer_&&f.adContainer_.appendChild(f.video_);1==c&&1==b&&(b=Array.from(f.interstitials_).filter(function(A){return a.pre?
1715
1715
  A.pre==a.pre:a.post?A.post==a.post:.001>Math.abs(A.startTime-a.startTime)}).length);if(a.once||a.pre)e++,f.interstitials_.delete(a),f.cuepointsChanged_();f.playingAd_=!0;if(!f.usingBaseVideo_||1!=c){C.jumpTo(2);break}f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_CONTENT_PAUSE_REQUESTED,(new Map).set("saveLivePosition",!0)));h=new shaka.util.PublicPromise;k=function(A){return $jscomp.asyncExecutePromiseGeneratorProgram(function(B){if(1==B.nextAddress)return"detach"!=A.state?B.jumpTo(0):shaka.util.Platform.isSmartTV()?
1716
1716
  B.yield(new Promise(function(D){return(new shaka.util.Timer(D)).tickAfter(.1)}),3):B.jumpTo(3);h.resolve();f.adEventManager_.unlisten(f.basePlayer_,"onstatechange",k);B.jumpToEnd()})};f.adEventManager_.listen(f.basePlayer_,"onstatechange",k);return C.yield(h,2);case 2:f.usingBaseVideo_||(f.baseVideo_.pause(),null!=a.resumeOffset&&0!=a.resumeOffset&&(f.baseVideo_.currentTime+=a.resumeOffset));l=!1;m=null;n=function(){if(!f.usingBaseVideo_&&null==a.resumeOffset)if(a.timelineRange&&a.endTime&&Infinity!=
1717
1717
  a.endTime)f.baseVideo_.currentTime!=a.endTime&&(f.baseVideo_.currentTime=a.endTime);else{var A=Date.now();f.baseVideo_.currentTime+=(A-d)/1E3;d=A}};p=function(){var A,B;return $jscomp.asyncExecutePromiseGeneratorProgram(function(D){if(1==D.nextAddress)return n(),m&&m.stop(),goog.asserts.assert("number"==typeof e,"Should be an number!"),(A=f.getCurrentInterstitial_(a.pre,c-e))?(f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_STOPPED)),f.adEventManager_.removeAll(),f.setupAd_(A,b,++c,d,e),D.jumpTo(0)):
1718
- f.usingBaseVideo_?D.yield(f.player_.detach(),4):D.yield(f.player_.unload(),4);f.usingBaseVideo_&&(B=a.resumeOffset,null==B&&(B=a.timelineRange&&a.endTime&&Infinity!=a.endTime?a.endTime-(f.lastTime_||0):(Date.now()-d)/1E3),f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_CONTENT_RESUME_REQUESTED,(new Map).set("offset",B))));f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_STOPPED));f.adEventManager_.removeAll();f.playingAd_=!1;f.usingBaseVideo_||(n(),f.baseVideo_.ended||f.baseVideo_.play());
1719
- f.determineIfUsingBaseVideo_();D.jumpToEnd()})};q=function(A){return $jscomp.asyncExecutePromiseGeneratorProgram(function(B){if(l)return B.return();l=!0;f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_ERROR,(new Map).set("originalEvent",A)));return B.yield(p(),0)})};r=function(){return $jscomp.asyncExecutePromiseGeneratorProgram(function(A){if(1==A.nextAddress){if(l)return A.return();l=!0;return A.yield(p(),2)}f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_COMPLETE));A.jumpToEnd()})};
1720
- t=function(){return $jscomp.asyncExecutePromiseGeneratorProgram(function(A){if(l)return A.return();l=!0;f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_SKIPPED));return A.yield(p(),0)})};v=new shaka.ads.InterstitialAd(f.video_,a.isSkippable,a.skipOffset,t,b,c);f.usingBaseVideo_||(v.setMuted(f.baseVideo_.muted),v.setVolume(f.baseVideo_.volume));f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_STARTED,(new Map).set("ad",v)));if(v.canSkipNow())f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_SKIP_STATE_CHANGED));
1718
+ f.usingBaseVideo_?D.yield(f.player_.detach(),4):D.yield(f.player_.unload(),4);f.usingBaseVideo_&&(B=a.resumeOffset,null==B&&(B=a.timelineRange&&a.endTime&&Infinity!=a.endTime?a.endTime-(f.lastTime_||0):(Date.now()-d)/1E3),f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_CONTENT_RESUME_REQUESTED,(new Map).set("offset",B))));f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_STOPPED));f.adEventManager_.removeAll();f.playingAd_=!1;f.usingBaseVideo_?f.cuepointsChanged_():(n(),f.baseVideo_.ended||
1719
+ f.baseVideo_.play());f.determineIfUsingBaseVideo_();D.jumpToEnd()})};q=function(A){return $jscomp.asyncExecutePromiseGeneratorProgram(function(B){if(l)return B.return();l=!0;f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_ERROR,(new Map).set("originalEvent",A)));return B.yield(p(),0)})};r=function(){return $jscomp.asyncExecutePromiseGeneratorProgram(function(A){if(1==A.nextAddress){if(l)return A.return();l=!0;return A.yield(p(),2)}f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_COMPLETE));
1720
+ A.jumpToEnd()})};t=function(){return $jscomp.asyncExecutePromiseGeneratorProgram(function(A){if(l)return A.return();l=!0;f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_SKIPPED));return A.yield(p(),0)})};v=new shaka.ads.InterstitialAd(f.video_,a.isSkippable,a.skipOffset,t,b,c);f.usingBaseVideo_||(v.setMuted(f.baseVideo_.muted),v.setVolume(f.baseVideo_.volume));f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_STARTED,(new Map).set("ad",v)));if(v.canSkipNow())f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_SKIP_STATE_CHANGED));
1721
1721
  u=new Set;f.adEventManager_.listenOnce(f.player_,"error",q);f.adEventManager_.listen(f.video_,"timeupdate",function(){var A=f.video_.duration;if(A){if(a.isSkippable&&a.skipOffset&&v.canSkipNow()&&0<v.getRemainingTime()&&0<v.getDuration())f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_SKIP_STATE_CHANGED));A=100*f.video_.currentTime/A;25<=A&&!u.has("firstquartile")?(n(),f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_FIRST_QUARTILE)),u.add("firstquartile")):50<=A&&!u.has("midpoint")?
1722
1722
  (n(),f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_MIDPOINT)),u.add("midpoint")):75<=A&&!u.has("thirdquartile")&&(n(),f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_THIRD_QUARTILE)),u.add("thirdquartile"))}});f.adEventManager_.listenOnce(f.player_,"complete",r);f.adEventManager_.listen(f.video_,"play",function(){f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_RESUMED))});f.adEventManager_.listen(f.video_,"pause",function(){var A=f.player_.getConfiguration();if(f.video_.currentTime>=
1723
1723
  A.playRangeEnd)r();else f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_PAUSED))});f.adEventManager_.listen(f.video_,"volumechange",function(){if(f.video_.muted)f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_MUTED));else f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_VOLUME_CHANGED))});C.setCatchFinallyBlocks(4);f.updatePlayerConfig_();a.startTime&&a.endTime&&Infinity!=a.endTime&&a.startTime!=a.endTime&&(w=a.endTime-a.startTime,0<w&&f.player_.configure("playRangeEnd",w));a.playoutLimit&&
@@ -3515,8 +3515,8 @@ this.eventManager.listen(this.player,"loaded",function(){c.updatePlaybackRateSel
3515
3515
  $jscomp.inherits(shaka.ui.PlaybackRateSelection,shaka.ui.SettingsMenu);shaka.ui.PlaybackRateSelection.prototype.updateLocalizedStrings_=function(){var a=shaka.ui.Locales.Ids;this.backButton.ariaLabel=this.localization.resolve(a.BACK);this.button.ariaLabel=this.localization.resolve(a.PLAYBACK_RATE);this.nameSpan.textContent=this.localization.resolve(a.PLAYBACK_RATE);this.backSpan.textContent=this.localization.resolve(a.PLAYBACK_RATE)};
3516
3516
  shaka.ui.PlaybackRateSelection.prototype.updatePlaybackRateSelection_=function(a){var b=this,c=shaka.ui.Utils.getDescendantIfExists(this.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(this.menu.querySelectorAll("span")).find(function(e){return b.playbackRates_.get(e.textContent)==a}))d=c.parentElement,d.appendChild(shaka.ui.Utils.checkmarkIcon()),
3517
3517
  d.ariaSelected="true",c.classList.add("shaka-chosen-item");this.currentSelection.textContent=a+"x";this.button.setAttribute("shaka-status",a+"x")};
3518
- shaka.ui.PlaybackRateSelection.prototype.addPlaybackRates_=function(){for(var a=this,b=$jscomp.makeIterator(this.playbackRates_.keys()),c=b.next(),d={};!c.done;d={rateStr:void 0},c=b.next()){d.rateStr=c.value;c=shaka.util.Dom.createButton();var e=shaka.util.Dom.createHTMLElement("span");e.textContent=d.rateStr;c.appendChild(e);this.eventManager.listen(c,"click",function(f){return function(){a.video.playbackRate=a.playbackRates_.get(f.rateStr);a.video.defaultPlaybackRate=a.playbackRates_.get(f.rateStr)}}(d));
3519
- this.menu.appendChild(c)}shaka.ui.Utils.focusOnTheChosenItem(this.menu)};goog.exportSymbol("shaka.ui.PlaybackRateSelection",shaka.ui.PlaybackRateSelection);shaka.ui.PlaybackRateSelection.Factory=function(){};shaka.ui.PlaybackRateSelection.Factory.prototype.create=function(a,b){return new shaka.ui.PlaybackRateSelection(a,b)};shaka.ui.OverflowMenu.registerElement("playback_rate",new shaka.ui.PlaybackRateSelection.Factory);shaka.ui.Controls.registerElement("playback_rate",new shaka.ui.PlaybackRateSelection.Factory);shaka.ui.PresentationTimeTracker=function(a,b){shaka.ui.Element.call(this,a,b);var c=this;this.currentTime_=shaka.util.Dom.createButton();this.currentTime_.classList.add("shaka-current-time");this.setValue_("0:00");this.parent.appendChild(this.currentTime_);this.eventManager.listen(this.currentTime_,"click",function(){c.player.isLive()&&(c.video.currentTime=c.player.seekRange().end)});this.eventManager.listen(this.player,"loading",function(){shaka.ui.Utils.setDisplay(c.currentTime_,!0)});this.eventManager.listen(this.controls,
3518
+ shaka.ui.PlaybackRateSelection.prototype.addPlaybackRates_=function(){for(var a=this,b=$jscomp.makeIterator(this.playbackRates_.keys()),c=b.next(),d={};!c.done;d={rateStr:void 0},c=b.next()){d.rateStr=c.value;c=shaka.util.Dom.createButton();var e=shaka.util.Dom.createHTMLElement("span");e.textContent=d.rateStr;c.appendChild(e);this.eventManager.listen(c,"click",function(f){return function(){var g=a.playbackRates_.get(f.rateStr);1==g?a.player.cancelTrickPlay():a.player.trickPlay(g,!1)}}(d));this.menu.appendChild(c)}shaka.ui.Utils.focusOnTheChosenItem(this.menu)};
3519
+ goog.exportSymbol("shaka.ui.PlaybackRateSelection",shaka.ui.PlaybackRateSelection);shaka.ui.PlaybackRateSelection.Factory=function(){};shaka.ui.PlaybackRateSelection.Factory.prototype.create=function(a,b){return new shaka.ui.PlaybackRateSelection(a,b)};shaka.ui.OverflowMenu.registerElement("playback_rate",new shaka.ui.PlaybackRateSelection.Factory);shaka.ui.Controls.registerElement("playback_rate",new shaka.ui.PlaybackRateSelection.Factory);shaka.ui.PresentationTimeTracker=function(a,b){shaka.ui.Element.call(this,a,b);var c=this;this.currentTime_=shaka.util.Dom.createButton();this.currentTime_.classList.add("shaka-current-time");this.setValue_("0:00");this.parent.appendChild(this.currentTime_);this.eventManager.listen(this.currentTime_,"click",function(){c.player.isLive()&&(c.video.currentTime=c.player.seekRange().end)});this.eventManager.listen(this.player,"loading",function(){shaka.ui.Utils.setDisplay(c.currentTime_,!0)});this.eventManager.listen(this.controls,
3520
3520
  "timeandseekrangeupdated",function(){c.updateTime_()});this.eventManager.listen(this.player,"trackschanged",function(){c.onTracksChanged_()});this.eventManager.listen(this.adManager,shaka.ads.Utils.AD_STARTED,function(){shaka.ui.Utils.setDisplay(c.currentTime_,!1)});this.eventManager.listen(this.adManager,shaka.ads.Utils.AD_STOPPED,function(){shaka.ui.Utils.setDisplay(c.currentTime_,!0)})};$jscomp.inherits(shaka.ui.PresentationTimeTracker,shaka.ui.Element);
3521
3521
  shaka.ui.PresentationTimeTracker.prototype.setValue_=function(a){a!=this.currentTime_.textContent&&(this.currentTime_.textContent=a)};
3522
3522
  shaka.ui.PresentationTimeTracker.prototype.updateTime_=function(){var a=this.controls.isSeeking(),b=this.controls.getDisplayTime(),c=this.player.seekRange(),d=c.end-c.start,e=shaka.ui.Utils;isFinite(d)?this.player.isLive()?(b=Math.max(0,Math.floor(c.end-b)),d=3600<=d,1<=b||a?(this.setValue_("- "+e.buildTimeString(b,d)),this.currentTime_.disabled=!1):(this.setValue_(this.localization.resolve(shaka.ui.Locales.Ids.LIVE)),this.currentTime_.disabled=!0)):(a=3600<=d,b=e.buildTimeString(Math.max(0,b-c.start),