shaka-player 4.10.8 → 4.10.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/locales.js +37 -37
- package/dist/shaka-player.compiled.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 +40 -37
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.externs.js +16 -0
- package/dist/shaka-player.compiled.js +146 -142
- package/dist/shaka-player.compiled.map +3 -3
- 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 +45 -42
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.externs.js +16 -0
- package/dist/shaka-player.ui.js +147 -143
- package/dist/shaka-player.ui.map +3 -3
- package/externs/shaka/ads.js +5 -0
- package/lib/ads/client_side_ad.js +8 -0
- package/lib/ads/interstitial_ad.js +7 -0
- package/lib/ads/interstitial_ad_manager.js +8 -6
- package/lib/ads/media_tailor_ad.js +7 -0
- package/lib/ads/server_side_ad.js +7 -0
- package/lib/media/streaming_engine.js +7 -6
- package/lib/player.js +2 -2
- package/lib/text/ui_text_displayer.js +37 -10
- package/package.json +1 -1
- package/ui/seek_bar.js +1 -1
- package/ui/skip_ad_button.js +1 -1
package/dist/locales.js
CHANGED
|
@@ -771,50 +771,50 @@ shaka.ui.Locales.addTo = function(localization) {
|
|
|
771
771
|
* @const
|
|
772
772
|
*/
|
|
773
773
|
shaka.ui.Locales.Ids = {
|
|
774
|
-
MORE_SETTINGS: 'MORE_SETTINGS',
|
|
775
|
-
PAUSE: 'PAUSE',
|
|
776
|
-
QUALITY: 'QUALITY',
|
|
777
|
-
NOT_APPLICABLE: 'NOT_APPLICABLE',
|
|
778
|
-
RECENTER_VR: 'RECENTER_VR',
|
|
779
|
-
AD_STATISTICS: 'AD_STATISTICS',
|
|
780
774
|
UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
|
|
781
|
-
|
|
775
|
+
MORE_SETTINGS: 'MORE_SETTINGS',
|
|
782
776
|
SURROUND: 'SURROUND',
|
|
783
|
-
|
|
784
|
-
VOLUME: 'VOLUME',
|
|
785
|
-
CAPTIONS: 'CAPTIONS',
|
|
786
|
-
EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
|
|
787
|
-
AD_TIME: 'AD_TIME',
|
|
788
|
-
AUTO_QUALITY: 'AUTO_QUALITY',
|
|
789
|
-
REPLAY: 'REPLAY',
|
|
790
|
-
PLAYBACK_RATE: 'PLAYBACK_RATE',
|
|
791
|
-
ON: 'ON',
|
|
792
|
-
EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
|
|
793
|
-
DOWNLOAD_VIDEO_FRAME: 'DOWNLOAD_VIDEO_FRAME',
|
|
794
|
-
REWIND: 'REWIND',
|
|
795
|
-
UNMUTE: 'UNMUTE',
|
|
796
|
-
SKIP_AD: 'SKIP_AD',
|
|
797
|
-
FULL_SCREEN: 'FULL_SCREEN',
|
|
798
|
-
MUTE: 'MUTE',
|
|
799
|
-
PLAY: 'PLAY',
|
|
800
|
-
FAST_FORWARD: 'FAST_FORWARD',
|
|
801
|
-
SKIP_TO_LIVE: 'SKIP_TO_LIVE',
|
|
802
|
-
LOOP: 'LOOP',
|
|
803
|
-
AIRPLAY: 'AIRPLAY',
|
|
804
|
-
BACK: 'BACK',
|
|
777
|
+
AD_PROGRESS: 'AD_PROGRESS',
|
|
805
778
|
STATISTICS: 'STATISTICS',
|
|
779
|
+
LOOP: 'LOOP',
|
|
806
780
|
OFF: 'OFF',
|
|
807
|
-
SUBTITLE_FORCED: 'SUBTITLE_FORCED',
|
|
808
|
-
ENTER_LOOP_MODE: 'ENTER_LOOP_MODE',
|
|
809
|
-
MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES',
|
|
810
|
-
UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
|
|
811
|
-
AD_DURATION: 'AD_DURATION',
|
|
812
781
|
SEEK: 'SEEK',
|
|
782
|
+
PLAY: 'PLAY',
|
|
783
|
+
MUTE: 'MUTE',
|
|
784
|
+
SUBTITLE_FORCED: 'SUBTITLE_FORCED',
|
|
785
|
+
BACK: 'BACK',
|
|
786
|
+
PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE',
|
|
787
|
+
SKIP_AD: 'SKIP_AD',
|
|
788
|
+
ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE',
|
|
789
|
+
AD_STATISTICS: 'AD_STATISTICS',
|
|
790
|
+
CAPTIONS: 'CAPTIONS',
|
|
813
791
|
LIVE: 'LIVE',
|
|
792
|
+
PAUSE: 'PAUSE',
|
|
793
|
+
UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
|
|
794
|
+
EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
|
|
795
|
+
AD_TIME: 'AD_TIME',
|
|
796
|
+
UNMUTE: 'UNMUTE',
|
|
797
|
+
RECENTER_VR: 'RECENTER_VR',
|
|
814
798
|
RESOLUTION: 'RESOLUTION',
|
|
815
|
-
|
|
799
|
+
EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
|
|
800
|
+
FAST_FORWARD: 'FAST_FORWARD',
|
|
801
|
+
NOT_APPLICABLE: 'NOT_APPLICABLE',
|
|
802
|
+
REWIND: 'REWIND',
|
|
803
|
+
DOWNLOAD_VIDEO_FRAME: 'DOWNLOAD_VIDEO_FRAME',
|
|
804
|
+
AD_DURATION: 'AD_DURATION',
|
|
805
|
+
MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES',
|
|
806
|
+
REPLAY: 'REPLAY',
|
|
807
|
+
ON: 'ON',
|
|
808
|
+
PLAYBACK_RATE: 'PLAYBACK_RATE',
|
|
809
|
+
AUTO_QUALITY: 'AUTO_QUALITY',
|
|
810
|
+
QUALITY: 'QUALITY',
|
|
816
811
|
LANGUAGE: 'LANGUAGE',
|
|
817
|
-
|
|
812
|
+
AIRPLAY: 'AIRPLAY',
|
|
813
|
+
CAST: 'CAST',
|
|
814
|
+
SKIP_TO_LIVE: 'SKIP_TO_LIVE',
|
|
815
|
+
VOLUME: 'VOLUME',
|
|
816
|
+
TOGGLE_STEREOSCOPIC: 'TOGGLE_STEREOSCOPIC',
|
|
817
|
+
FULL_SCREEN: 'FULL_SCREEN',
|
|
818
818
|
EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN',
|
|
819
|
-
|
|
819
|
+
ENTER_LOOP_MODE: 'ENTER_LOOP_MODE',
|
|
820
820
|
};
|
|
@@ -754,6 +754,7 @@ declare namespace shaka.ads {
|
|
|
754
754
|
isMuted ( ) : any ;
|
|
755
755
|
isPaused ( ) : any ;
|
|
756
756
|
isSkippable ( ) : any ;
|
|
757
|
+
needsSkipUI ( ) : any ;
|
|
757
758
|
pause ( ) : any ;
|
|
758
759
|
play ( ) : any ;
|
|
759
760
|
release ( ) : any ;
|
|
@@ -791,6 +792,7 @@ declare namespace shaka.ads {
|
|
|
791
792
|
isMuted ( ) : any ;
|
|
792
793
|
isPaused ( ) : any ;
|
|
793
794
|
isSkippable ( ) : any ;
|
|
795
|
+
needsSkipUI ( ) : any ;
|
|
794
796
|
pause ( ) : any ;
|
|
795
797
|
play ( ) : any ;
|
|
796
798
|
release ( ) : any ;
|
|
@@ -828,6 +830,7 @@ declare namespace shaka.ads {
|
|
|
828
830
|
isMuted ( ) : any ;
|
|
829
831
|
isPaused ( ) : any ;
|
|
830
832
|
isSkippable ( ) : any ;
|
|
833
|
+
needsSkipUI ( ) : any ;
|
|
831
834
|
pause ( ) : any ;
|
|
832
835
|
play ( ) : any ;
|
|
833
836
|
release ( ) : any ;
|
|
@@ -865,6 +868,7 @@ declare namespace shaka.ads {
|
|
|
865
868
|
isMuted ( ) : any ;
|
|
866
869
|
isPaused ( ) : any ;
|
|
867
870
|
isSkippable ( ) : any ;
|
|
871
|
+
needsSkipUI ( ) : any ;
|
|
868
872
|
pause ( ) : any ;
|
|
869
873
|
play ( ) : any ;
|
|
870
874
|
release ( ) : any ;
|
|
@@ -4177,6 +4181,7 @@ declare namespace shaka.extern {
|
|
|
4177
4181
|
isMuted ( ) : boolean ;
|
|
4178
4182
|
isPaused ( ) : boolean ;
|
|
4179
4183
|
isSkippable ( ) : boolean ;
|
|
4184
|
+
needsSkipUI ( ) : boolean ;
|
|
4180
4185
|
pause ( ) : any ;
|
|
4181
4186
|
play ( ) : any ;
|
|
4182
4187
|
resize (width : number , height : number ) : any ;
|
|
@@ -754,6 +754,7 @@ declare namespace shaka.ads {
|
|
|
754
754
|
isMuted ( ) : any ;
|
|
755
755
|
isPaused ( ) : any ;
|
|
756
756
|
isSkippable ( ) : any ;
|
|
757
|
+
needsSkipUI ( ) : any ;
|
|
757
758
|
pause ( ) : any ;
|
|
758
759
|
play ( ) : any ;
|
|
759
760
|
release ( ) : any ;
|
|
@@ -791,6 +792,7 @@ declare namespace shaka.ads {
|
|
|
791
792
|
isMuted ( ) : any ;
|
|
792
793
|
isPaused ( ) : any ;
|
|
793
794
|
isSkippable ( ) : any ;
|
|
795
|
+
needsSkipUI ( ) : any ;
|
|
794
796
|
pause ( ) : any ;
|
|
795
797
|
play ( ) : any ;
|
|
796
798
|
release ( ) : any ;
|
|
@@ -828,6 +830,7 @@ declare namespace shaka.ads {
|
|
|
828
830
|
isMuted ( ) : any ;
|
|
829
831
|
isPaused ( ) : any ;
|
|
830
832
|
isSkippable ( ) : any ;
|
|
833
|
+
needsSkipUI ( ) : any ;
|
|
831
834
|
pause ( ) : any ;
|
|
832
835
|
play ( ) : any ;
|
|
833
836
|
release ( ) : any ;
|
|
@@ -865,6 +868,7 @@ declare namespace shaka.ads {
|
|
|
865
868
|
isMuted ( ) : any ;
|
|
866
869
|
isPaused ( ) : any ;
|
|
867
870
|
isSkippable ( ) : any ;
|
|
871
|
+
needsSkipUI ( ) : any ;
|
|
868
872
|
pause ( ) : any ;
|
|
869
873
|
play ( ) : any ;
|
|
870
874
|
release ( ) : any ;
|
|
@@ -4177,6 +4181,7 @@ declare namespace shaka.extern {
|
|
|
4177
4181
|
isMuted ( ) : boolean ;
|
|
4178
4182
|
isPaused ( ) : boolean ;
|
|
4179
4183
|
isSkippable ( ) : boolean ;
|
|
4184
|
+
needsSkipUI ( ) : boolean ;
|
|
4180
4185
|
pause ( ) : any ;
|
|
4181
4186
|
play ( ) : any ;
|
|
4182
4187
|
resize (width : number , height : number ) : any ;
|
|
@@ -3788,6 +3788,10 @@ shaka.ads.ClientSideAd = class {
|
|
|
3788
3788
|
* @param {HTMLMediaElement} video
|
|
3789
3789
|
*/
|
|
3790
3790
|
constructor(imaAd, imaAdManager, video) {}
|
|
3791
|
+
/**
|
|
3792
|
+
* @override
|
|
3793
|
+
*/
|
|
3794
|
+
needsSkipUI() {}
|
|
3791
3795
|
/**
|
|
3792
3796
|
* @override
|
|
3793
3797
|
*/
|
|
@@ -4103,6 +4107,10 @@ shaka.ads.InterstitialAd = class {
|
|
|
4103
4107
|
* @param {number} adPosition
|
|
4104
4108
|
*/
|
|
4105
4109
|
constructor(video, isSkippable, onSkip, sequenceLength, adPosition) {}
|
|
4110
|
+
/**
|
|
4111
|
+
* @override
|
|
4112
|
+
*/
|
|
4113
|
+
needsSkipUI() {}
|
|
4106
4114
|
/**
|
|
4107
4115
|
* @override
|
|
4108
4116
|
*/
|
|
@@ -4235,6 +4243,10 @@ shaka.ads.MediaTailorAd = class {
|
|
|
4235
4243
|
* @param {HTMLMediaElement} video
|
|
4236
4244
|
*/
|
|
4237
4245
|
constructor(mediaTailorAd, adPosition, totalAds, isLinear, video) {}
|
|
4246
|
+
/**
|
|
4247
|
+
* @override
|
|
4248
|
+
*/
|
|
4249
|
+
needsSkipUI() {}
|
|
4238
4250
|
/**
|
|
4239
4251
|
* @override
|
|
4240
4252
|
*/
|
|
@@ -4365,6 +4377,10 @@ shaka.ads.ServerSideAd = class {
|
|
|
4365
4377
|
* @param {HTMLMediaElement} video
|
|
4366
4378
|
*/
|
|
4367
4379
|
constructor(imaAd, video) {}
|
|
4380
|
+
/**
|
|
4381
|
+
* @override
|
|
4382
|
+
*/
|
|
4383
|
+
needsSkipUI() {}
|
|
4368
4384
|
/**
|
|
4369
4385
|
* @override
|
|
4370
4386
|
*/
|
|
@@ -1036,9 +1036,9 @@ shaka.media.StreamingEngine.prototype.append_=function(a,b,c,d,e,f){f=void 0===f
|
|
|
1036
1036
|
(q=d.initSegmentReference.timescale);r=p&&q&&c.type===shaka.util.ManifestParserUtils.ContentType.VIDEO&&g.manifest_.type==shaka.media.ManifestParser.DASH&&g.config_.shouldFixTimestampOffset;if(m||n||r)l=new shaka.util.Mp4Parser;m&&l.fullBox("emsg",function(w){return g.parseEMSG_(d,c.emsgSchemeIdUris,w)});n&&l.fullBox("prft",function(w){return g.parsePrft_(d,w)});r&&l.box("moof",shaka.util.Mp4Parser.children).box("traf",shaka.util.Mp4Parser.children).fullBox("tfdt",function(w){var x,v,z,B,A,C;return $jscomp.asyncExecutePromiseGeneratorProgram(function(H){goog.asserts.assert(null!=
|
|
1037
1037
|
w.version,"TFDT is a full box and should have a valid version.");x=shaka.util.Mp4BoxParsers.parseTFDTInaccurate(w.reader,w.version);v=x.baseMediaDecodeTime;if(!v)return H.return();goog.asserts.assert("number"==typeof q,"Should be an number!");z=-v/q;B=Number(a.lastTimestampOffset)||0;if(!(B<z))return H.jumpTo(0);A=a.lastAppendWindowStart;C=a.lastAppendWindowEnd;goog.asserts.assert("number"==typeof A,"Should be an number!");goog.asserts.assert("number"==typeof C,"Should be an number!");return H.yield(g.setProperties_(a,
|
|
1038
1038
|
z,A,C,d),0)})});(m||n||r)&&l.parse(e,!1,f);return u.yield(g.evict_(a,b),2);case 2:return g.destroyer_.ensureNotDestroyed(),t=a.seeked,a.seeked=!1,y=a.adaptation,a.adaptation=!1,u.yield(g.playerInterface_.beforeAppendSegment(a.type,e),3);case 3:return u.yield(g.playerInterface_.mediaSourceEngine.appendBuffer(a.type,e,d,c,k,t,y,f),4);case 4:g.destroyer_.ensureNotDestroyed(),shaka.log.v2(h,"appended media segment"),u.jumpToEnd()}})};
|
|
1039
|
-
shaka.media.StreamingEngine.prototype.parseEMSG_=function(a,b,c){if(0===c.version){var d=c.reader.readTerminatedString();var e=c.reader.readTerminatedString();var f=c.reader.readUint32();var g=c.reader.readUint32();var h=c.reader.readUint32();var k=c.reader.readUint32();var l=a.startTime+g/f}else f=c.reader.readUint32(),l=c.reader.readUint64()/f+a.timestampOffset,g=l-a.startTime,h=c.reader.readUint32(),k=c.reader.readUint32(),d=c.reader.readTerminatedString(),e=c.reader.readTerminatedString();
|
|
1040
|
-
c.reader.getPosition());if(b&&b.includes(d)||this.config_.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==d)this.playerInterface_.onManifestUpdate();else if(f={startTime:l,endTime:
|
|
1041
|
-
d)&&(d=shaka.util.Id3Utils.getID3Frames(
|
|
1039
|
+
shaka.media.StreamingEngine.prototype.parseEMSG_=function(a,b,c){if(0===c.version){var d=c.reader.readTerminatedString();var e=c.reader.readTerminatedString();var f=c.reader.readUint32();var g=c.reader.readUint32();var h=c.reader.readUint32();var k=c.reader.readUint32();var l=a.startTime+g/f}else f=c.reader.readUint32(),l=c.reader.readUint64()/f+a.timestampOffset,g=l-a.startTime,h=c.reader.readUint32(),k=c.reader.readUint32(),d=c.reader.readTerminatedString(),e=c.reader.readTerminatedString();a=c.reader.readBytes(c.reader.getLength()-
|
|
1040
|
+
c.reader.getPosition());if(b&&b.includes(d)||this.config_.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==d)this.playerInterface_.onManifestUpdate();else if(b=l+h/f,k={startTime:l,endTime:b,schemeIdUri:d,value:e,timescale:f,presentationTimeDelta:g,eventDuration:h,id:k,messageData:a},f=shaka.util.FakeEvent.EventName.Emsg,k=(new Map).set("detail",k),f=new shaka.util.FakeEvent(f,k),f.cancelable=!0,this.playerInterface_.onEvent(f),!f.defaultPrevented&&("https://aomedia.org/emsg/ID3"==d||"https://developer.apple.com/streaming/emsg-id3"==
|
|
1041
|
+
d)&&(d=shaka.util.Id3Utils.getID3Frames(a),d.length))this.playerInterface_.onMetadata([{cueTime:l,data:a,frames:d,dts:l,pts:l}],0,b)};
|
|
1042
1042
|
shaka.media.StreamingEngine.prototype.parsePrft_=function(a,b){if(!this.parsedPrftEventRaised_&&a.initSegmentReference.timescale){goog.asserts.assert(0==b.version||1==b.version,"PRFT version can only be 0 or 1");b=shaka.util.Mp4BoxParsers.parsePRFTInaccurate(b.reader,b.version);a=a.initSegmentReference.timescale;var c=this.convertNtp(b.ntpTimestamp);a={wallClockTime:c,programStartDate:new Date(c-b.mediaTime/a*1E3)};b=shaka.util.FakeEvent.EventName.Prft;a=(new Map).set("detail",a);b=new shaka.util.FakeEvent(b,
|
|
1043
1043
|
a);this.playerInterface_.onEvent(b);this.parsedPrftEventRaised_=!0}};shaka.media.StreamingEngine.prototype.convertNtp=function(a){var b=new Date(Date.UTC(1900,0,1,0,0,0));return(new Date(b.getTime()+a)).getTime()};
|
|
1044
1044
|
shaka.media.StreamingEngine.prototype.evict_=function(a,b){var c=this,d,e,f,g,h;return $jscomp.asyncExecutePromiseGeneratorProgram(function(k){if(1==k.nextAddress){d=shaka.media.StreamingEngine.logPrefix_(a);shaka.log.v2(d,"checking buffer length");e=Math.max(c.config_.bufferBehind,c.manifest_.presentationTimeline.getMaxSegmentDuration());f=c.playerInterface_.mediaSourceEngine.bufferStart(a.type);if(null==f)return shaka.log.v2(d,"buffer behind okay because nothing buffered:","presentationTime="+b,
|
|
@@ -1179,11 +1179,12 @@ shaka.text.UITextDisplayer.prototype.computeCuePositionAlignment_=function(a){va
|
|
|
1179
1179
|
b.positionAlign.CENTER};
|
|
1180
1180
|
shaka.text.UITextDisplayer.prototype.setCaptionStyles_=function(a,b,c,d){var e=shaka.text.Cue,f=a.style,g=0==b.nestedCues.length,h=1<c.length;f.whiteSpace="pre-wrap";var k=b.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=b.textStrokeColor;f.webkitTextStrokeWidth=b.textStrokeWidth;f.color=b.color;f.direction=b.direction;f.opacity=b.opacity;f.paddingLeft=shaka.text.UITextDisplayer.convertLengthValue_(b.linePadding,b,this.videoContainer_);f.paddingRight=
|
|
1181
1181
|
shaka.text.UITextDisplayer.convertLengthValue_(b.linePadding,b,this.videoContainer_);f.textCombineUpright=b.textCombineUpright;f.textShadow=b.textShadow;if(b.backgroundImage)f.backgroundImage="url('"+b.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",b.backgroundColor&&(f.backgroundColor=b.backgroundColor),f.width="100%",f.height="100%";else{if(b.nestedCues.length)var l=a;else l=shaka.util.Dom.createHTMLElement("span"),a.appendChild(l);b.border&&
|
|
1182
|
-
(l.style.border=b.border);!d&&((a=shaka.text.UITextDisplayer.inheritProperty_(c,function(m){return m.backgroundColor}))?l.style.backgroundColor=a:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),a=shaka.text.UITextDisplayer.inheritProperty_(c,function(m){return m.fontFamily}))&&(l.style.fontFamily=a);k&&(l.textContent=k)}h&&!c[c.length-1].isContainer
|
|
1183
|
-
b.displayAlign==e.displayAlign.CENTER?"center":"flex-end"
|
|
1184
|
-
(
|
|
1185
|
-
(b.
|
|
1186
|
-
f.
|
|
1182
|
+
(l.style.border=b.border);!d&&((a=shaka.text.UITextDisplayer.inheritProperty_(c,function(m){return m.backgroundColor}))?l.style.backgroundColor=a:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),a=shaka.text.UITextDisplayer.inheritProperty_(c,function(m){return m.fontFamily}))&&(l.style.fontFamily=a);k&&(l.textContent=k)}if(h&&!c[c.length-1].isContainer)f.display="inline";else{f.display="flex";f.flexDirection="column";f.alignItems="center";if(b.textAlign==e.textAlign.LEFT||b.textAlign==e.textAlign.START)f.width=
|
|
1183
|
+
"100%",f.alignItems="start";else if(b.textAlign==e.textAlign.RIGHT||b.textAlign==e.textAlign.END)f.width="100%",f.alignItems="end";f.justifyContent=b.displayAlign==e.displayAlign.BEFORE?"flex-start":b.displayAlign==e.displayAlign.CENTER?"center":"flex-end"}g||(f.margin="0");f.fontFamily=b.fontFamily;f.fontWeight=b.fontWeight.toString();f.fontStyle=b.fontStyle;f.letterSpacing=b.letterSpacing;f.fontSize=shaka.text.UITextDisplayer.convertLengthValue_(b.fontSize,b,this.videoContainer_);c=b.line;null!=
|
|
1184
|
+
c&&(g=b.lineInterpretation,g==e.lineInterpretation.LINE_NUMBER&&(g=e.lineInterpretation.PERCENTAGE,h=16,this.aspectRatio_&&1>this.aspectRatio_&&(h=32),c=0>c?100+c/h*100:c/h*100),g==e.lineInterpretation.PERCENTAGE&&(f.position="absolute",b.writingMode==e.writingMode.HORIZONTAL_TOP_TO_BOTTOM?(f.width="100%",b.lineAlign==e.lineAlign.START?f.top=c+"%":b.lineAlign==e.lineAlign.END&&(f.bottom=100-c+"%")):b.writingMode==e.writingMode.VERTICAL_LEFT_TO_RIGHT?(f.height="100%",b.lineAlign==e.lineAlign.START?
|
|
1185
|
+
f.left=c+"%":b.lineAlign==e.lineAlign.END&&(f.right=100-c+"%")):(f.height="100%",b.lineAlign==e.lineAlign.START?f.right=c+"%":b.lineAlign==e.lineAlign.END&&(f.left=100-c+"%"))));f.lineHeight=b.lineHeight;c=this.computeCuePositionAlignment_(b);c==e.positionAlign.LEFT?(f.cssFloat="left",null!==b.position&&(f.position="absolute",b.writingMode==e.writingMode.HORIZONTAL_TOP_TO_BOTTOM?(f.left=b.position+"%",f.width="auto"):f.top=b.position+"%")):c==e.positionAlign.RIGHT?(f.cssFloat="right",null!==b.position&&
|
|
1186
|
+
(f.position="absolute",b.writingMode==e.writingMode.HORIZONTAL_TOP_TO_BOTTOM?(f.right=b.position+"%",f.width="auto"):f.bottom=b.position+"%")):null!==b.position&&50!=b.position&&(f.position="absolute",b.writingMode==e.writingMode.HORIZONTAL_TOP_TO_BOTTOM?(f.left=b.position+"%",f.width="auto"):f.top=b.position+"%");f.textAlign=b.textAlign;f.textDecoration=b.textDecoration.join(" ");f.writingMode=b.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==b.writingMode||(f.webkitWritingMode=
|
|
1187
|
+
b.writingMode);b.size&&(b.writingMode==e.writingMode.HORIZONTAL_TOP_TO_BOTTOM?f.width=b.size+"%":f.height=b.size+"%")};shaka.text.UITextDisplayer.getLengthValueInfo_=function(a){return(a=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(a[1]),unit:a[2]}:null};
|
|
1187
1188
|
shaka.text.UITextDisplayer.convertLengthValue_=function(a,b,c){var d=shaka.text.UITextDisplayer.getLengthValueInfo_(a);if(!d)return a;var e=d.value;switch(d.unit){case "%":return shaka.text.UITextDisplayer.getAbsoluteLengthInPixels_(e/100,b,c);case "c":return shaka.text.UITextDisplayer.getAbsoluteLengthInPixels_(e,b,c);default:return a}};shaka.text.UITextDisplayer.getAbsoluteLengthInPixels_=function(a,b,c){return c.clientHeight*a/b.cellResolution.rows+"px"};
|
|
1188
1189
|
shaka.text.UITextDisplayer.inheritProperty_=function(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null};goog.exportSymbol("shaka.text.UITextDisplayer",shaka.text.UITextDisplayer);goog.exportProperty(shaka.text.UITextDisplayer.prototype,"setTextVisibility",shaka.text.UITextDisplayer.prototype.setTextVisibility);goog.exportProperty(shaka.text.UITextDisplayer.prototype,"isTextVisible",shaka.text.UITextDisplayer.prototype.isTextVisible);
|
|
1189
1190
|
goog.exportProperty(shaka.text.UITextDisplayer.prototype,"remove",shaka.text.UITextDisplayer.prototype.remove);goog.exportProperty(shaka.text.UITextDisplayer.prototype,"destroy",shaka.text.UITextDisplayer.prototype.destroy);goog.exportProperty(shaka.text.UITextDisplayer.prototype,"append",shaka.text.UITextDisplayer.prototype.append);goog.exportProperty(shaka.text.UITextDisplayer.prototype,"configure",shaka.text.UITextDisplayer.prototype.configure);shaka.text.WebVttGenerator=function(){};
|
|
@@ -1313,7 +1314,7 @@ r.yield(Promise.race([k,l]),2);if((m=c.isLive())&&(c.config_.streaming.liveSync&
|
|
|
1313
1314
|
shaka.Player.prototype.processTimedMetadataSrcEqls_=function(a){var b=this;if("metadata"==a.kind){a.mode="hidden";this.loadEventManager_.listen(a,"cuechange",function(){if(a.activeCues){for(var d=[],e={},f=$jscomp.makeIterator(a.activeCues),g=f.next();!g.done;e={$jscomp$loop$prop$cue$954:e.$jscomp$loop$prop$cue$954},g=f.next()){e.$jscomp$loop$prop$cue$954=g.value;b.dispatchMetadataEvent_(e.$jscomp$loop$prop$cue$954.startTime,e.$jscomp$loop$prop$cue$954.endTime,e.$jscomp$loop$prop$cue$954.type,e.$jscomp$loop$prop$cue$954.value);
|
|
1314
1315
|
if(b.adManager_)b.adManager_.onCueMetadataChange(e.$jscomp$loop$prop$cue$954.value);"com.apple.quicktime.HLS"==e.$jscomp$loop$prop$cue$954.type&&null!=e.$jscomp$loop$prop$cue$954.startTime&&(g=d.find(function(h){return function(k){return k.startTime==h.$jscomp$loop$prop$cue$954.startTime&&k.endTime==h.$jscomp$loop$prop$cue$954.endTime}}(e)),g||(g={startTime:e.$jscomp$loop$prop$cue$954.startTime,endTime:e.$jscomp$loop$prop$cue$954.endTime,values:[]},d.push(g)),g.values.push(e.$jscomp$loop$prop$cue$954.value))}d=
|
|
1315
1316
|
$jscomp.makeIterator(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return"X-ASSET-URI"==h.key||"X-ASSET-LIST"==h.key})&&b.adManager_&&(e.values.push({key:"CUE",description:"",data:"ONCE",mimeType:null,pictureType:null}),goog.asserts.assert(b.video_,"Must have video"),b.adManager_.onInterstitialMetadata(b,b.video_,e))}});var c=(new shaka.util.Timer(function(){var d=b.getMetadataTracks_();d=$jscomp.makeIterator(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).tickNow().tickAfter(.5);
|
|
1316
|
-
this.cleanupOnUnload_.push(function(){c.stop()})}};shaka.Player.prototype.processTimedMetadataMediaSrc_=function(a,b,c){a=$jscomp.makeIterator(a);for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.data&&d.cueTime&&d.frames){var e=d.cueTime+b,f=c;f&&e>f&&(f=e);for(var g=$jscomp.makeIterator(d.frames),h=g.next();!h.done;h=g.next())this.dispatchMetadataEvent_(e,f,"org.id3",h.value);if(this.adManager_)this.adManager_.onHlsTimedMetadata(d,e)}};
|
|
1317
|
+
this.cleanupOnUnload_.push(function(){c.stop()})}};shaka.Player.prototype.processTimedMetadataMediaSrc_=function(a,b,c){a=$jscomp.makeIterator(a);for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.data&&"number"==typeof d.cueTime&&d.frames){var e=d.cueTime+b,f=c;f&&e>f&&(f=e);for(var g=$jscomp.makeIterator(d.frames),h=g.next();!h.done;h=g.next())this.dispatchMetadataEvent_(e,f,"org.id3",h.value);if(this.adManager_)this.adManager_.onHlsTimedMetadata(d,e)}};
|
|
1317
1318
|
shaka.Player.prototype.dispatchMetadataEvent_=function(a,b,c,d){goog.asserts.assert(!b||a<=b,"Metadata start time should be less or equal to the end time!");var e=shaka.util.FakeEvent.EventName.Metadata;a=(new Map).set("startTime",a).set("endTime",b).set("metadataType",c).set("payload",d);this.dispatchEvent(shaka.Player.makeEvent_(e,a))};
|
|
1318
1319
|
shaka.Player.prototype.activateChaptersTrack_=function(a){if(a&&"chapters"==a.kind){a.mode="hidden";var b=(new shaka.util.Timer(function(){a.mode="hidden"})).tickNow().tickAfter(.5);this.cleanupOnUnload_.push(function(){b.stop()})}};shaka.Player.prototype.releaseAllMutexes=function(){this.mutex_.releaseAll()};shaka.Player.prototype.createDrmEngine=function(a){return new shaka.media.DrmEngine(a)};
|
|
1319
1320
|
shaka.Player.prototype.createNetworkingEngine=function(a){var b=this;a||(a=function(){return null});var c=function(e){a()?a().addQueuedOperation(!0,e):e()},d=function(e){a()?a().dispatchEvent(e):b.dispatchEvent(e)};return new shaka.net.NetworkingEngine(function(e,f,g,h){var k=a()?a().getAbrManager():b.abrManager_;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){var h=shaka.util.FakeEvent.EventName.DownloadHeadersReceived;f=(new Map).set("headers",e).set("request",f).set("requestType",g);d(shaka.Player.makeEvent_(h,
|
|
@@ -1494,10 +1495,10 @@ goog.exportProperty(shaka.Player.prototype,"getLoadMode",shaka.Player.prototype.
|
|
|
1494
1495
|
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);
|
|
1495
1496
|
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);
|
|
1496
1497
|
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);
|
|
1497
|
-
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.
|
|
1498
|
+
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.9-debug";goog.exportProperty(shaka.Player,"version",shaka.Player.version);shaka.Deprecate.init(shaka.Player.version);shaka.Player.supportPlugins_={};shaka.Player.adManagerFactory_=null;
|
|
1498
1499
|
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_++};
|
|
1499
|
-
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.
|
|
1500
|
-
shaka.ads.ClientSideAd.prototype.getMinSuggestedDuration=function(){return this.ad_.getMinSuggestedDuration()};shaka.ads.ClientSideAd.prototype.getRemainingTime=function(){return this.manager_.getRemainingTime()};shaka.ads.ClientSideAd.prototype.isPaused=function(){return this.isPaused_};shaka.ads.ClientSideAd.prototype.isSkippable=function(){return 0<=this.ad_.getSkipTimeOffset()};
|
|
1500
|
+
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};
|
|
1501
|
+
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_};shaka.ads.ClientSideAd.prototype.isSkippable=function(){return 0<=this.ad_.getSkipTimeOffset()};
|
|
1501
1502
|
shaka.ads.ClientSideAd.prototype.getTimeUntilSkippable=function(){var a=this.ad_.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};shaka.ads.ClientSideAd.prototype.canSkipNow=function(){return this.manager_.getAdSkippableState()};shaka.ads.ClientSideAd.prototype.skip=function(){return this.manager_.skip()};shaka.ads.ClientSideAd.prototype.setPaused=function(a){this.isPaused_=a};shaka.ads.ClientSideAd.prototype.pause=function(){return this.manager_.pause()};
|
|
1502
1503
|
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()};
|
|
1503
1504
|
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_)};
|
|
@@ -1511,7 +1512,7 @@ goog.exportProperty(shaka.ads.ClientSideAd.prototype,"getTitle",shaka.ads.Client
|
|
|
1511
1512
|
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);
|
|
1512
1513
|
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);
|
|
1513
1514
|
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);
|
|
1514
|
-
goog.exportProperty(shaka.ads.ClientSideAd.prototype,"getDuration",shaka.ads.ClientSideAd.prototype.getDuration);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";
|
|
1515
|
+
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";
|
|
1515
1516
|
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";
|
|
1516
1517
|
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";
|
|
1517
1518
|
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";
|
|
@@ -1542,20 +1543,21 @@ function(c){b(c,shaka.ads.Utils.ALL_ADS_COMPLETED)});this.eventManager_.listen(t
|
|
|
1542
1543
|
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)})};
|
|
1543
1544
|
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",
|
|
1544
1545
|
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!")};
|
|
1545
|
-
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.getDuration=function(){var a=this.video_.duration;return isNaN(a)?-1:a};shaka.ads.InterstitialAd.prototype.getMinSuggestedDuration=function(){return this.getDuration()};
|
|
1546
|
-
shaka.ads.InterstitialAd.prototype.
|
|
1547
|
-
shaka.ads.InterstitialAd.prototype.
|
|
1548
|
-
shaka.ads.InterstitialAd.prototype.
|
|
1549
|
-
shaka.ads.InterstitialAd.prototype.
|
|
1550
|
-
shaka.ads.InterstitialAd.prototype.getTimeOffset=function(){return 0};shaka.ads.InterstitialAd.prototype.getPodIndex=function(){return 0};shaka.ads.InterstitialAd.prototype.release=function(){this.video_=null};goog.exportSymbol("shaka.ads.InterstitialAd",shaka.ads.InterstitialAd);goog.exportProperty(shaka.ads.InterstitialAd.prototype,"release",shaka.ads.InterstitialAd.prototype.release);
|
|
1551
|
-
goog.exportProperty(shaka.ads.InterstitialAd.prototype,"
|
|
1552
|
-
goog.exportProperty(shaka.ads.InterstitialAd.prototype,"
|
|
1553
|
-
goog.exportProperty(shaka.ads.InterstitialAd.prototype,"
|
|
1554
|
-
goog.exportProperty(shaka.ads.InterstitialAd.prototype,"
|
|
1555
|
-
goog.exportProperty(shaka.ads.InterstitialAd.prototype,"
|
|
1556
|
-
goog.exportProperty(shaka.ads.InterstitialAd.prototype,"
|
|
1557
|
-
goog.exportProperty(shaka.ads.InterstitialAd.prototype,"
|
|
1558
|
-
"
|
|
1546
|
+
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()};
|
|
1547
|
+
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)};
|
|
1548
|
+
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};
|
|
1549
|
+
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_};
|
|
1550
|
+
shaka.ads.InterstitialAd.prototype.getTitle=function(){return""};shaka.ads.InterstitialAd.prototype.getDescription=function(){return""};shaka.ads.InterstitialAd.prototype.getVastMediaBitrate=function(){return 0};shaka.ads.InterstitialAd.prototype.getVastMediaHeight=function(){return 0};shaka.ads.InterstitialAd.prototype.getVastMediaWidth=function(){return 0};shaka.ads.InterstitialAd.prototype.getAdId=function(){return""};shaka.ads.InterstitialAd.prototype.getCreativeAdId=function(){return""};
|
|
1551
|
+
shaka.ads.InterstitialAd.prototype.getAdvertiserName=function(){return""};shaka.ads.InterstitialAd.prototype.getMediaUrl=function(){return null};shaka.ads.InterstitialAd.prototype.getTimeOffset=function(){return 0};shaka.ads.InterstitialAd.prototype.getPodIndex=function(){return 0};shaka.ads.InterstitialAd.prototype.release=function(){this.video_=null};goog.exportSymbol("shaka.ads.InterstitialAd",shaka.ads.InterstitialAd);goog.exportProperty(shaka.ads.InterstitialAd.prototype,"release",shaka.ads.InterstitialAd.prototype.release);
|
|
1552
|
+
goog.exportProperty(shaka.ads.InterstitialAd.prototype,"getPodIndex",shaka.ads.InterstitialAd.prototype.getPodIndex);goog.exportProperty(shaka.ads.InterstitialAd.prototype,"getTimeOffset",shaka.ads.InterstitialAd.prototype.getTimeOffset);goog.exportProperty(shaka.ads.InterstitialAd.prototype,"getMediaUrl",shaka.ads.InterstitialAd.prototype.getMediaUrl);goog.exportProperty(shaka.ads.InterstitialAd.prototype,"getAdvertiserName",shaka.ads.InterstitialAd.prototype.getAdvertiserName);
|
|
1553
|
+
goog.exportProperty(shaka.ads.InterstitialAd.prototype,"getCreativeAdId",shaka.ads.InterstitialAd.prototype.getCreativeAdId);goog.exportProperty(shaka.ads.InterstitialAd.prototype,"getAdId",shaka.ads.InterstitialAd.prototype.getAdId);goog.exportProperty(shaka.ads.InterstitialAd.prototype,"getVastMediaWidth",shaka.ads.InterstitialAd.prototype.getVastMediaWidth);goog.exportProperty(shaka.ads.InterstitialAd.prototype,"getVastMediaHeight",shaka.ads.InterstitialAd.prototype.getVastMediaHeight);
|
|
1554
|
+
goog.exportProperty(shaka.ads.InterstitialAd.prototype,"getVastMediaBitrate",shaka.ads.InterstitialAd.prototype.getVastMediaBitrate);goog.exportProperty(shaka.ads.InterstitialAd.prototype,"getDescription",shaka.ads.InterstitialAd.prototype.getDescription);goog.exportProperty(shaka.ads.InterstitialAd.prototype,"getTitle",shaka.ads.InterstitialAd.prototype.getTitle);goog.exportProperty(shaka.ads.InterstitialAd.prototype,"getPositionInSequence",shaka.ads.InterstitialAd.prototype.getPositionInSequence);
|
|
1555
|
+
goog.exportProperty(shaka.ads.InterstitialAd.prototype,"getSequenceLength",shaka.ads.InterstitialAd.prototype.getSequenceLength);goog.exportProperty(shaka.ads.InterstitialAd.prototype,"setMuted",shaka.ads.InterstitialAd.prototype.setMuted);goog.exportProperty(shaka.ads.InterstitialAd.prototype,"resize",shaka.ads.InterstitialAd.prototype.resize);goog.exportProperty(shaka.ads.InterstitialAd.prototype,"isLinear",shaka.ads.InterstitialAd.prototype.isLinear);
|
|
1556
|
+
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);
|
|
1557
|
+
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);
|
|
1558
|
+
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);
|
|
1559
|
+
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_,
|
|
1560
|
+
"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);
|
|
1559
1561
|
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)&&
|
|
1560
1562
|
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)};
|
|
1561
1563
|
shaka.ads.InterstitialAdManager.prototype.configure=function(a){this.adContainer_&&this.usingBaseVideo_==a.supportsMultipleMediaElements&&((this.usingBaseVideo_=!a.supportsMultipleMediaElements)?(this.video_=this.baseVideo_,this.adVideo_&&(this.adVideo_.parentElement&&this.adContainer_.removeChild(this.adVideo_),this.adVideo_=null)):(this.adVideo_||(this.adVideo_=this.createMediaElement_()),this.video_=this.adVideo_))};
|
|
@@ -1566,24 +1568,24 @@ e.next())(g=f.value,h=JSON.stringify(g),b.interstitialIds_.has(h))||(c=!0,b.inte
|
|
|
1566
1568
|
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};
|
|
1567
1569
|
shaka.ads.InterstitialAdManager.prototype.getCurrentInterstitial_=function(a,b){b=void 0===b?0:b;var c=0,d=null;if(this.interstitials_.size&&null!=this.lastTime_){var e=this.baseVideo_.ended,f=Array.from(this.interstitials_).sort(function(k,l){return l.startTime-k.startTime});f=$jscomp.makeIterator(f);for(var g=f.next();!g.done;g=f.next()){g=g.value;var h=!1;a?h=g.pre:e?h=g.post:g.pre||g.post||(h=this.lastTime_-Math.round(1E3*g.startTime)/1E3,h=0<h&&(1>=h||!g.canJump));if(h){if(c==b){d=g;break}c++}}}return d};
|
|
1568
1570
|
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,y,u,w,x;return $jscomp.asyncExecutePromiseGeneratorProgram(function(v){switch(v.nextAddress){case 1:goog.asserts.assert(f.video_,"Must have video");g=Date.now();!f.video_.parentElement&&f.adContainer_&&f.adContainer_.appendChild(f.video_);1==c&&1==b&&(b=Array.from(f.interstitials_).filter(function(z){return a.pre?z.pre==a.pre:a.post?z.post==a.post:.001>Math.abs(z.startTime-a.startTime)}).length);
|
|
1569
|
-
a.once
|
|
1570
|
-
3):B.jumpTo(3);h.resolve();f.adEventManager_.unlisten(f.basePlayer_,"onstatechange",k);B.jumpToEnd()})};f.adEventManager_.listen(f.basePlayer_,"onstatechange",k);return v.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)f.baseVideo_.currentTime!=a.endTime&&(f.baseVideo_.currentTime=a.endTime);
|
|
1571
|
-
f.baseVideo_.currentTime+=(z-d)/1E3;d=z}};p=function(){var z,B;return $jscomp.asyncExecutePromiseGeneratorProgram(function(A){if(1==A.nextAddress)return n(),m&&m.stop(),goog.asserts.assert("number"==typeof e,"Should be an number!"),(z=f.getCurrentInterstitial_(a.pre,c-e))?(f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_STOPPED)),f.adEventManager_.removeAll(),f.setupAd_(z,b,++c,d,e),A.jumpTo(0)):f.usingBaseVideo_?A.yield(f.player_.detach(),4):A.yield(f.player_.unload(),
|
|
1572
|
-
(B=a.resumeOffset,null==B&&(B=a.timelineRange&&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());A.jumpToEnd()})};q=function(z){return $jscomp.asyncExecutePromiseGeneratorProgram(function(B){if(l)return B.return();
|
|
1571
|
+
if(a.once||a.pre)e++,f.interstitials_.delete(a),f.cuepointsChanged_();f.playingAd_=!0;if(!f.usingBaseVideo_||1!=c){v.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(z){return $jscomp.asyncExecutePromiseGeneratorProgram(function(B){if(1==B.nextAddress)return"detach"!=z.state?B.jumpTo(0):shaka.util.Platform.isSmartTV()?B.yield(new Promise(function(A){return(new shaka.util.Timer(A)).tickAfter(.1)}),
|
|
1572
|
+
3):B.jumpTo(3);h.resolve();f.adEventManager_.unlisten(f.basePlayer_,"onstatechange",k);B.jumpToEnd()})};f.adEventManager_.listen(f.basePlayer_,"onstatechange",k);return v.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!=a.endTime)f.baseVideo_.currentTime!=a.endTime&&(f.baseVideo_.currentTime=a.endTime);
|
|
1573
|
+
else{var z=Date.now();f.baseVideo_.currentTime+=(z-d)/1E3;d=z}};p=function(){var z,B;return $jscomp.asyncExecutePromiseGeneratorProgram(function(A){if(1==A.nextAddress)return n(),m&&m.stop(),goog.asserts.assert("number"==typeof e,"Should be an number!"),(z=f.getCurrentInterstitial_(a.pre,c-e))?(f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_STOPPED)),f.adEventManager_.removeAll(),f.setupAd_(z,b,++c,d,e),A.jumpTo(0)):f.usingBaseVideo_?A.yield(f.player_.detach(),4):A.yield(f.player_.unload(),
|
|
1574
|
+
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());A.jumpToEnd()})};q=function(z){return $jscomp.asyncExecutePromiseGeneratorProgram(function(B){if(l)return B.return();
|
|
1573
1575
|
l=!0;f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_ERROR,(new Map).set("originalEvent",z)));return B.yield(p(),0)})};r=function(){return $jscomp.asyncExecutePromiseGeneratorProgram(function(z){if(1==z.nextAddress){if(l)return z.return();l=!0;return z.yield(p(),2)}f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_COMPLETE));z.jumpToEnd()})};t=function(){return $jscomp.asyncExecutePromiseGeneratorProgram(function(z){if(l)return z.return();l=!0;f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_SKIPPED));
|
|
1574
1576
|
return z.yield(p(),0)})};y=new shaka.ads.InterstitialAd(f.video_,a.isSkippable,t,b,c);f.usingBaseVideo_||(y.setMuted(f.baseVideo_.muted),y.setVolume(f.baseVideo_.volume));f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_STARTED,(new Map).set("ad",y)));if(y.canSkipNow())f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_SKIP_STATE_CHANGED));f.adEventManager_.listenOnce(f.player_,"error",q);f.adEventManager_.listenOnce(f.player_,"firstquartile",function(){n();f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_FIRST_QUARTILE))});
|
|
1575
1577
|
f.adEventManager_.listenOnce(f.player_,"midpoint",function(){n();f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_MIDPOINT))});f.adEventManager_.listenOnce(f.player_,"thirdquartile",function(){n();f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_THIRD_QUARTILE))});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(){f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.AD_PAUSED))});
|
|
1576
1578
|
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))});v.setCatchFinallyBlocks(4);a.playoutLimit&&(m=(new shaka.util.Timer(function(){y.skip()})).tickAfter(a.playoutLimit));f.updatePlayerConfig_();return v.yield(f.player_.attach(f.video_),6);case 6:return f.preloadManagerInterstitials_.has(a)?v.yield(f.preloadManagerInterstitials_.get(a),
|
|
1577
1579
|
10):v.yield(f.player_.load(a.uri),8);case 10:return u=v.yieldResult,f.preloadManagerInterstitials_.delete(a),u?v.yield(f.player_.load(u),8):v.yield(f.player_.load(a.uri),8);case 8:w=(Date.now()-g)/1E3;f.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.ADS_LOADED,(new Map).set("loadTime",w)));f.usingBaseVideo_&&f.baseVideo_.play();v.leaveTryBlock(0);break;case 4:x=v.enterCatchBlock(),q(x),v.jumpToEnd()}})};
|
|
1578
1580
|
shaka.ads.InterstitialAdManager.prototype.getInterstitialsInfo_=function(a){var b=this,c,d,e,f,g,h,k,l,m,n,p,q,r,t,y,u,w,x,v,z,B,A,C,H,I,E,D,G,F,K,L,M;return $jscomp.asyncExecutePromiseGeneratorProgram(function(J){switch(J.nextAddress){case 1:c=[];if(!a)return J.return(c);d=a.values.find(function(N){return"X-ASSET-URI"==N.key});e=a.values.find(function(N){return"X-ASSET-LIST"==N.key});if(!d&&!e)return J.return(c);f=a.values.find(function(N){return"X-RESTRICT"==N.key});h=g=!0;f&&f.data&&(k=f.data,
|
|
1579
|
-
g=!k.includes("SKIP"),h=!k.includes("JUMP"));l=null;if(m=a.values.find(function(N){return"X-RESUME-OFFSET"==N.key}))n=m.data,l=parseFloat(n),isNaN(l)&&(l=null);p=null;if(q=a.values.find(function(N){return"X-PLAYOUT-LIMIT"==N.key}))r=q.data,p=parseFloat(r),isNaN(p)&&(p=null);u=y=t=!1;if(w=a.values.find(function(N){return"CUE"==N.key}))x=w.data,t=x.includes("ONCE"),y=x.includes("PRE"),u=x.includes("POST");v=!
|
|
1580
|
-
!m&&b.basePlayer_.isLive()&&(v=!
|
|
1581
|
+
g=!k.includes("SKIP"),h=!k.includes("JUMP"));l=null;if(m=a.values.find(function(N){return"X-RESUME-OFFSET"==N.key}))n=m.data,l=parseFloat(n),isNaN(l)&&(l=null);p=null;if(q=a.values.find(function(N){return"X-PLAYOUT-LIMIT"==N.key}))r=q.data,p=parseFloat(r),isNaN(p)&&(p=null);u=y=t=!1;if(w=a.values.find(function(N){return"CUE"==N.key}))x=w.data,t=x.includes("ONCE"),y=x.includes("PRE"),u=x.includes("POST");v=!1;(z=a.values.find(function(N){return"X-TIMELINE-OCCUPIES"==N.key}))?(B=z.data,v=B.includes("RANGE")):
|
|
1582
|
+
!m&&b.basePlayer_.isLive()&&(v=!y&&!u);if(d){A=d.data;if(!A)return J.return(c);c.push({startTime:a.startTime,endTime:a.endTime,uri:A,isSkippable:g,canJump:h,resumeOffset:l,playoutLimit:p,once:t,pre:y,post:u,timelineRange:v});J.jumpTo(2);break}if(!e){J.jumpTo(2);break}C=e.data;if(!C)return J.return(c);H=shaka.net.NetworkingEngine.RequestType.ADS;I=shaka.net.NetworkingEngine.makeRequest([C],shaka.net.NetworkingEngine.defaultRetryParameters());E=b.basePlayer_.getNetworkingEngine().request(H,I);J.setCatchFinallyBlocks(4);
|
|
1581
1583
|
return J.yield(E.promise,6);case 6:D=J.yieldResult;G=shaka.util.StringUtils.fromUTF8(D.data);F=JSON.parse(G);K=$jscomp.makeIterator(F.ASSETS);for(L=K.next();!L.done;L=K.next())M=L.value,M.URI&&c.push({startTime:a.startTime,endTime:a.endTime,uri:M.URI,isSkippable:g,canJump:h,resumeOffset:l,playoutLimit:p,once:t,pre:y,post:u,timelineRange:v});J.leaveTryBlock(2);break;case 4:J.enterCatchBlock();case 2:return J.return(c)}})};
|
|
1582
1584
|
shaka.ads.InterstitialAdManager.prototype.cuepointsChanged_=function(){for(var a=[],b={},c=$jscomp.makeIterator(this.interstitials_),d=c.next();!d.done;b={$jscomp$loop$prop$shakaCuePoint$959:b.$jscomp$loop$prop$shakaCuePoint$959},d=c.next())d=d.value,b.$jscomp$loop$prop$shakaCuePoint$959={start:d.startTime,end:null},d.pre?(b.$jscomp$loop$prop$shakaCuePoint$959.start=0,b.$jscomp$loop$prop$shakaCuePoint$959.end=null):d.post?(b.$jscomp$loop$prop$shakaCuePoint$959.start=-1,b.$jscomp$loop$prop$shakaCuePoint$959.end=
|
|
1583
1585
|
null):d.timelineRange&&(b.$jscomp$loop$prop$shakaCuePoint$959.end=d.endTime),a.find(function(e){return function(f){return e.$jscomp$loop$prop$shakaCuePoint$959.start==f.start&&e.$jscomp$loop$prop$shakaCuePoint$959.end==f.end}}(b))||a.push(b.$jscomp$loop$prop$shakaCuePoint$959);this.onEvent_(new shaka.util.FakeEvent(shaka.ads.Utils.CUEPOINTS_CHANGED,(new Map).set("cuepoints",a)))};
|
|
1584
1586
|
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)};
|
|
1585
1587
|
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};
|
|
1586
|
-
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.getDuration=function(){return this.ad_.durationInSeconds};shaka.ads.MediaTailorAd.prototype.getMinSuggestedDuration=function(){return this.getDuration()};
|
|
1588
|
+
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()};
|
|
1587
1589
|
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};
|
|
1588
1590
|
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()};
|
|
1589
1591
|
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){};
|
|
@@ -1598,7 +1600,7 @@ goog.exportProperty(shaka.ads.MediaTailorAd.prototype,"getSequenceLength",shaka.
|
|
|
1598
1600
|
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);
|
|
1599
1601
|
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);
|
|
1600
1602
|
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);
|
|
1601
|
-
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_=
|
|
1603
|
+
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_=
|
|
1602
1604
|
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_};
|
|
1603
1605
|
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)))};
|
|
1604
1606
|
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()};
|
|
@@ -1633,7 +1635,7 @@ shaka.ads.MediaTailorAdManager.prototype.sendTrackingEvent_=function(a){var b=th
|
|
|
1633
1635
|
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));
|
|
1634
1636
|
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");
|
|
1635
1637
|
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";
|
|
1636
|
-
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.getDuration=function(){return this.adProgressData_?this.adProgressData_.duration:-1};shaka.ads.ServerSideAd.prototype.getMinSuggestedDuration=function(){return this.getDuration()};
|
|
1638
|
+
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()};
|
|
1637
1639
|
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)};
|
|
1638
1640
|
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};
|
|
1639
1641
|
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()};
|
|
@@ -1646,7 +1648,8 @@ goog.exportProperty(shaka.ads.ServerSideAd.prototype,"getVastMediaBitrate",shaka
|
|
|
1646
1648
|
goog.exportProperty(shaka.ads.ServerSideAd.prototype,"getSequenceLength",shaka.ads.ServerSideAd.prototype.getSequenceLength);goog.exportProperty(shaka.ads.ServerSideAd.prototype,"setMuted",shaka.ads.ServerSideAd.prototype.setMuted);goog.exportProperty(shaka.ads.ServerSideAd.prototype,"resize",shaka.ads.ServerSideAd.prototype.resize);goog.exportProperty(shaka.ads.ServerSideAd.prototype,"isLinear",shaka.ads.ServerSideAd.prototype.isLinear);
|
|
1647
1649
|
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);
|
|
1648
1650
|
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);
|
|
1649
|
-
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);
|
|
1651
|
+
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);
|
|
1652
|
+
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,
|
|
1650
1653
|
(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_,
|
|
1651
1654
|
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");
|
|
1652
1655
|
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))});
|