shaka-player 4.10.24 → 4.10.25
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 +36 -36
- package/dist/shaka-player.compiled.d.ts +5 -0
- package/dist/shaka-player.compiled.debug.d.ts +5 -0
- package/dist/shaka-player.compiled.debug.externs.js +16 -0
- package/dist/shaka-player.compiled.debug.js +17 -17
- package/dist/shaka-player.compiled.debug.map +2 -2
- package/dist/shaka-player.compiled.externs.js +16 -0
- package/dist/shaka-player.compiled.js +139 -139
- package/dist/shaka-player.compiled.map +2 -2
- package/dist/shaka-player.ui.d.ts +5 -0
- package/dist/shaka-player.ui.debug.d.ts +5 -0
- package/dist/shaka-player.ui.debug.externs.js +16 -0
- package/dist/shaka-player.ui.debug.js +25 -24
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.externs.js +16 -0
- package/dist/shaka-player.ui.js +391 -391
- package/dist/shaka-player.ui.map +2 -2
- package/externs/shaka/ads.js +5 -0
- package/lib/ads/client_side_ad.js +8 -0
- package/lib/ads/interstitial_ad.js +8 -0
- package/lib/ads/media_tailor_ad.js +8 -0
- package/lib/ads/server_side_ad.js +8 -0
- package/lib/dash/segment_template.js +13 -0
- package/lib/media/drm_engine.js +8 -1
- package/lib/player.js +1 -1
- package/package.json +1 -1
- package/ui/controls.js +7 -0
package/dist/locales.js
CHANGED
|
@@ -909,51 +909,51 @@ shaka.ui.Locales.addTo = function(localization) {
|
|
|
909
909
|
* @const
|
|
910
910
|
*/
|
|
911
911
|
shaka.ui.Locales.Ids = {
|
|
912
|
-
|
|
912
|
+
DOWNLOAD_VIDEO_FRAME: 'DOWNLOAD_VIDEO_FRAME',
|
|
913
|
+
FAST_FORWARD: 'FAST_FORWARD',
|
|
914
|
+
SKIP_AD: 'SKIP_AD',
|
|
915
|
+
BACK: 'BACK',
|
|
916
|
+
PAUSE: 'PAUSE',
|
|
917
|
+
REWIND: 'REWIND',
|
|
918
|
+
LANGUAGE: 'LANGUAGE',
|
|
913
919
|
UNMUTE: 'UNMUTE',
|
|
920
|
+
SUBTITLE_FORCED: 'SUBTITLE_FORCED',
|
|
921
|
+
AD_TIME: 'AD_TIME',
|
|
914
922
|
REPLAY: 'REPLAY',
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
923
|
+
UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
|
|
924
|
+
UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
|
|
925
|
+
CHAPTERS: 'CHAPTERS',
|
|
926
|
+
CAPTIONS: 'CAPTIONS',
|
|
927
|
+
AIRPLAY: 'AIRPLAY',
|
|
918
928
|
ENTER_LOOP_MODE: 'ENTER_LOOP_MODE',
|
|
919
|
-
|
|
920
|
-
EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
|
|
921
|
-
LOOP: 'LOOP',
|
|
922
|
-
AUTO_QUALITY: 'AUTO_QUALITY',
|
|
929
|
+
ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE',
|
|
923
930
|
EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
931
|
+
CAST: 'CAST',
|
|
932
|
+
LIVE: 'LIVE',
|
|
933
|
+
MORE_SETTINGS: 'MORE_SETTINGS',
|
|
927
934
|
OFF: 'OFF',
|
|
928
|
-
AD_STATISTICS: 'AD_STATISTICS',
|
|
929
|
-
AD_TIME: 'AD_TIME',
|
|
930
|
-
NOT_APPLICABLE: 'NOT_APPLICABLE',
|
|
931
|
-
RECENTER_VR: 'RECENTER_VR',
|
|
932
|
-
AIRPLAY: 'AIRPLAY',
|
|
933
|
-
DOWNLOAD_VIDEO_FRAME: 'DOWNLOAD_VIDEO_FRAME',
|
|
934
|
-
FAST_FORWARD: 'FAST_FORWARD',
|
|
935
|
-
RESOLUTION: 'RESOLUTION',
|
|
936
935
|
AD_PROGRESS: 'AD_PROGRESS',
|
|
936
|
+
PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE',
|
|
937
|
+
PLAY: 'PLAY',
|
|
937
938
|
ON: 'ON',
|
|
938
|
-
|
|
939
|
+
AUTO_QUALITY: 'AUTO_QUALITY',
|
|
940
|
+
RESOLUTION: 'RESOLUTION',
|
|
939
941
|
TOGGLE_STEREOSCOPIC: 'TOGGLE_STEREOSCOPIC',
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
|
|
946
|
-
FULL_SCREEN: 'FULL_SCREEN',
|
|
947
|
-
LIVE: 'LIVE',
|
|
942
|
+
RECENTER_VR: 'RECENTER_VR',
|
|
943
|
+
SEEK: 'SEEK',
|
|
944
|
+
MUTE: 'MUTE',
|
|
945
|
+
NOT_APPLICABLE: 'NOT_APPLICABLE',
|
|
946
|
+
QUALITY: 'QUALITY',
|
|
948
947
|
SKIP_TO_LIVE: 'SKIP_TO_LIVE',
|
|
949
|
-
|
|
950
|
-
|
|
948
|
+
LOOP: 'LOOP',
|
|
949
|
+
FULL_SCREEN: 'FULL_SCREEN',
|
|
951
950
|
STATISTICS: 'STATISTICS',
|
|
952
|
-
|
|
953
|
-
UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
|
|
954
|
-
ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE',
|
|
951
|
+
PLAYBACK_RATE: 'PLAYBACK_RATE',
|
|
955
952
|
EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN',
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
953
|
+
AD_STATISTICS: 'AD_STATISTICS',
|
|
954
|
+
EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
|
|
955
|
+
VOLUME: 'VOLUME',
|
|
956
|
+
MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES',
|
|
957
|
+
AD_DURATION: 'AD_DURATION',
|
|
958
|
+
SURROUND: 'SURROUND',
|
|
959
959
|
};
|
|
@@ -750,6 +750,7 @@ declare namespace shaka.ads {
|
|
|
750
750
|
getVastMediaHeight ( ) : any ;
|
|
751
751
|
getVastMediaWidth ( ) : any ;
|
|
752
752
|
getVolume ( ) : any ;
|
|
753
|
+
isClientRendering ( ) : any ;
|
|
753
754
|
isLinear ( ) : any ;
|
|
754
755
|
isMuted ( ) : any ;
|
|
755
756
|
isPaused ( ) : any ;
|
|
@@ -788,6 +789,7 @@ declare namespace shaka.ads {
|
|
|
788
789
|
getVastMediaHeight ( ) : any ;
|
|
789
790
|
getVastMediaWidth ( ) : any ;
|
|
790
791
|
getVolume ( ) : any ;
|
|
792
|
+
isClientRendering ( ) : any ;
|
|
791
793
|
isLinear ( ) : any ;
|
|
792
794
|
isMuted ( ) : any ;
|
|
793
795
|
isPaused ( ) : any ;
|
|
@@ -826,6 +828,7 @@ declare namespace shaka.ads {
|
|
|
826
828
|
getVastMediaHeight ( ) : any ;
|
|
827
829
|
getVastMediaWidth ( ) : any ;
|
|
828
830
|
getVolume ( ) : any ;
|
|
831
|
+
isClientRendering ( ) : any ;
|
|
829
832
|
isLinear ( ) : any ;
|
|
830
833
|
isMuted ( ) : any ;
|
|
831
834
|
isPaused ( ) : any ;
|
|
@@ -864,6 +867,7 @@ declare namespace shaka.ads {
|
|
|
864
867
|
getVastMediaHeight ( ) : any ;
|
|
865
868
|
getVastMediaWidth ( ) : any ;
|
|
866
869
|
getVolume ( ) : any ;
|
|
870
|
+
isClientRendering ( ) : any ;
|
|
867
871
|
isLinear ( ) : any ;
|
|
868
872
|
isMuted ( ) : any ;
|
|
869
873
|
isPaused ( ) : any ;
|
|
@@ -4186,6 +4190,7 @@ declare namespace shaka.extern {
|
|
|
4186
4190
|
getVastMediaHeight ( ) : number ;
|
|
4187
4191
|
getVastMediaWidth ( ) : number ;
|
|
4188
4192
|
getVolume ( ) : number ;
|
|
4193
|
+
isClientRendering ( ) : boolean ;
|
|
4189
4194
|
isLinear ( ) : boolean ;
|
|
4190
4195
|
isMuted ( ) : boolean ;
|
|
4191
4196
|
isPaused ( ) : boolean ;
|
|
@@ -750,6 +750,7 @@ declare namespace shaka.ads {
|
|
|
750
750
|
getVastMediaHeight ( ) : any ;
|
|
751
751
|
getVastMediaWidth ( ) : any ;
|
|
752
752
|
getVolume ( ) : any ;
|
|
753
|
+
isClientRendering ( ) : any ;
|
|
753
754
|
isLinear ( ) : any ;
|
|
754
755
|
isMuted ( ) : any ;
|
|
755
756
|
isPaused ( ) : any ;
|
|
@@ -788,6 +789,7 @@ declare namespace shaka.ads {
|
|
|
788
789
|
getVastMediaHeight ( ) : any ;
|
|
789
790
|
getVastMediaWidth ( ) : any ;
|
|
790
791
|
getVolume ( ) : any ;
|
|
792
|
+
isClientRendering ( ) : any ;
|
|
791
793
|
isLinear ( ) : any ;
|
|
792
794
|
isMuted ( ) : any ;
|
|
793
795
|
isPaused ( ) : any ;
|
|
@@ -826,6 +828,7 @@ declare namespace shaka.ads {
|
|
|
826
828
|
getVastMediaHeight ( ) : any ;
|
|
827
829
|
getVastMediaWidth ( ) : any ;
|
|
828
830
|
getVolume ( ) : any ;
|
|
831
|
+
isClientRendering ( ) : any ;
|
|
829
832
|
isLinear ( ) : any ;
|
|
830
833
|
isMuted ( ) : any ;
|
|
831
834
|
isPaused ( ) : any ;
|
|
@@ -864,6 +867,7 @@ declare namespace shaka.ads {
|
|
|
864
867
|
getVastMediaHeight ( ) : any ;
|
|
865
868
|
getVastMediaWidth ( ) : any ;
|
|
866
869
|
getVolume ( ) : any ;
|
|
870
|
+
isClientRendering ( ) : any ;
|
|
867
871
|
isLinear ( ) : any ;
|
|
868
872
|
isMuted ( ) : any ;
|
|
869
873
|
isPaused ( ) : any ;
|
|
@@ -4186,6 +4190,7 @@ declare namespace shaka.extern {
|
|
|
4186
4190
|
getVastMediaHeight ( ) : number ;
|
|
4187
4191
|
getVastMediaWidth ( ) : number ;
|
|
4188
4192
|
getVolume ( ) : number ;
|
|
4193
|
+
isClientRendering ( ) : boolean ;
|
|
4189
4194
|
isLinear ( ) : boolean ;
|
|
4190
4195
|
isMuted ( ) : boolean ;
|
|
4191
4196
|
isPaused ( ) : boolean ;
|
|
@@ -3802,6 +3802,10 @@ shaka.ads.ClientSideAd = class {
|
|
|
3802
3802
|
* @override
|
|
3803
3803
|
*/
|
|
3804
3804
|
needsSkipUI() {}
|
|
3805
|
+
/**
|
|
3806
|
+
* @override
|
|
3807
|
+
*/
|
|
3808
|
+
isClientRendering() {}
|
|
3805
3809
|
/**
|
|
3806
3810
|
* @override
|
|
3807
3811
|
*/
|
|
@@ -4121,6 +4125,10 @@ shaka.ads.InterstitialAd = class {
|
|
|
4121
4125
|
* @override
|
|
4122
4126
|
*/
|
|
4123
4127
|
needsSkipUI() {}
|
|
4128
|
+
/**
|
|
4129
|
+
* @override
|
|
4130
|
+
*/
|
|
4131
|
+
isClientRendering() {}
|
|
4124
4132
|
/**
|
|
4125
4133
|
* @override
|
|
4126
4134
|
*/
|
|
@@ -4257,6 +4265,10 @@ shaka.ads.MediaTailorAd = class {
|
|
|
4257
4265
|
* @override
|
|
4258
4266
|
*/
|
|
4259
4267
|
needsSkipUI() {}
|
|
4268
|
+
/**
|
|
4269
|
+
* @override
|
|
4270
|
+
*/
|
|
4271
|
+
isClientRendering() {}
|
|
4260
4272
|
/**
|
|
4261
4273
|
* @override
|
|
4262
4274
|
*/
|
|
@@ -4391,6 +4403,10 @@ shaka.ads.ServerSideAd = class {
|
|
|
4391
4403
|
* @override
|
|
4392
4404
|
*/
|
|
4393
4405
|
needsSkipUI() {}
|
|
4406
|
+
/**
|
|
4407
|
+
* @override
|
|
4408
|
+
*/
|
|
4409
|
+
isClientRendering() {}
|
|
4394
4410
|
/**
|
|
4395
4411
|
* @override
|
|
4396
4412
|
*/
|
|
@@ -520,9 +520,9 @@ C.audio.drmInfos.length?!0:!1});g||(h=shaka.util.MapUtils.asMap(b.config_.server
|
|
|
520
520
|
shaka.media.DrmEngine.prototype.attachMediaKeys_=function(){var a=this,b;return $jscomp.asyncExecutePromiseGeneratorProgram(function(c){switch(c.nextAddress){case 1:if(a.video_.mediaKeys)return c.return();if(!a.mediaKeysAttached_){c.jumpTo(2);break}return c.yield(a.mediaKeysAttached_,3);case 3:return a.destroyer_.ensureNotDestroyed(),c.return();case 2:return c.setCatchFinallyBlocks(4),a.mediaKeysAttached_=a.video_.setMediaKeys(a.mediaKeys_),c.yield(a.mediaKeysAttached_,6);case 6:c.leaveTryBlock(5);
|
|
521
521
|
break;case 4:b=c.enterCatchBlock(),goog.asserts.assert(b instanceof Error,"Wrong error type!"),a.onError_(new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.DRM,shaka.util.Error.Code.FAILED_TO_ATTACH_TO_VIDEO,b.message));case 5:a.destroyer_.ensureNotDestroyed(),c.jumpToEnd()}})};
|
|
522
522
|
shaka.media.DrmEngine.prototype.onEncryptedEvent_=function(a){var b=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(c){if(1==c.nextAddress)return c.yield(b.attachMediaKeys_(),2);b.newInitData(a.initDataType,shaka.util.BufferUtils.toUint8(a.initData));c.jumpToEnd()})};
|
|
523
|
-
shaka.media.DrmEngine.prototype.attach=function(a){var b=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(c){if(1==c.nextAddress){if(!b.mediaKeys_)return b.eventManager_.listenOnce(a,"encrypted",function(d){b.onError_(new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.DRM,shaka.util.Error.Code.ENCRYPTED_CONTENT_WITHOUT_DRM_INFO))}),c.return();b.video_=a;b.eventManager_.listenOnce(b.video_,"play",function(){return b.onPlay_()});
|
|
524
|
-
b.
|
|
525
|
-
b.eventManager_.listen(b.video_,"encrypted",function(d){return b.onEncryptedEvent_(d)});c.jumpToEnd()})};shaka.media.DrmEngine.prototype.hasManifestInitData=function(){return!!this.manifestInitData_};
|
|
523
|
+
shaka.media.DrmEngine.prototype.attach=function(a){var b=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(c){if(1==c.nextAddress){if(!b.mediaKeys_)return b.eventManager_.listenOnce(a,"encrypted",function(d){b.onError_(new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.DRM,shaka.util.Error.Code.ENCRYPTED_CONTENT_WITHOUT_DRM_INFO))}),c.return();b.video_=a;b.eventManager_.listenOnce(b.video_,"play",function(){return b.onPlay_()});b.video_.remote?(b.eventManager_.listen(b.video_.remote,
|
|
524
|
+
"connect",function(){return b.closeOpenSessions_()}),b.eventManager_.listen(b.video_.remote,"connecting",function(){return b.closeOpenSessions_()}),b.eventManager_.listen(b.video_.remote,"disconnect",function(){return b.closeOpenSessions_()})):"webkitCurrentPlaybackTargetIsWireless"in b.video_&&b.eventManager_.listen(b.video_,"webkitcurrentplaybacktargetiswirelesschanged",function(){return b.closeOpenSessions_()});b.manifestInitData_=b.currentDrmInfo_?b.currentDrmInfo_.initData.find(function(d){return 0<
|
|
525
|
+
d.initData.length})||null:null;return b.manifestInitData_||"com.apple.fps"!==b.currentDrmInfo_.keySystem||b.storedPersistentSessions_.size?c.yield(b.attachMediaKeys_(),2):c.jumpTo(2)}b.createOrLoad().catch(function(){});b.manifestInitData_||b.storedPersistentSessions_.size||b.config_.parseInbandPsshEnabled||b.eventManager_.listen(b.video_,"encrypted",function(d){return b.onEncryptedEvent_(d)});c.jumpToEnd()})};shaka.media.DrmEngine.prototype.hasManifestInitData=function(){return!!this.manifestInitData_};
|
|
526
526
|
shaka.media.DrmEngine.prototype.setServerCertificate=function(){var a=this,b,c,d,e,f,g;return $jscomp.asyncExecutePromiseGeneratorProgram(function(h){switch(h.nextAddress){case 1:goog.asserts.assert(a.initialized_,"Must call init() before setServerCertificate");if(!a.mediaKeys_||!a.currentDrmInfo_)return h.return();if(!a.currentDrmInfo_.serverCertificateUri||a.currentDrmInfo_.serverCertificate&&a.currentDrmInfo_.serverCertificate.length){h.jumpTo(2);break}b=shaka.net.NetworkingEngine.makeRequest([a.currentDrmInfo_.serverCertificateUri],
|
|
527
527
|
a.config_.retryParameters);h.setCatchFinallyBlocks(3);c=a.playerInterface_.netEngine.request(shaka.net.NetworkingEngine.RequestType.SERVER_CERTIFICATE,b);return h.yield(c.promise,5);case 5:d=h.yieldResult;a.currentDrmInfo_.serverCertificate=shaka.util.BufferUtils.toUint8(d.data);h.leaveTryBlock(4);break;case 3:throw e=h.enterCatchBlock(),goog.asserts.assert(e instanceof shaka.util.Error,"Wrong NetworkingEngine error type!"),new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.DRM,
|
|
528
528
|
shaka.util.Error.Code.SERVER_CERTIFICATE_REQUEST_FAILED,e);case 4:if(a.destroyer_.destroyed())return h.return();case 2:if(!a.currentDrmInfo_.serverCertificate||!a.currentDrmInfo_.serverCertificate.length)return h.return();h.setCatchFinallyBlocks(6);return h.yield(a.mediaKeys_.setServerCertificate(a.currentDrmInfo_.serverCertificate),8);case 8:(f=h.yieldResult)||shaka.log.warning("Server certificates are not supported by the key system. The server certificate has been ignored.");h.leaveTryBlock(0);
|
|
@@ -1504,12 +1504,12 @@ goog.exportProperty(shaka.Player.prototype,"getLoadMode",shaka.Player.prototype.
|
|
|
1504
1504
|
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);
|
|
1505
1505
|
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);
|
|
1506
1506
|
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);
|
|
1507
|
-
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.10.
|
|
1507
|
+
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.10.25-debug";goog.exportProperty(shaka.Player,"version",shaka.Player.version);shaka.Deprecate.init(shaka.Player.version);shaka.Player.supportPlugins_={};shaka.Player.adManagerFactory_=null;
|
|
1508
1508
|
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_++};
|
|
1509
1509
|
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};
|
|
1510
|
-
shaka.ads.ClientSideAd.prototype.
|
|
1511
|
-
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};
|
|
1512
|
-
shaka.ads.ClientSideAd.prototype.play=function(){return this.manager_.resume()};shaka.ads.ClientSideAd.prototype.getVolume=function(){return this.manager_.getVolume()};shaka.ads.ClientSideAd.prototype.setVolume=function(a){this.video_.volume=a;return this.manager_.setVolume(a)};shaka.ads.ClientSideAd.prototype.isMuted=function(){return 0==this.manager_.getVolume()};shaka.ads.ClientSideAd.prototype.isLinear=function(){return this.ad_.isLinear()};
|
|
1510
|
+
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_};
|
|
1511
|
+
shaka.ads.ClientSideAd.prototype.isSkippable=function(){return 0<=this.ad_.getSkipTimeOffset()};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};
|
|
1512
|
+
shaka.ads.ClientSideAd.prototype.pause=function(){return this.manager_.pause()};shaka.ads.ClientSideAd.prototype.play=function(){return this.manager_.resume()};shaka.ads.ClientSideAd.prototype.getVolume=function(){return this.manager_.getVolume()};shaka.ads.ClientSideAd.prototype.setVolume=function(a){this.video_.volume=a;return this.manager_.setVolume(a)};shaka.ads.ClientSideAd.prototype.isMuted=function(){return 0==this.manager_.getVolume()};shaka.ads.ClientSideAd.prototype.isLinear=function(){return this.ad_.isLinear()};
|
|
1513
1513
|
shaka.ads.ClientSideAd.prototype.resize=function(a,b){var c=!1,d=this.video_;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.manager_.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};shaka.ads.ClientSideAd.prototype.setMuted=function(a){(this.video_.muted=a)?(this.volume_=this.getVolume(),this.manager_.setVolume(0)):this.manager_.setVolume(this.volume_)};
|
|
1514
1514
|
shaka.ads.ClientSideAd.prototype.setInitialMuted=function(a){this.volume_=a;this.manager_.setVolume(0)};shaka.ads.ClientSideAd.prototype.getSequenceLength=function(){var a=this.ad_.getAdPodInfo();return null==a?1:a.getTotalAds()};shaka.ads.ClientSideAd.prototype.getPositionInSequence=function(){var a=this.ad_.getAdPodInfo();return null==a?1:a.getAdPosition()};shaka.ads.ClientSideAd.prototype.getTitle=function(){return this.ad_.getTitle()};shaka.ads.ClientSideAd.prototype.getDescription=function(){return this.ad_.getDescription()};
|
|
1515
1515
|
shaka.ads.ClientSideAd.prototype.getVastMediaBitrate=function(){return this.ad_.getVastMediaBitrate()};shaka.ads.ClientSideAd.prototype.getVastMediaHeight=function(){return this.ad_.getVastMediaHeight()};shaka.ads.ClientSideAd.prototype.getVastMediaWidth=function(){return this.ad_.getVastMediaWidth()};shaka.ads.ClientSideAd.prototype.getAdId=function(){return this.ad_.getAdId()};shaka.ads.ClientSideAd.prototype.getCreativeAdId=function(){return this.ad_.getCreativeAdId()};
|
|
@@ -1521,7 +1521,7 @@ goog.exportProperty(shaka.ads.ClientSideAd.prototype,"getTitle",shaka.ads.Client
|
|
|
1521
1521
|
goog.exportProperty(shaka.ads.ClientSideAd.prototype,"resize",shaka.ads.ClientSideAd.prototype.resize);goog.exportProperty(shaka.ads.ClientSideAd.prototype,"isLinear",shaka.ads.ClientSideAd.prototype.isLinear);goog.exportProperty(shaka.ads.ClientSideAd.prototype,"isMuted",shaka.ads.ClientSideAd.prototype.isMuted);goog.exportProperty(shaka.ads.ClientSideAd.prototype,"setVolume",shaka.ads.ClientSideAd.prototype.setVolume);goog.exportProperty(shaka.ads.ClientSideAd.prototype,"getVolume",shaka.ads.ClientSideAd.prototype.getVolume);
|
|
1522
1522
|
goog.exportProperty(shaka.ads.ClientSideAd.prototype,"play",shaka.ads.ClientSideAd.prototype.play);goog.exportProperty(shaka.ads.ClientSideAd.prototype,"pause",shaka.ads.ClientSideAd.prototype.pause);goog.exportProperty(shaka.ads.ClientSideAd.prototype,"skip",shaka.ads.ClientSideAd.prototype.skip);goog.exportProperty(shaka.ads.ClientSideAd.prototype,"canSkipNow",shaka.ads.ClientSideAd.prototype.canSkipNow);goog.exportProperty(shaka.ads.ClientSideAd.prototype,"getTimeUntilSkippable",shaka.ads.ClientSideAd.prototype.getTimeUntilSkippable);
|
|
1523
1523
|
goog.exportProperty(shaka.ads.ClientSideAd.prototype,"isSkippable",shaka.ads.ClientSideAd.prototype.isSkippable);goog.exportProperty(shaka.ads.ClientSideAd.prototype,"isPaused",shaka.ads.ClientSideAd.prototype.isPaused);goog.exportProperty(shaka.ads.ClientSideAd.prototype,"getRemainingTime",shaka.ads.ClientSideAd.prototype.getRemainingTime);goog.exportProperty(shaka.ads.ClientSideAd.prototype,"getMinSuggestedDuration",shaka.ads.ClientSideAd.prototype.getMinSuggestedDuration);
|
|
1524
|
-
goog.exportProperty(shaka.ads.ClientSideAd.prototype,"getDuration",shaka.ads.ClientSideAd.prototype.getDuration);goog.exportProperty(shaka.ads.ClientSideAd.prototype,"needsSkipUI",shaka.ads.ClientSideAd.prototype.needsSkipUI);shaka.ads.Utils=function(){};goog.exportSymbol("shaka.ads.Utils",shaka.ads.Utils);shaka.ads.Utils.ADS_LOADED="ads-loaded";goog.exportProperty(shaka.ads.Utils,"ADS_LOADED",shaka.ads.Utils.ADS_LOADED);shaka.ads.Utils.AD_STARTED="ad-started";goog.exportProperty(shaka.ads.Utils,"AD_STARTED",shaka.ads.Utils.AD_STARTED);shaka.ads.Utils.AD_FIRST_QUARTILE="ad-first-quartile";goog.exportProperty(shaka.ads.Utils,"AD_FIRST_QUARTILE",shaka.ads.Utils.AD_FIRST_QUARTILE);shaka.ads.Utils.AD_MIDPOINT="ad-midpoint";
|
|
1524
|
+
goog.exportProperty(shaka.ads.ClientSideAd.prototype,"getDuration",shaka.ads.ClientSideAd.prototype.getDuration);goog.exportProperty(shaka.ads.ClientSideAd.prototype,"isClientRendering",shaka.ads.ClientSideAd.prototype.isClientRendering);goog.exportProperty(shaka.ads.ClientSideAd.prototype,"needsSkipUI",shaka.ads.ClientSideAd.prototype.needsSkipUI);shaka.ads.Utils=function(){};goog.exportSymbol("shaka.ads.Utils",shaka.ads.Utils);shaka.ads.Utils.ADS_LOADED="ads-loaded";goog.exportProperty(shaka.ads.Utils,"ADS_LOADED",shaka.ads.Utils.ADS_LOADED);shaka.ads.Utils.AD_STARTED="ad-started";goog.exportProperty(shaka.ads.Utils,"AD_STARTED",shaka.ads.Utils.AD_STARTED);shaka.ads.Utils.AD_FIRST_QUARTILE="ad-first-quartile";goog.exportProperty(shaka.ads.Utils,"AD_FIRST_QUARTILE",shaka.ads.Utils.AD_FIRST_QUARTILE);shaka.ads.Utils.AD_MIDPOINT="ad-midpoint";
|
|
1525
1525
|
goog.exportProperty(shaka.ads.Utils,"AD_MIDPOINT",shaka.ads.Utils.AD_MIDPOINT);shaka.ads.Utils.AD_THIRD_QUARTILE="ad-third-quartile";goog.exportProperty(shaka.ads.Utils,"AD_THIRD_QUARTILE",shaka.ads.Utils.AD_THIRD_QUARTILE);shaka.ads.Utils.AD_COMPLETE="ad-complete";goog.exportProperty(shaka.ads.Utils,"AD_COMPLETE",shaka.ads.Utils.AD_COMPLETE);shaka.ads.Utils.AD_STOPPED="ad-stopped";goog.exportProperty(shaka.ads.Utils,"AD_STOPPED",shaka.ads.Utils.AD_STOPPED);shaka.ads.Utils.AD_SKIPPED="ad-skipped";
|
|
1526
1526
|
goog.exportProperty(shaka.ads.Utils,"AD_SKIPPED",shaka.ads.Utils.AD_SKIPPED);shaka.ads.Utils.AD_VOLUME_CHANGED="ad-volume-changed";goog.exportProperty(shaka.ads.Utils,"AD_VOLUME_CHANGED",shaka.ads.Utils.AD_VOLUME_CHANGED);shaka.ads.Utils.AD_MUTED="ad-muted";goog.exportProperty(shaka.ads.Utils,"AD_MUTED",shaka.ads.Utils.AD_MUTED);shaka.ads.Utils.AD_PAUSED="ad-paused";goog.exportProperty(shaka.ads.Utils,"AD_PAUSED",shaka.ads.Utils.AD_PAUSED);shaka.ads.Utils.AD_RESUMED="ad-resumed";
|
|
1527
1527
|
goog.exportProperty(shaka.ads.Utils,"AD_RESUMED",shaka.ads.Utils.AD_RESUMED);shaka.ads.Utils.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";goog.exportProperty(shaka.ads.Utils,"AD_SKIP_STATE_CHANGED",shaka.ads.Utils.AD_SKIP_STATE_CHANGED);shaka.ads.Utils.CUEPOINTS_CHANGED="ad-cue-points-changed";goog.exportProperty(shaka.ads.Utils,"CUEPOINTS_CHANGED",shaka.ads.Utils.CUEPOINTS_CHANGED);shaka.ads.Utils.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";
|
|
@@ -1552,7 +1552,7 @@ function(c){b(c,shaka.ads.Utils.ALL_ADS_COMPLETED)});this.eventManager_.listen(t
|
|
|
1552
1552
|
function(c){b(c,shaka.ads.Utils.AD_BREAK_READY)});this.eventManager_.listen(this.imaAdsManager_,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,shaka.ads.Utils.AD_INTERACTION)})};
|
|
1553
1553
|
shaka.ads.ClientSideAdManager.prototype.onAdStart_=function(a){goog.asserts.assert(this.imaAdsManager_,"Should have an ads manager at this point!");var b=a.getAd();if(b){this.ad_=new shaka.ads.ClientSideAd(b,this.imaAdsManager_,this.video_);if(a.type==google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED&&!this.config_.supportsMultipleMediaElements)this.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_CONTENT_PAUSE_REQUESTED));a=(new Map).set("ad",this.ad_).set("sdkAdObject",b).set("originalEvent",
|
|
1554
1554
|
a);this.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_STARTED,a));this.ad_.isLinear()&&(this.adContainer_.setAttribute("ad-active","true"),this.config_.customPlayheadTracker||this.video_.pause(),this.video_.muted?this.ad_.setInitialMuted(this.video_.volume):this.ad_.setVolume(this.video_.volume))}else shaka.log.alwaysWarn("The IMA SDK fired a "+a.type+" event with no associated ad. Unable to play ad!")};
|
|
1555
|
-
shaka.ads.ClientSideAdManager.prototype.onAdComplete_=function(a){if(a&&a.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!this.config_.supportsMultipleMediaElements)this.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_CONTENT_RESUME_REQUESTED));this.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_STOPPED,(new Map).set("originalEvent",a)));this.ad_&&this.ad_.isLinear()&&(this.adContainer_.removeAttribute("ad-active"),this.config_.customPlayheadTracker||this.video_.ended||this.video_.play())};shaka.ads.InterstitialAd=function(a,b,c,d,e){this.video_=a;this.isSkippable_=b;this.onSkip_=c;this.sequenceLength_=d;this.adPosition_=e};shaka.ads.InterstitialAd.prototype.needsSkipUI=function(){return!0};shaka.ads.InterstitialAd.prototype.getDuration=function(){var a=this.video_.duration;return isNaN(a)?-1:a};shaka.ads.InterstitialAd.prototype.getMinSuggestedDuration=function(){return this.getDuration()};
|
|
1555
|
+
shaka.ads.ClientSideAdManager.prototype.onAdComplete_=function(a){if(a&&a.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!this.config_.supportsMultipleMediaElements)this.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_CONTENT_RESUME_REQUESTED));this.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_STOPPED,(new Map).set("originalEvent",a)));this.ad_&&this.ad_.isLinear()&&(this.adContainer_.removeAttribute("ad-active"),this.config_.customPlayheadTracker||this.video_.ended||this.video_.play())};shaka.ads.InterstitialAd=function(a,b,c,d,e){this.video_=a;this.isSkippable_=b;this.onSkip_=c;this.sequenceLength_=d;this.adPosition_=e};shaka.ads.InterstitialAd.prototype.needsSkipUI=function(){return!0};shaka.ads.InterstitialAd.prototype.isClientRendering=function(){return!0};shaka.ads.InterstitialAd.prototype.getDuration=function(){var a=this.video_.duration;return isNaN(a)?-1:a};shaka.ads.InterstitialAd.prototype.getMinSuggestedDuration=function(){return this.getDuration()};
|
|
1556
1556
|
shaka.ads.InterstitialAd.prototype.getRemainingTime=function(){var a=this.video_.duration;return isNaN(a)?-1:a-this.video_.currentTime};shaka.ads.InterstitialAd.prototype.isPaused=function(){return this.video_.paused};shaka.ads.InterstitialAd.prototype.isSkippable=function(){return this.isSkippable_};shaka.ads.InterstitialAd.prototype.getTimeUntilSkippable=function(){return this.isSkippable_?0:Math.max(this.getRemainingTime(),0)};
|
|
1557
1557
|
shaka.ads.InterstitialAd.prototype.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};shaka.ads.InterstitialAd.prototype.skip=function(){this.onSkip_()};shaka.ads.InterstitialAd.prototype.pause=function(){return this.video_.pause()};shaka.ads.InterstitialAd.prototype.play=function(){return this.video_.play()};shaka.ads.InterstitialAd.prototype.getVolume=function(){return this.video_.volume};shaka.ads.InterstitialAd.prototype.setVolume=function(a){this.video_.volume=a};
|
|
1558
1558
|
shaka.ads.InterstitialAd.prototype.isMuted=function(){return this.video_.muted};shaka.ads.InterstitialAd.prototype.isLinear=function(){return!0};shaka.ads.InterstitialAd.prototype.resize=function(a,b){};shaka.ads.InterstitialAd.prototype.setMuted=function(a){this.video_.muted=a};shaka.ads.InterstitialAd.prototype.getSequenceLength=function(){return this.sequenceLength_};shaka.ads.InterstitialAd.prototype.getPositionInSequence=function(){return this.adPosition_};
|
|
@@ -1565,7 +1565,7 @@ goog.exportProperty(shaka.ads.InterstitialAd.prototype,"getSequenceLength",shaka
|
|
|
1565
1565
|
goog.exportProperty(shaka.ads.InterstitialAd.prototype,"isMuted",shaka.ads.InterstitialAd.prototype.isMuted);goog.exportProperty(shaka.ads.InterstitialAd.prototype,"setVolume",shaka.ads.InterstitialAd.prototype.setVolume);goog.exportProperty(shaka.ads.InterstitialAd.prototype,"getVolume",shaka.ads.InterstitialAd.prototype.getVolume);goog.exportProperty(shaka.ads.InterstitialAd.prototype,"play",shaka.ads.InterstitialAd.prototype.play);
|
|
1566
1566
|
goog.exportProperty(shaka.ads.InterstitialAd.prototype,"pause",shaka.ads.InterstitialAd.prototype.pause);goog.exportProperty(shaka.ads.InterstitialAd.prototype,"skip",shaka.ads.InterstitialAd.prototype.skip);goog.exportProperty(shaka.ads.InterstitialAd.prototype,"canSkipNow",shaka.ads.InterstitialAd.prototype.canSkipNow);goog.exportProperty(shaka.ads.InterstitialAd.prototype,"getTimeUntilSkippable",shaka.ads.InterstitialAd.prototype.getTimeUntilSkippable);
|
|
1567
1567
|
goog.exportProperty(shaka.ads.InterstitialAd.prototype,"isSkippable",shaka.ads.InterstitialAd.prototype.isSkippable);goog.exportProperty(shaka.ads.InterstitialAd.prototype,"isPaused",shaka.ads.InterstitialAd.prototype.isPaused);goog.exportProperty(shaka.ads.InterstitialAd.prototype,"getRemainingTime",shaka.ads.InterstitialAd.prototype.getRemainingTime);goog.exportProperty(shaka.ads.InterstitialAd.prototype,"getMinSuggestedDuration",shaka.ads.InterstitialAd.prototype.getMinSuggestedDuration);
|
|
1568
|
-
goog.exportProperty(shaka.ads.InterstitialAd.prototype,"getDuration",shaka.ads.InterstitialAd.prototype.getDuration);goog.exportProperty(shaka.ads.InterstitialAd.prototype,"needsSkipUI",shaka.ads.InterstitialAd.prototype.needsSkipUI);shaka.ads.InterstitialAdManager=function(a,b,c,d){var e=this;this.adContainer_=a;this.basePlayer_=b;this.baseVideo_=c;this.adVideo_=null;this.usingBaseVideo_=!0;this.video_=this.baseVideo_;this.onEvent_=d;this.interstitialIds_=new Set;this.interstitials_=new Set;this.preloadManagerInterstitials_=new Map;this.player_=new shaka.Player;this.updatePlayerConfig_();this.eventManager_=new shaka.util.EventManager;this.adEventManager_=new shaka.util.EventManager;this.playingAd_=!1;this.lastTime_=null;this.eventManager_.listen(this.baseVideo_,
|
|
1568
|
+
goog.exportProperty(shaka.ads.InterstitialAd.prototype,"getDuration",shaka.ads.InterstitialAd.prototype.getDuration);goog.exportProperty(shaka.ads.InterstitialAd.prototype,"isClientRendering",shaka.ads.InterstitialAd.prototype.isClientRendering);goog.exportProperty(shaka.ads.InterstitialAd.prototype,"needsSkipUI",shaka.ads.InterstitialAd.prototype.needsSkipUI);shaka.ads.InterstitialAdManager=function(a,b,c,d){var e=this;this.adContainer_=a;this.basePlayer_=b;this.baseVideo_=c;this.adVideo_=null;this.usingBaseVideo_=!0;this.video_=this.baseVideo_;this.onEvent_=d;this.interstitialIds_=new Set;this.interstitials_=new Set;this.preloadManagerInterstitials_=new Map;this.player_=new shaka.Player;this.updatePlayerConfig_();this.eventManager_=new shaka.util.EventManager;this.adEventManager_=new shaka.util.EventManager;this.playingAd_=!1;this.lastTime_=null;this.eventManager_.listen(this.baseVideo_,
|
|
1569
1569
|
"timeupdate",function(){if(!e.playingAd_){var f=null==e.lastTime_||0==e.lastTime_;e.lastTime_=e.baseVideo_.currentTime;(f=e.getCurrentInterstitial_(f))&&e.setupAd_(f,1,1,Date.now())}});this.pollTimer_=(new shaka.util.Timer(function(){var f,g,h,k,l,m,n,p,q,r;return $jscomp.asyncExecutePromiseGeneratorProgram(function(t){switch(t.nextAddress){case 1:if(!e.interstitials_.size||e.playingAd_||null==e.lastTime_){t.jumpTo(0);break}f=!1;g=Array.from(e.interstitials_);h=e.basePlayer_.seekRange();k=$jscomp.makeIterator(g);
|
|
1570
1570
|
l=k.next();case 3:if(l.done){t.jumpTo(5);break}m=l.value;n=m.endTime||m.startTime;if(!(1<=h.start-n)){p=m.startTime-e.lastTime_;0<p&&10>=p&&(e.preloadManagerInterstitials_.has(m)||e.preloadManagerInterstitials_.set(m,e.player_.preload(m.uri)));t.jumpTo(4);break}if(!e.preloadManagerInterstitials_.has(m)){t.jumpTo(7);break}return t.yield(e.preloadManagerInterstitials_.get(m),8);case 8:(q=t.yieldResult)&&q.destroy(),e.preloadManagerInterstitials_.delete(m);case 7:r=JSON.stringify(m),e.interstitialIds_.has(r)&&
|
|
1571
1571
|
e.interstitialIds_.delete(r),e.interstitials_.delete(m),f=!0;case 4:l=k.next();t.jumpTo(3);break;case 5:f&&e.cuepointsChanged_(),t.jumpToEnd()}})})).tickEvery(1)};
|
|
@@ -1595,7 +1595,7 @@ shaka.ads.InterstitialAdManager.prototype.cuepointsChanged_=function(){for(var a
|
|
|
1595
1595
|
f.start&&e.shakaCuePoint$jscomp$1.end==f.end}}(d))||a.push(d.shakaCuePoint$jscomp$1);this.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.CUEPOINTS_CHANGED,(new Map).set("cuepoints",a)))};
|
|
1596
1596
|
shaka.ads.InterstitialAdManager.prototype.updatePlayerConfig_=function(){goog.asserts.assert(this.player_,"Must have player");goog.asserts.assert(this.basePlayer_,"Must have base player");this.player_.configure(this.basePlayer_.getNonDefaultConfiguration());var a=this.player_.getNetworkingEngine();goog.asserts.assert(a,"Need networking engine");a.clearAllRequestFilters();a.clearAllResponseFilters();this.basePlayer_.getNetworkingEngine().copyFiltersInto(a)};shaka.util.TextParser=function(a){this.data_=a||"";this.position_=0};shaka.util.TextParser.prototype.atEnd=function(){return this.position_==this.data_.length};shaka.util.TextParser.prototype.readLine=function(){return this.readRegexReturnCapture_(/(.*?)(\n|$)/gm,1)};shaka.util.TextParser.prototype.readWord=function(){return this.readRegexReturnCapture_(/[^ \t\n]*/gm,0)};shaka.util.TextParser.prototype.skipWhitespace=function(){this.readRegex(/[ \t]+/gm)};
|
|
1597
1597
|
shaka.util.TextParser.prototype.readRegex=function(a){a=this.indexOf_(a);if(this.atEnd()||null==a||a.position!=this.position_)return null;this.position_+=a.length;return a.results};shaka.util.TextParser.prototype.readRegexReturnCapture_=function(a,b){return this.atEnd()?null:(a=this.readRegex(a))?a[b]:null};
|
|
1598
|
-
shaka.util.TextParser.prototype.indexOf_=function(a){goog.asserts.assert(a.global,"global flag should be set");a.lastIndex=this.position_;a=a.exec(this.data_);return null==a?null:{position:a.index,length:a[0].length,results:a}};shaka.ads.MediaTailorAd=function(a,b,c,d,e){this.ad_=a;this.skipOffset_=this.parseTime_(this.ad_.skipOffset);this.video_=e;this.adPosition_=b;this.totalAds_=c;this.isLinear_=d;this.isSkipped_=!1};shaka.ads.MediaTailorAd.prototype.needsSkipUI=function(){return!0};shaka.ads.MediaTailorAd.prototype.getDuration=function(){return this.ad_.durationInSeconds};shaka.ads.MediaTailorAd.prototype.getMinSuggestedDuration=function(){return this.getDuration()};
|
|
1598
|
+
shaka.util.TextParser.prototype.indexOf_=function(a){goog.asserts.assert(a.global,"global flag should be set");a.lastIndex=this.position_;a=a.exec(this.data_);return null==a?null:{position:a.index,length:a[0].length,results:a}};shaka.ads.MediaTailorAd=function(a,b,c,d,e){this.ad_=a;this.skipOffset_=this.parseTime_(this.ad_.skipOffset);this.video_=e;this.adPosition_=b;this.totalAds_=c;this.isLinear_=d;this.isSkipped_=!1};shaka.ads.MediaTailorAd.prototype.needsSkipUI=function(){return!0};shaka.ads.MediaTailorAd.prototype.isClientRendering=function(){return!1};shaka.ads.MediaTailorAd.prototype.getDuration=function(){return this.ad_.durationInSeconds};shaka.ads.MediaTailorAd.prototype.getMinSuggestedDuration=function(){return this.getDuration()};
|
|
1599
1599
|
shaka.ads.MediaTailorAd.prototype.getRemainingTime=function(){return this.ad_.startTimeInSeconds+this.ad_.durationInSeconds-this.video_.currentTime};shaka.ads.MediaTailorAd.prototype.isPaused=function(){return this.video_.paused};shaka.ads.MediaTailorAd.prototype.isSkippable=function(){return"number"==typeof this.skipOffset_?!0:!1};
|
|
1600
1600
|
shaka.ads.MediaTailorAd.prototype.getTimeUntilSkippable=function(){if("number"!=typeof this.skipOffset_)return this.getRemainingTime();var a=this.getRemainingTime()+this.skipOffset_-this.getDuration();return Math.max(a,0)};shaka.ads.MediaTailorAd.prototype.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};shaka.ads.MediaTailorAd.prototype.skip=function(){this.isSkipped_=!0;this.video_.currentTime+=this.getRemainingTime()};shaka.ads.MediaTailorAd.prototype.pause=function(){return this.video_.pause()};
|
|
1601
1601
|
shaka.ads.MediaTailorAd.prototype.play=function(){return this.video_.play()};shaka.ads.MediaTailorAd.prototype.getVolume=function(){return this.video_.volume};shaka.ads.MediaTailorAd.prototype.setVolume=function(a){this.video_.volume=a};shaka.ads.MediaTailorAd.prototype.isMuted=function(){return this.video_.muted};shaka.ads.MediaTailorAd.prototype.isLinear=function(){return this.isLinear_};shaka.ads.MediaTailorAd.prototype.resize=function(a,b){};
|
|
@@ -1610,7 +1610,7 @@ goog.exportProperty(shaka.ads.MediaTailorAd.prototype,"getSequenceLength",shaka.
|
|
|
1610
1610
|
goog.exportProperty(shaka.ads.MediaTailorAd.prototype,"isMuted",shaka.ads.MediaTailorAd.prototype.isMuted);goog.exportProperty(shaka.ads.MediaTailorAd.prototype,"setVolume",shaka.ads.MediaTailorAd.prototype.setVolume);goog.exportProperty(shaka.ads.MediaTailorAd.prototype,"getVolume",shaka.ads.MediaTailorAd.prototype.getVolume);goog.exportProperty(shaka.ads.MediaTailorAd.prototype,"play",shaka.ads.MediaTailorAd.prototype.play);goog.exportProperty(shaka.ads.MediaTailorAd.prototype,"pause",shaka.ads.MediaTailorAd.prototype.pause);
|
|
1611
1611
|
goog.exportProperty(shaka.ads.MediaTailorAd.prototype,"skip",shaka.ads.MediaTailorAd.prototype.skip);goog.exportProperty(shaka.ads.MediaTailorAd.prototype,"canSkipNow",shaka.ads.MediaTailorAd.prototype.canSkipNow);goog.exportProperty(shaka.ads.MediaTailorAd.prototype,"getTimeUntilSkippable",shaka.ads.MediaTailorAd.prototype.getTimeUntilSkippable);goog.exportProperty(shaka.ads.MediaTailorAd.prototype,"isSkippable",shaka.ads.MediaTailorAd.prototype.isSkippable);
|
|
1612
1612
|
goog.exportProperty(shaka.ads.MediaTailorAd.prototype,"isPaused",shaka.ads.MediaTailorAd.prototype.isPaused);goog.exportProperty(shaka.ads.MediaTailorAd.prototype,"getRemainingTime",shaka.ads.MediaTailorAd.prototype.getRemainingTime);goog.exportProperty(shaka.ads.MediaTailorAd.prototype,"getMinSuggestedDuration",shaka.ads.MediaTailorAd.prototype.getMinSuggestedDuration);goog.exportProperty(shaka.ads.MediaTailorAd.prototype,"getDuration",shaka.ads.MediaTailorAd.prototype.getDuration);
|
|
1613
|
-
goog.exportProperty(shaka.ads.MediaTailorAd.prototype,"needsSkipUI",shaka.ads.MediaTailorAd.prototype.needsSkipUI);shaka.ads.MediaTailorAd.timeFormat_=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;shaka.ads.MediaTailorAdManager=function(a,b,c,d){this.adContainer_=a;this.networkingEngine_=b;this.video_=c;this.streamPromise_=null;this.streamRequestStartTime_=NaN;this.onEvent_=d;this.isLive_=!1;this.snapForwardTime_=null;this.adBreaks_=[];this.playedAds_=[];this.mediaTailorAdBreak_=this.mediaTailorAd_=this.ad_=null;this.staticResources_=new Map;this.adListeners_=[];this.eventsSent=[];this.trackingUrl_="";this.firstTrackingRequest_=!0;this.backupUrl_="";this.currentCuePoints_=[];this.eventManager_=
|
|
1613
|
+
goog.exportProperty(shaka.ads.MediaTailorAd.prototype,"isClientRendering",shaka.ads.MediaTailorAd.prototype.isClientRendering);goog.exportProperty(shaka.ads.MediaTailorAd.prototype,"needsSkipUI",shaka.ads.MediaTailorAd.prototype.needsSkipUI);shaka.ads.MediaTailorAd.timeFormat_=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;shaka.ads.MediaTailorAdManager=function(a,b,c,d){this.adContainer_=a;this.networkingEngine_=b;this.video_=c;this.streamPromise_=null;this.streamRequestStartTime_=NaN;this.onEvent_=d;this.isLive_=!1;this.snapForwardTime_=null;this.adBreaks_=[];this.playedAds_=[];this.mediaTailorAdBreak_=this.mediaTailorAd_=this.ad_=null;this.staticResources_=new Map;this.adListeners_=[];this.eventsSent=[];this.trackingUrl_="";this.firstTrackingRequest_=!0;this.backupUrl_="";this.currentCuePoints_=[];this.eventManager_=
|
|
1614
1614
|
new shaka.util.EventManager};shaka.ads.MediaTailorAdManager.prototype.streamRequest=function(a,b,c){if(this.streamPromise_)return Promise.reject(new shaka.util.Error(shaka.util.Error.Severity.RECOVERABLE,shaka.util.Error.Category.ADS,shaka.util.Error.Code.CURRENT_DAI_REQUEST_NOT_FINISHED));this.streamPromise_=new shaka.util.PublicPromise;this.requestSessionInfo_(a,b);this.backupUrl_=c||"";this.streamRequestStartTime_=Date.now()/1E3;return this.streamPromise_};
|
|
1615
1615
|
shaka.ads.MediaTailorAdManager.prototype.addTrackingUrl=function(a){this.trackingUrl_=a;this.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.ADS_LOADED,(new Map).set("loadTime",0)))};
|
|
1616
1616
|
shaka.ads.MediaTailorAdManager.prototype.stop=function(){for(var a=$jscomp.makeIterator(this.adListeners_),b=a.next();!b.done;b=a.next())b=b.value,this.eventManager_.unlisten(b.target,b.type,b.listener);this.onEnded_();this.adListeners_=[];this.eventsSent=[];this.trackingUrl_="";this.firstTrackingRequest_=!0;this.backupUrl_="";this.snapForwardTime_=null;this.adBreaks_=[];this.playedAds_=[];this.staticResources_.clear()};
|
|
@@ -1645,7 +1645,7 @@ shaka.ads.MediaTailorAdManager.prototype.sendTrackingEvent_=function(a){var b=th
|
|
|
1645
1645
|
break;case shaka.ads.MediaTailorAdManager.RESUME_:this.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_RESUMED));break;case shaka.ads.MediaTailorAdManager.PAUSE_:this.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_PAUSED));break;case shaka.ads.MediaTailorAdManager.FIRSTQUARTILE_:this.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_FIRST_QUARTILE));break;case shaka.ads.MediaTailorAdManager.MIDPOINT_:this.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_MIDPOINT));break;case shaka.ads.MediaTailorAdManager.THIRDQUARTILE_:this.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_THIRD_QUARTILE));
|
|
1646
1646
|
break;case shaka.ads.MediaTailorAdManager.COMPLETE_:this.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_COMPLETE));this.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_STOPPED));break;case shaka.ads.MediaTailorAdManager.SKIPPED_:this.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_SKIPPED));this.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_STOPPED));break;case shaka.ads.MediaTailorAdManager.BREAKSTART_:this.adContainer_.setAttribute("ad-active","true");break;case shaka.ads.MediaTailorAdManager.BREAKEND_:this.adContainer_.removeAttribute("ad-active");
|
|
1647
1647
|
break;case shaka.ads.MediaTailorAdManager.SKIP_STATE_CHANGED_:this.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_SKIP_STATE_CHANGED))}};shaka.ads.MediaTailorAdManager.IMPRESSION_="impression";shaka.ads.MediaTailorAdManager.START_="start";shaka.ads.MediaTailorAdManager.MUTE_="mute";shaka.ads.MediaTailorAdManager.UNMUTE_="unmute";shaka.ads.MediaTailorAdManager.RESUME_="resume";shaka.ads.MediaTailorAdManager.PAUSE_="pause";shaka.ads.MediaTailorAdManager.FIRSTQUARTILE_="firstQuartile";
|
|
1648
|
-
shaka.ads.MediaTailorAdManager.MIDPOINT_="midpoint";shaka.ads.MediaTailorAdManager.THIRDQUARTILE_="thirdQuartile";shaka.ads.MediaTailorAdManager.COMPLETE_="complete";shaka.ads.MediaTailorAdManager.SKIPPED_="skip";shaka.ads.MediaTailorAdManager.BREAKSTART_="breakStart";shaka.ads.MediaTailorAdManager.BREAKEND_="breakEnd";shaka.ads.MediaTailorAdManager.SKIP_STATE_CHANGED_="skipStateChanged";shaka.ads.ServerSideAd=function(a,b){this.ad_=a;this.adProgressData_=null;this.video_=b};shaka.ads.ServerSideAd.prototype.setProgressData=function(a){this.adProgressData_=a};shaka.ads.ServerSideAd.prototype.needsSkipUI=function(){return!0};shaka.ads.ServerSideAd.prototype.getDuration=function(){return this.adProgressData_?this.adProgressData_.duration:-1};shaka.ads.ServerSideAd.prototype.getMinSuggestedDuration=function(){return this.getDuration()};
|
|
1648
|
+
shaka.ads.MediaTailorAdManager.MIDPOINT_="midpoint";shaka.ads.MediaTailorAdManager.THIRDQUARTILE_="thirdQuartile";shaka.ads.MediaTailorAdManager.COMPLETE_="complete";shaka.ads.MediaTailorAdManager.SKIPPED_="skip";shaka.ads.MediaTailorAdManager.BREAKSTART_="breakStart";shaka.ads.MediaTailorAdManager.BREAKEND_="breakEnd";shaka.ads.MediaTailorAdManager.SKIP_STATE_CHANGED_="skipStateChanged";shaka.ads.ServerSideAd=function(a,b){this.ad_=a;this.adProgressData_=null;this.video_=b};shaka.ads.ServerSideAd.prototype.setProgressData=function(a){this.adProgressData_=a};shaka.ads.ServerSideAd.prototype.needsSkipUI=function(){return!0};shaka.ads.ServerSideAd.prototype.isClientRendering=function(){return!1};shaka.ads.ServerSideAd.prototype.getDuration=function(){return this.adProgressData_?this.adProgressData_.duration:-1};shaka.ads.ServerSideAd.prototype.getMinSuggestedDuration=function(){return this.getDuration()};
|
|
1649
1649
|
shaka.ads.ServerSideAd.prototype.getRemainingTime=function(){return this.adProgressData_?this.adProgressData_.duration-this.adProgressData_.currentTime:-1};shaka.ads.ServerSideAd.prototype.isPaused=function(){return this.video_.paused};shaka.ads.ServerSideAd.prototype.isSkippable=function(){return this.ad_.isSkippable()};shaka.ads.ServerSideAd.prototype.getTimeUntilSkippable=function(){var a=this.ad_.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
|
|
1650
1650
|
shaka.ads.ServerSideAd.prototype.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};shaka.ads.ServerSideAd.prototype.skip=function(){this.video_.currentTime+=this.getRemainingTime()};shaka.ads.ServerSideAd.prototype.pause=function(){return this.video_.pause()};shaka.ads.ServerSideAd.prototype.play=function(){return this.video_.play()};shaka.ads.ServerSideAd.prototype.getVolume=function(){return this.video_.volume};
|
|
1651
1651
|
shaka.ads.ServerSideAd.prototype.setVolume=function(a){this.video_.volume=a};shaka.ads.ServerSideAd.prototype.isMuted=function(){return this.video_.muted};shaka.ads.ServerSideAd.prototype.isLinear=function(){return!0};shaka.ads.ServerSideAd.prototype.resize=function(a,b){};shaka.ads.ServerSideAd.prototype.setMuted=function(a){this.video_.muted=a};shaka.ads.ServerSideAd.prototype.getSequenceLength=function(){var a=this.ad_.getAdPodInfo();return null==a?1:a.getTotalAds()};
|
|
@@ -1659,7 +1659,7 @@ goog.exportProperty(shaka.ads.ServerSideAd.prototype,"getSequenceLength",shaka.a
|
|
|
1659
1659
|
goog.exportProperty(shaka.ads.ServerSideAd.prototype,"isMuted",shaka.ads.ServerSideAd.prototype.isMuted);goog.exportProperty(shaka.ads.ServerSideAd.prototype,"setVolume",shaka.ads.ServerSideAd.prototype.setVolume);goog.exportProperty(shaka.ads.ServerSideAd.prototype,"getVolume",shaka.ads.ServerSideAd.prototype.getVolume);goog.exportProperty(shaka.ads.ServerSideAd.prototype,"play",shaka.ads.ServerSideAd.prototype.play);goog.exportProperty(shaka.ads.ServerSideAd.prototype,"pause",shaka.ads.ServerSideAd.prototype.pause);
|
|
1660
1660
|
goog.exportProperty(shaka.ads.ServerSideAd.prototype,"skip",shaka.ads.ServerSideAd.prototype.skip);goog.exportProperty(shaka.ads.ServerSideAd.prototype,"canSkipNow",shaka.ads.ServerSideAd.prototype.canSkipNow);goog.exportProperty(shaka.ads.ServerSideAd.prototype,"getTimeUntilSkippable",shaka.ads.ServerSideAd.prototype.getTimeUntilSkippable);goog.exportProperty(shaka.ads.ServerSideAd.prototype,"isSkippable",shaka.ads.ServerSideAd.prototype.isSkippable);
|
|
1661
1661
|
goog.exportProperty(shaka.ads.ServerSideAd.prototype,"isPaused",shaka.ads.ServerSideAd.prototype.isPaused);goog.exportProperty(shaka.ads.ServerSideAd.prototype,"getRemainingTime",shaka.ads.ServerSideAd.prototype.getRemainingTime);goog.exportProperty(shaka.ads.ServerSideAd.prototype,"getMinSuggestedDuration",shaka.ads.ServerSideAd.prototype.getMinSuggestedDuration);goog.exportProperty(shaka.ads.ServerSideAd.prototype,"getDuration",shaka.ads.ServerSideAd.prototype.getDuration);
|
|
1662
|
-
goog.exportProperty(shaka.ads.ServerSideAd.prototype,"needsSkipUI",shaka.ads.ServerSideAd.prototype.needsSkipUI);shaka.ads.ServerSideAdManager=function(a,b,c,d){var e=this;this.adContainer_=a;this.video_=b;this.streamPromise_=this.config_=null;this.streamRequestStartTime_=NaN;this.onEvent_=d;this.isLiveContent_=!1;this.adProgressData_=this.ad_=this.snapForwardTime_=null;this.backupUrl_="";this.currentCuePoints_=[];this.eventManager_=new shaka.util.EventManager;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.streamManager_=new google.ima.dai.api.StreamManager(this.video_,this.adContainer_,a);this.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.IMA_STREAM_MANAGER_LOADED,
|
|
1662
|
+
goog.exportProperty(shaka.ads.ServerSideAd.prototype,"isClientRendering",shaka.ads.ServerSideAd.prototype.isClientRendering);goog.exportProperty(shaka.ads.ServerSideAd.prototype,"needsSkipUI",shaka.ads.ServerSideAd.prototype.needsSkipUI);shaka.ads.ServerSideAdManager=function(a,b,c,d){var e=this;this.adContainer_=a;this.video_=b;this.streamPromise_=this.config_=null;this.streamRequestStartTime_=NaN;this.onEvent_=d;this.isLiveContent_=!1;this.adProgressData_=this.ad_=this.snapForwardTime_=null;this.backupUrl_="";this.currentCuePoints_=[];this.eventManager_=new shaka.util.EventManager;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.streamManager_=new google.ima.dai.api.StreamManager(this.video_,this.adContainer_,a);this.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.IMA_STREAM_MANAGER_LOADED,
|
|
1663
1663
|
(new Map).set("imaStreamManager",this.streamManager_)));this.eventManager_.listen(this.streamManager_,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){shaka.log.info("Ad SS Loaded");e.onLoaded_(f)});this.eventManager_.listen(this.streamManager_,google.ima.dai.api.StreamEvent.Type.ERROR,function(){shaka.log.info("Ad SS Error");e.onError_()});this.eventManager_.listen(this.streamManager_,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){shaka.log.info("Ad Break Started")});this.eventManager_.listen(this.streamManager_,
|
|
1664
1664
|
google.ima.dai.api.StreamEvent.Type.STARTED,function(f){shaka.log.info("Ad Started");e.onAdStart_(f)});this.eventManager_.listen(this.streamManager_,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){shaka.log.info("Ad Break Ended");e.onAdBreakEnded_()});this.eventManager_.listen(this.streamManager_,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.onAdProgress_(f)});this.eventManager_.listen(this.streamManager_,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){shaka.log.info("Ad event: First Quartile");
|
|
1665
1665
|
e.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_FIRST_QUARTILE))});this.eventManager_.listen(this.streamManager_,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){shaka.log.info("Ad event: Midpoint");e.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_MIDPOINT))});this.eventManager_.listen(this.streamManager_,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){shaka.log.info("Ad event: Third Quartile");e.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_THIRD_QUARTILE))});
|
|
@@ -2009,7 +2009,7 @@ shaka.dash.TimelineSegmentIndex.prototype.get=function(a){var b=this;a-=this.num
|
|
|
2009
2009
|
this.templateInfo_.codecs,l=this.templateInfo_.mimeType,m=[],n=(d.end-d.start)/d.partialSegments,p={},q=0;q<d.partialSegments;p={uris$jscomp$13:void 0,subNumber$jscomp$1:void 0},q++){var r=d.start+n*q,t=r+n;p.subNumber$jscomp$1=q+1;p.uris$jscomp$13=null;p=function(u){return function(){if(!b.templateInfo_)return[];null==u.uris$jscomp$13&&(u.uris$jscomp$13=shaka.dash.TimelineSegmentIndex.createUris_(b.templateInfo_.mediaTemplate,b.representationId_,e,b.bandwidth_,f,u.subNumber$jscomp$1,b.getBaseUris_));
|
|
2010
2010
|
return u.uris$jscomp$13}}(p);r=new shaka.media.SegmentReference(this.periodStart_+r,this.periodStart_+t,p,0,null,this.initSegmentReference_,c,this.periodStart_,this.periodEnd_,[],"",null,null,shaka.media.SegmentReference.Status.AVAILABLE,this.aesKey_);r.codecs=k;r.mimeType=l;0==this.segmentSequenceCadence_?0<q&&r.markAsNonIndependent():0!=q%this.segmentSequenceCadence_&&r.markAsNonIndependent();m.push(r)}c=new shaka.media.SegmentReference(this.periodStart_+d.start,h,function(){return 0<d.partialSegments||
|
|
2011
2011
|
!b.templateInfo_?[]:shaka.dash.TimelineSegmentIndex.createUris_(b.templateInfo_.mediaTemplate,b.representationId_,e,b.bandwidth_,f,null,b.getBaseUris_)},0,null,this.initSegmentReference_,c,this.periodStart_,this.periodEnd_,m,"",null,null,shaka.media.SegmentReference.Status.AVAILABLE,this.aesKey_,0<d.partialSegments);c.codecs=k;c.mimeType=l;c.trueEndTime=g;this.references[a]=c}return c};
|
|
2012
|
-
shaka.dash.TimelineSegmentIndex.createUris_=function(a,b,c,d,e,f,g){a=shaka.dash.MpdUtils.fillUriTemplate(a,b,c,f,d||null,e);return shaka.util.ManifestParserUtils.resolveUris(g(),[a]).map(function(h){return h.toString()})};shaka.util.ContentSteeringManager=function(a){this.config_=null;this.playerInterface_=a;this.operationManager_=new shaka.util.OperationManager;this.baseUris_=[];this.defaultPathwayId_=null;this.pathwayPriority_=[];this.lastPathwayUsed_=null;this.pathwayClones_=[];this.lastTTL_=300;this.locations_=new Map;this.bannedLocations_=new Map;this.updateTimer_=null;this.manifestType_=shaka.media.ManifestParser.UNKNOWN};shaka.util.ContentSteeringManager.prototype.configure=function(a){this.config_=a};
|
|
2012
|
+
shaka.dash.TimelineSegmentIndex.prototype.forEachTopLevelReference=function(a){this.fitTimeline();for(var b=0;b<this.getNumReferences();b++){var c=this.get(b+this.numEvicted_);c&&a(c)}};shaka.dash.TimelineSegmentIndex.createUris_=function(a,b,c,d,e,f,g){a=shaka.dash.MpdUtils.fillUriTemplate(a,b,c,f,d||null,e);return shaka.util.ManifestParserUtils.resolveUris(g(),[a]).map(function(h){return h.toString()})};shaka.util.ContentSteeringManager=function(a){this.config_=null;this.playerInterface_=a;this.operationManager_=new shaka.util.OperationManager;this.baseUris_=[];this.defaultPathwayId_=null;this.pathwayPriority_=[];this.lastPathwayUsed_=null;this.pathwayClones_=[];this.lastTTL_=300;this.locations_=new Map;this.bannedLocations_=new Map;this.updateTimer_=null;this.manifestType_=shaka.media.ManifestParser.UNKNOWN};shaka.util.ContentSteeringManager.prototype.configure=function(a){this.config_=a};
|
|
2013
2013
|
shaka.util.ContentSteeringManager.prototype.destroy=function(){this.playerInterface_=this.config_=null;this.baseUris_=[];this.defaultPathwayId_=null;this.pathwayPriority_=[];this.pathwayClones_=[];this.locations_.clear();null!=this.updateTimer_&&(this.updateTimer_.stop(),this.updateTimer_=null);return this.operationManager_.destroy()};shaka.util.ContentSteeringManager.prototype.setManifestType=function(a){this.manifestType_=a};
|
|
2014
2014
|
shaka.util.ContentSteeringManager.prototype.setBaseUris=function(a){this.baseUris_=a};shaka.util.ContentSteeringManager.prototype.setDefaultPathwayId=function(a){this.defaultPathwayId_=a};
|
|
2015
2015
|
shaka.util.ContentSteeringManager.prototype.requestInfo=function(a){var b=this,c,d,e,f,g,h,k,l;return $jscomp.asyncExecutePromiseGeneratorProgram(function(m){if(1==m.nextAddress)return c=shaka.util.ManifestParserUtils.resolveUris(b.baseUris_,[b.addQueryParams_(a)]),d=shaka.net.NetworkingEngine.RequestType.CONTENT_STEERING,e=shaka.net.NetworkingEngine.makeRequest(c,b.config_.retryParameters),f=b.playerInterface_.networkingEngine.request(d,e),b.operationManager_.manage(f),m.setCatchFinallyBlocks(2),
|
|
@@ -2337,8 +2337,8 @@ g.next())if(q=q.value,!l.includes(q.name)){var r=e.variableSubstitution(q.value,
|
|
|
2337
2337
|
shaka.hls.HlsParser.prototype.createSegments_=function(a,b,c,d,e){var f=a.segments;goog.asserts.assert(f.length,"Playlist should have segments!");var g=void 0,h=shaka.hls.Utils.getFirstTagWithNameAsNumber(a.tags,"EXT-X-DISCONTINUITY-SEQUENCE",0),k=shaka.hls.Utils.getFirstTagWithNameAsNumber(a.tags,"EXT-X-MEDIA-SEQUENCE",0),l=shaka.hls.Utils.getFirstTagWithName(a.tags,"EXT-X-SKIP"),m=l?Number(l.getAttributeValue("SKIPPED-SEGMENTS")):0,n=k+m,p=0;this.isLive_()&&b.has(n)&&(p=b.get(n));0===p&&this.presentationType_==
|
|
2338
2338
|
shaka.hls.HlsParser.PresentationType_.LIVE&&0<b.size&&!b.has(n)&&(p=this.presentationTimeline_.getSegmentAvailabilityStart());var q=[],r=null;l=[];for(var t=0;t<f.length;t++){var u=f[t],w=0==t?p:r.endTime;n=k+m+t;shaka.hls.Utils.getFirstTagWithName(u.tags,"EXT-X-DISCONTINUITY")&&h++;var x=$jscomp.makeIterator(u.tags);for(var y=x.next();!y.done;y=x.next())y=y.value,"EXT-X-KEY"==y.name&&(g=this.isAesMethod_(y.getRequiredAttrValue("METHOD"))?this.parseAESDrmTag_(y,a,d,c):void 0);b.set(n,w);x=this.getInitSegmentReference_(a,
|
|
2339
2339
|
u.tags,d,c);!this.lowLatencyMode_&&this.playerInterface_.isAutoLowLatencyMode()&&(this.playerInterface_.enableLowLatencyMode(),this.lowLatencyMode_=this.playerInterface_.isLowLatencyMode());if(w=this.createSegmentReference_(x,r,u,w,c,a,e,d,g))(r=shaka.hls.Utils.getFirstTagWithNameAsNumber(u.tags,"EXT-X-BITRATE"))?l.push({bitrate:r,duration:w.endTime-w.startTime}):l.length&&(r=l.pop(),r.duration+=w.endTime-w.startTime,l.push(r)),r=w,w.discontinuitySequence=h,this.ignoreManifestProgramDateTimeFor_(e)&&
|
|
2340
|
-
null!=this.minSequenceNumber_&&n<this.minSequenceNumber_||q.push(w)}a=void 0;l.length&&(a=l.reduce(function(v,A){return v+A.duration},0),a=Math.round(l.reduce(function(v,A){return v+A.bitrate*A.duration},0)/a*1E3));if(l=q.some(function(v){return null!=v.syncTime}))for(b={},c=0;c<q.length;b={forwardI:void 0,forwardAdd:void 0,backwardI:void 0,reference$jscomp$
|
|
2341
|
-
q[v.forwardI];if(A){if(null!=A.syncTime)return A.syncTime+v.forwardAdd;v.forwardAdd-=A.endTime-A.startTime;v.forwardI+=1}return null}}(b),b.backwardAdd=0,b.backwardI=c,f=function(v){return function(){var A=q[v.backwardI];if(A){A!=v.reference$jscomp$
|
|
2340
|
+
null!=this.minSequenceNumber_&&n<this.minSequenceNumber_||q.push(w)}a=void 0;l.length&&(a=l.reduce(function(v,A){return v+A.duration},0),a=Math.round(l.reduce(function(v,A){return v+A.bitrate*A.duration},0)/a*1E3));if(l=q.some(function(v){return null!=v.syncTime}))for(b={},c=0;c<q.length;b={forwardI:void 0,forwardAdd:void 0,backwardI:void 0,reference$jscomp$46:void 0,backwardAdd:void 0},c++)if(b.reference$jscomp$46=q[c],null==b.reference$jscomp$46.syncTime)for(b.forwardAdd=0,b.forwardI=c,d=function(v){return function(){var A=
|
|
2341
|
+
q[v.forwardI];if(A){if(null!=A.syncTime)return A.syncTime+v.forwardAdd;v.forwardAdd-=A.endTime-A.startTime;v.forwardI+=1}return null}}(b),b.backwardAdd=0,b.backwardI=c,f=function(v){return function(){var A=q[v.backwardI];if(A){A!=v.reference$jscomp$46&&(v.backwardAdd+=A.endTime-A.startTime);if(null!=A.syncTime)return A.syncTime+v.backwardAdd;--v.backwardI}return null}}(b);null==b.reference$jscomp$46.syncTime;)b.reference$jscomp$46.syncTime=f(),null==b.reference$jscomp$46.syncTime&&(b.reference$jscomp$46.syncTime=
|
|
2342
2342
|
d());if(l)for(b=$jscomp.makeIterator(q),c=b.next();!c.done;c=b.next())for(d=c.value,c=d.syncTime,d=$jscomp.makeIterator(d.partialReferences),f=d.next();!f.done;f=d.next())f=f.value,f.syncTime=c,c+=f.endTime-f.startTime;b=this.lowestSyncTime_;if(l&&Infinity!=b&&!this.ignoreManifestProgramDateTimeFor_(e))for(e=$jscomp.makeIterator(q),l=e.next();!l.done;l=e.next())l.value.syncAgainst(b);return{segments:q,bandwidth:a}};
|
|
2343
2343
|
shaka.hls.HlsParser.prototype.guessMimeTypeBeforeLoading_=function(a,b){if(a==shaka.util.ManifestParserUtils.ContentType.TEXT){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return a!=shaka.util.ManifestParserUtils.ContentType.IMAGE||b&&"jpeg"!=b?a==shaka.util.ManifestParserUtils.ContentType.AUDIO&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"};
|
|
2344
2344
|
shaka.hls.HlsParser.prototype.guessMimeTypeFallback_=function(a){return a==shaka.util.ManifestParserUtils.ContentType.TEXT?"text/vtt":shaka.hls.HlsParser.EXTENSION_MAP_BY_CONTENT_TYPE_[a].mp4};shaka.hls.HlsParser.prototype.getAvailableSegment_=function(a){goog.asserts.assert(a.length,"Should have segments!");for(var b=this.isLive_()?Math.trunc((a.length-1)/2):0,c=a[b];c.getStatus()==shaka.media.SegmentReference.Status.MISSING&&b+1<a.length;)b++,c=a[b];return{segment:c,segmentIndex:b}};
|