@castlabs/prestoplay 6.2.7 → 6.2.8

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.
Files changed (58) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/cjs/cl.adobe.js +3 -3
  3. package/cjs/cl.airplay.js +3 -3
  4. package/cjs/cl.broadpeak.js +6 -6
  5. package/cjs/cl.cast.js +101 -101
  6. package/cjs/cl.conviva.js +31 -31
  7. package/cjs/cl.core.js +367 -366
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +68 -67
  10. package/cjs/cl.externs.js +30 -30
  11. package/cjs/cl.freewheel.js +23 -23
  12. package/cjs/cl.hls.js +44 -43
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +29 -29
  15. package/cjs/cl.ima.js +21 -21
  16. package/cjs/cl.mse.js +249 -249
  17. package/cjs/cl.muxdata.js +11 -11
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +13 -13
  20. package/cjs/cl.playlist.js +5 -5
  21. package/cjs/cl.smooth.js +68 -68
  22. package/cjs/cl.thumbnails.js +22 -22
  23. package/cjs/cl.tizen.js +68 -68
  24. package/cjs/cl.ttml.js +26 -26
  25. package/cjs/cl.verimatrix.js +5 -5
  26. package/cjs/cl.vimond.js +11 -11
  27. package/cjs/cl.vr.js +18 -18
  28. package/cjs/cl.vtt.js +14 -14
  29. package/cjs/cl.youbora.js +15 -15
  30. package/cl.adobe.js +3 -3
  31. package/cl.airplay.js +3 -3
  32. package/cl.broadpeak.js +5 -5
  33. package/cl.cast.js +81 -81
  34. package/cl.conviva.js +27 -27
  35. package/cl.core.js +326 -323
  36. package/cl.crypto.js +8 -8
  37. package/cl.dash.js +64 -62
  38. package/cl.externs.js +30 -30
  39. package/cl.freewheel.js +17 -17
  40. package/cl.hls.js +37 -36
  41. package/cl.hlssmpte.js +5 -5
  42. package/cl.htmlcue.js +24 -24
  43. package/cl.ima.js +14 -14
  44. package/cl.mse.js +218 -218
  45. package/cl.muxdata.js +9 -9
  46. package/cl.onboard.js +4 -4
  47. package/cl.persistent.js +9 -9
  48. package/cl.playlist.js +4 -4
  49. package/cl.smooth.js +57 -57
  50. package/cl.thumbnails.js +17 -17
  51. package/cl.tizen.js +57 -57
  52. package/cl.ttml.js +21 -21
  53. package/cl.verimatrix.js +4 -4
  54. package/cl.vimond.js +8 -8
  55. package/cl.vr.js +14 -14
  56. package/cl.vtt.js +12 -12
  57. package/cl.youbora.js +13 -13
  58. package/package.json +1 -1
package/cjs/cl.ima.js CHANGED
@@ -1,27 +1,27 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var QG="clpp.ima.AdsManagerFactory",X=function(a,b,c){this.a=a;this.f=a.getAdPodInfo();this.h=b;this.g=c},RG=function(){},SG=function(a){this.a=a},TG=function(a){this.l=a;this.j=a.getSurface().getMedia();a=this.l.getConfiguration();this.K=_.H.ya(a.ima||{});this.m=this.l.Zb("ima").Bc();this.J=this.l.Zb("ima").g;this.o=this.l.Zb("ima").a;this.G=new _.go;this.O=new _.D("clpp.ima");this.h=this.a=null;this.f=new _.Oh;this.D=!1;this.w=new _.Tf;this.T=new RG;this.A=null;this.I=this.C=this.L=this.B=!1;this.g=
3
- null;a=this.w;var b=google.ima.AdErrorEvent.Type.AD_ERROR;a.one(this.o,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.Ii.bind(this));a.on(this.o,b,this.Hi.bind(this));a.one(this.j,_.Uc,this.Qi.bind(this))},UG=function(a){var b=a.a,c=a.w,d=google.ima.AdEvent.Type;c.on(b,d.LOADED,a.qh.bind(a));c.on(b,d.CONTENT_PAUSE_REQUESTED,a.Ri.bind(a));c.on(b,d.STARTED,a.sh.bind(a));c.on(b,d.LOG,a.Bi.bind(a));c.on(b,d.AD_PROGRESS,a.Fi.bind(a));c.on(b,d.AD_BUFFERING,a.yi.bind(a));c.on(b,d.FIRST_QUARTILE,
4
- a.oh.bind(a));c.on(b,d.MIDPOINT,a.Ci.bind(a));c.on(b,d.THIRD_QUARTILE,a.th.bind(a));c.on(b,d.PAUSED,a.Ei.bind(a));c.on(b,d.RESUMED,a.Gi.bind(a));c.on(b,d.CLICK,a.nh.bind(a));c.on(b,d.SKIPPED,a.rh.bind(a));c.on(b,d.IMPRESSION,a.ph.bind(a));c.on(b,d.COMPLETE,a.zi.bind(a));c.on(b,d.CONTENT_RESUME_REQUESTED,a.Si.bind(a));c.on(b,d.ALL_ADS_COMPLETED,a.Ki.bind(a))},VG=function(a){a=a.K;var b=new google.ima.AdsRenderingSettings;b.restoreCustomPlaybackStateOnAdBreakComplete=!1;typeof a.bitrate===_.zd&&(b.bitrate=
5
- a.bitrate);b.enablePreloading=typeof a.enablePreloading===_.hc?a.enablePreloading:!0;typeof a.loadVideoTimeout===_.zd&&(b.loadVideoTimeout=a.loadVideoTimeout);Array.isArray(a.mimeTypes)&&(b.mimeTypes=a.mimeTypes);typeof a.playAdsAfterTime===_.zd&&(b.playAdsAfterTime=a.playAdsAfterTime);typeof a.useStyledLinearAds===_.hc&&(b.useStyledLinearAds=a.useStyledLinearAds);b.uiElements=Array.isArray(a.uiElements)?a.uiElements:[];return b},XG=function(a){a.A=null;WG(a,_.Ib);a.m&&a.l.getSurface().hide(a.m)},
6
- YG=function(a){_.om(a.j,{visibility:"visible"})},WG=function(a,b,c){c=c&&c.getAd();var d=null;c&&(d={ad:new X(c,a.B,a.L)});a.l.trigger(new _.E(b,d))},ZG=function(a,b){var c=b?a.T.create(b.getErrorCode()):null;a.l.onError(new _.J(1,9,10003,{errorType:c},b))},aH=function(a){var b,c;return _.z(function(d){if(1==d.a)return a.J.initialize(),b=!!a.l.getConfiguration().muted,_.v(d,a.G.canPlay(b),2);c=d.f;if(!c)return WG(a,_.ec),a.O.warn(_.ja),d["return"]();$G(a);_.w(d)})},bH=function(a,b){return _.z(function(c){if(1==
7
- c.a)return a.J.initialize(),_.v(c,b.play(),2);$G(a);_.w(c)})},$G=function(a){a.a.init(a.j.offsetWidth,a.j.offsetHeight,google.ima.ViewMode.NORMAL);a.a.start();a.D=!0},cH=function(){this.a=this.g=this.f=null},dH=function(){return!window.google||!google.ima||!google.ima.AdsLoader},eH=function(){},fH=function(){this.a=new _.D(QG)};_.h=X.prototype;_.h.mb=function(){return"Google IMA SDK"};_.h.nb=function(){return google.ima.VERSION};_.h.sb=function(){return 0};_.h.ba=function(){return this.a.getAdId()};
8
- _.h.getCreativeId=function(){return this.a.getCreativeId()};_.h.getApiFramework=function(){return this.a.getApiFramework()};_.h.getAdSystem=function(){return this.a.getAdSystem()};_.h.getAdvertiserName=function(){return this.a.getAdvertiserName()};_.h.getTitle=function(){return this.a.getTitle()};_.h.getDuration=function(){return this.a.getDuration()};_.h.getSkipTimeOffset=function(){return this.a.getSkipTimeOffset()};_.h.cc=function(){return this.f?this.f.getIsBumper():!1};
9
- _.h.Hb=function(){var a=null,b=this.a,c=Object.keys(b).find(function(d){return typeof b[d]===_.Ad&&typeof b[d].clickThroughUrl===_.le});c&&(a=b[c].clickThroughUrl);return a};_.h.getMediaUrl=function(){return this.a.getMediaUrl()};_.h.pb=function(){return this.a.getVastMediaWidth()};_.h.ob=function(){return this.a.getVastMediaHeight()};_.h.$a=function(){return this.a.getVastMediaBitrate()};_.h.Qa=function(){return this.g?2:this.h?1:0};_.h.getPodIndex=function(){return this.f?this.f.getPodIndex():0};
2
+ var f=function(window){var dH="clpp.ima.AdsManagerFactory",X=function(a,b,c){this.a=a;this.f=a.getAdPodInfo();this.h=b;this.g=c},eH=function(){},fH=function(a){this.a=a},gH=function(a){this.l=a;this.j=a.getSurface().getMedia();a=this.l.getConfiguration();this.K=_.H.ya(a.ima||{});this.m=this.l.Yb("ima").Ac();this.J=this.l.Yb("ima").g;this.o=this.l.Yb("ima").a;this.G=new _.oo;this.O=new _.D("clpp.ima");this.h=this.a=null;this.f=new _.Qh;this.D=!1;this.w=new _.Yf;this.T=new eH;this.A=null;this.I=this.C=this.M=this.B=!1;this.g=
3
+ null;a=this.w;var b=google.ima.AdErrorEvent.Type.AD_ERROR;a.one(this.o,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.Ii.bind(this));a.on(this.o,b,this.Hi.bind(this));a.one(this.j,_.Wc,this.Qi.bind(this))},hH=function(a){var b=a.a,c=a.w,d=google.ima.AdEvent.Type;c.on(b,d.LOADED,a.qh.bind(a));c.on(b,d.CONTENT_PAUSE_REQUESTED,a.Ri.bind(a));c.on(b,d.STARTED,a.sh.bind(a));c.on(b,d.LOG,a.Bi.bind(a));c.on(b,d.AD_PROGRESS,a.Fi.bind(a));c.on(b,d.AD_BUFFERING,a.yi.bind(a));c.on(b,d.FIRST_QUARTILE,
4
+ a.oh.bind(a));c.on(b,d.MIDPOINT,a.Ci.bind(a));c.on(b,d.THIRD_QUARTILE,a.th.bind(a));c.on(b,d.PAUSED,a.Ei.bind(a));c.on(b,d.RESUMED,a.Gi.bind(a));c.on(b,d.CLICK,a.nh.bind(a));c.on(b,d.SKIPPED,a.rh.bind(a));c.on(b,d.IMPRESSION,a.ph.bind(a));c.on(b,d.COMPLETE,a.zi.bind(a));c.on(b,d.CONTENT_RESUME_REQUESTED,a.Si.bind(a));c.on(b,d.ALL_ADS_COMPLETED,a.Ki.bind(a))},iH=function(a){a=a.K;var b=new google.ima.AdsRenderingSettings;b.restoreCustomPlaybackStateOnAdBreakComplete=!1;typeof a.bitrate===_.zd&&(b.bitrate=
5
+ a.bitrate);b.enablePreloading=typeof a.enablePreloading===_.ic?a.enablePreloading:!0;typeof a.loadVideoTimeout===_.zd&&(b.loadVideoTimeout=a.loadVideoTimeout);Array.isArray(a.mimeTypes)&&(b.mimeTypes=a.mimeTypes);typeof a.playAdsAfterTime===_.zd&&(b.playAdsAfterTime=a.playAdsAfterTime);typeof a.useStyledLinearAds===_.ic&&(b.useStyledLinearAds=a.useStyledLinearAds);b.uiElements=Array.isArray(a.uiElements)?a.uiElements:[];return b},kH=function(a){a.A=null;jH(a,_.Jb);a.m&&a.l.getSurface().hide(a.m)},
6
+ lH=function(a){_.wm(a.j,{visibility:"visible"})},jH=function(a,b,c){c=c&&c.getAd();var d=null;c&&(d={ad:new X(c,a.B,a.M)});a.l.trigger(new _.E(b,d))},mH=function(a,b){var c=b?a.T.create(b.getErrorCode()):null;a.l.onError(new _.J(1,9,10003,{errorType:c},b))},oH=function(a){var b,c;return _.z(function(d){if(1==d.a)return a.J.initialize(),b=!!a.l.getConfiguration().muted,_.v(d,a.G.canPlay(b),2);c=d.f;if(!c)return jH(a,_.fc),a.O.warn(_.ja),d["return"]();nH(a);_.w(d)})},pH=function(a,b){return _.z(function(c){if(1==
7
+ c.a)return a.J.initialize(),_.v(c,b.play(),2);nH(a);_.w(c)})},nH=function(a){a.a.init(a.j.offsetWidth,a.j.offsetHeight,google.ima.ViewMode.NORMAL);a.a.start();a.D=!0},qH=function(){this.a=this.g=this.f=null},rH=function(){return!window.google||!google.ima||!google.ima.AdsLoader},sH=function(){},tH=function(){this.a=new _.D(dH)};_.h=X.prototype;_.h.mb=function(){return"Google IMA SDK"};_.h.nb=function(){return google.ima.VERSION};_.h.sb=function(){return 0};_.h.ba=function(){return this.a.getAdId()};
8
+ _.h.getCreativeId=function(){return this.a.getCreativeId()};_.h.getApiFramework=function(){return this.a.getApiFramework()};_.h.getAdSystem=function(){return this.a.getAdSystem()};_.h.getAdvertiserName=function(){return this.a.getAdvertiserName()};_.h.getTitle=function(){return this.a.getTitle()};_.h.getDuration=function(){return this.a.getDuration()};_.h.getSkipTimeOffset=function(){return this.a.getSkipTimeOffset()};_.h.bc=function(){return this.f?this.f.getIsBumper():!1};
9
+ _.h.Hb=function(){var a=null,b=this.a,c=Object.keys(b).find(function(d){return typeof b[d]===_.Ad&&typeof b[d].clickThroughUrl===_.me});c&&(a=b[c].clickThroughUrl);return a};_.h.getMediaUrl=function(){return this.a.getMediaUrl()};_.h.pb=function(){return this.a.getVastMediaWidth()};_.h.ob=function(){return this.a.getVastMediaHeight()};_.h.ab=function(){return this.a.getVastMediaBitrate()};_.h.Qa=function(){return this.g?2:this.h?1:0};_.h.getPodIndex=function(){return this.f?this.f.getPodIndex():0};
10
10
  _.h.Ib=function(){return this.f?this.f.getTimeOffset():0};_.h.Jb=function(){return this.f?this.f.getAdPosition():1};_.h.rb=function(){return this.f?this.f.getTotalAds():1};_.h.getWrapperAdIds=function(){return this.a.getWrapperAdIds()};_.h.getWrapperAdSystems=function(){return this.a.getWrapperAdSystems()};_.h.getWrapperCreativeIds=function(){return this.a.getWrapperCreativeIds()};X.prototype.getWrapperCreativeIds=X.prototype.getWrapperCreativeIds;X.prototype.getWrapperAdSystems=X.prototype.getWrapperAdSystems;
11
- X.prototype.getWrapperAdIds=X.prototype.getWrapperAdIds;X.prototype.getSequenceLength=X.prototype.rb;X.prototype.getPositionInSequence=X.prototype.Jb;X.prototype.getPodTimeOffset=X.prototype.Ib;X.prototype.getPodIndex=X.prototype.getPodIndex;X.prototype.getPodType=X.prototype.Qa;X.prototype.getMediaBitrate=X.prototype.$a;X.prototype.getMediaHeight=X.prototype.ob;X.prototype.getMediaWidth=X.prototype.pb;X.prototype.getMediaUrl=X.prototype.getMediaUrl;X.prototype.getClickThroughUrl=X.prototype.Hb;
12
- X.prototype.isBumper=X.prototype.cc;X.prototype.getSkipTimeOffset=X.prototype.getSkipTimeOffset;X.prototype.getDuration=X.prototype.getDuration;X.prototype.getTitle=X.prototype.getTitle;X.prototype.getAdvertiserName=X.prototype.getAdvertiserName;X.prototype.getAdSystem=X.prototype.getAdSystem;X.prototype.getApiFramework=X.prototype.getApiFramework;X.prototype.getCreativeId=X.prototype.getCreativeId;X.prototype.getId=X.prototype.ba;X.prototype.getTechnology=X.prototype.sb;
13
- X.prototype.getAdManagerVersion=X.prototype.nb;X.prototype.getAdManagerName=X.prototype.mb;RG.prototype.create=function(a){var b=google.ima.AdError.ErrorCode;switch(a){case b.VAST_LOAD_TIMEOUT:case b.VAST_MEDIA_LOAD_TIMEOUT:case b.FAILED_TO_REQUEST_ADS:return 0;case b.VIDEO_PLAY_ERROR:return 1;default:return 2}};SG.prototype.getCuePoints=function(){return this.a};SG.prototype.Kb=function(){return 0<=this.a.indexOf(0)||0===this.a.length};SG.prototype.ab=function(){return 0<=this.a.indexOf(-1)};SG.prototype.hasPostroll=SG.prototype.ab;SG.prototype.hasPreroll=SG.prototype.Kb;SG.prototype.getCuePoints=SG.prototype.getCuePoints;_.h=TG.prototype;
14
- _.h.Ii=function(a){var b=this;this.a=a.getAdsManager(this.j,VG(this));this.a.isCustomPlaybackUsed()?(this.O.warn("IMA plugin does not work correctly right now on platforms with single video element. Disposing."),this.l.onError(new _.J(1,9,10002)),this.dispose()):(this.h=new _.eo(this.l.getSurface(),function(c,d,e){b.a.resize(c,d,e?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a=this.a.getCuePoints(),this.g=new SG(a),this.l.trigger(new _.E(_.Lb,{adsTimeline:this.g})),UG(this));this.f.resolve()};
15
- _.h.Hi=function(a){ZG(this,a.getError());this.f.resolve()};_.h.Ri=function(a){var b=this;return _.z(function(c){if(1==c.a)return b.C=!0,_.v(c,b.l.pause(),2);_.om(b.j,{visibility:_.$c});WG(b,_.tb,a);b.h.start();_.w(c)})};_.h.qh=function(a){a.getAd().isLinear()?WG(this,_.Ab,a):(this.a.discardAdBreak(),this.B||(this.B=!0,this.l.play()))};_.h.sh=function(a){this.A=a.getAd().getDuration();WG(this,_.Hb,a);this.l.getSurface().show(this.m)};_.h.Bi=function(a){a=a.getAdData();ZG(this,a?a.adError:null);XG(this)};
16
- _.h.Fi=function(a){WG(this,_.Eb,a)};_.h.yi=function(a){WG(this,_.vb,a)};_.h.oh=function(a){WG(this,_.yb,a)};_.h.Ci=function(a){WG(this,_.Cb,a)};_.h.th=function(a){WG(this,_.Jb,a)};_.h.Ei=function(a){WG(this,_.Db,a)};_.h.Gi=function(a){WG(this,_.Fb,a)};_.h.nh=function(a){this.pause();WG(this,_.wb,a)};_.h.rh=function(a){WG(this,_.Gb,a);XG(this)};_.h.ph=function(a){WG(this,_.zb,a)};_.h.zi=function(a){WG(this,_.xb,a);XG(this)};
17
- _.h.Si=function(){this.B=!0;if(!this.C)return this.l.play();this.C=!1;this.h.stop();this.l.isEnded()||this.l.play();WG(this,_.ub);YG(this)};_.h.Ki=function(){this.I=!0};_.h.Qi=function(){this.L=!0;this.o.contentComplete()};
18
- _.h.load=function(){var a=this,b,c,d,e,f;return _.z(function(g){if(1==g.a){b=a.l;c=a.K;try{if(typeof c.adTagUrl!==_.le)throw new _.J(1,9,10001,{missingKeys:"adTagUrl"});}catch(k){return b.onError(k),a.f.resolve(),g["return"](a.f)}return c.adTagUrl?_.v(g,a.G.canPlay(!1),2):(a.f.resolve(),g["return"](a.f))}if(3!=g.a)return d=g.f,_.v(g,a.G.canPlay(!0),3);e=g.f;f=new google.ima.AdsRequest;f.adTagUrl=c.adTagUrl;f.setAdWillAutoPlay(d);f.setAdWillPlayMuted(e);a.o.requestAds(f);return g["return"](a.f)})};
19
- _.h.start=function(a){var b=this;return _.z(function(c){return b.a&&b.g&&!b.D?b.g.Kb()?_.v(c,aH(b),0):_.v(c,bH(b,a),0):_.v(c,a.play(),0)})};_.h.resume=function(){this.a&&this.a.resume()};_.h.pause=function(){this.a&&this.a.pause()};_.h.skip=function(){this.a&&this.a.skip()};_.h.getVolume=function(){return this.a?this.a.getVolume():1};_.h.setVolume=function(a){this.a&&this.a.setVolume(a)};
11
+ X.prototype.getWrapperAdIds=X.prototype.getWrapperAdIds;X.prototype.getSequenceLength=X.prototype.rb;X.prototype.getPositionInSequence=X.prototype.Jb;X.prototype.getPodTimeOffset=X.prototype.Ib;X.prototype.getPodIndex=X.prototype.getPodIndex;X.prototype.getPodType=X.prototype.Qa;X.prototype.getMediaBitrate=X.prototype.ab;X.prototype.getMediaHeight=X.prototype.ob;X.prototype.getMediaWidth=X.prototype.pb;X.prototype.getMediaUrl=X.prototype.getMediaUrl;X.prototype.getClickThroughUrl=X.prototype.Hb;
12
+ X.prototype.isBumper=X.prototype.bc;X.prototype.getSkipTimeOffset=X.prototype.getSkipTimeOffset;X.prototype.getDuration=X.prototype.getDuration;X.prototype.getTitle=X.prototype.getTitle;X.prototype.getAdvertiserName=X.prototype.getAdvertiserName;X.prototype.getAdSystem=X.prototype.getAdSystem;X.prototype.getApiFramework=X.prototype.getApiFramework;X.prototype.getCreativeId=X.prototype.getCreativeId;X.prototype.getId=X.prototype.ba;X.prototype.getTechnology=X.prototype.sb;
13
+ X.prototype.getAdManagerVersion=X.prototype.nb;X.prototype.getAdManagerName=X.prototype.mb;eH.prototype.create=function(a){var b=google.ima.AdError.ErrorCode;switch(a){case b.VAST_LOAD_TIMEOUT:case b.VAST_MEDIA_LOAD_TIMEOUT:case b.FAILED_TO_REQUEST_ADS:return 0;case b.VIDEO_PLAY_ERROR:return 1;default:return 2}};fH.prototype.getCuePoints=function(){return this.a};fH.prototype.Kb=function(){return 0<=this.a.indexOf(0)||0===this.a.length};fH.prototype.bb=function(){return 0<=this.a.indexOf(-1)};fH.prototype.hasPostroll=fH.prototype.bb;fH.prototype.hasPreroll=fH.prototype.Kb;fH.prototype.getCuePoints=fH.prototype.getCuePoints;_.h=gH.prototype;
14
+ _.h.Ii=function(a){var b=this;this.a=a.getAdsManager(this.j,iH(this));this.a.isCustomPlaybackUsed()?(this.O.warn("IMA plugin does not work correctly right now on platforms with single video element. Disposing."),this.l.onError(new _.J(1,9,10002)),this.dispose()):(this.h=new _.mo(this.l.getSurface(),function(c,d,e){b.a.resize(c,d,e?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a=this.a.getCuePoints(),this.g=new fH(a),this.l.trigger(new _.E(_.Mb,{adsTimeline:this.g})),hH(this));this.f.resolve()};
15
+ _.h.Hi=function(a){mH(this,a.getError());this.f.resolve()};_.h.Ri=function(a){var b=this;return _.z(function(c){if(1==c.a)return b.C=!0,_.v(c,b.l.pause(),2);_.wm(b.j,{visibility:_.ad});jH(b,_.vb,a);b.h.start();_.w(c)})};_.h.qh=function(a){a.getAd().isLinear()?jH(this,_.Cb,a):(this.a.discardAdBreak(),this.B||(this.B=!0,this.l.play()))};_.h.sh=function(a){this.A=a.getAd().getDuration();jH(this,_.Ib,a);this.l.getSurface().show(this.m)};_.h.Bi=function(a){a=a.getAdData();mH(this,a?a.adError:null);kH(this)};
16
+ _.h.Fi=function(a){jH(this,_.Fb,a)};_.h.yi=function(a){jH(this,_.xb,a)};_.h.oh=function(a){jH(this,_.Ab,a)};_.h.Ci=function(a){jH(this,_.Db,a)};_.h.th=function(a){jH(this,_.Kb,a)};_.h.Ei=function(a){jH(this,_.Eb,a)};_.h.Gi=function(a){jH(this,_.Gb,a)};_.h.nh=function(a){this.pause();jH(this,_.yb,a)};_.h.rh=function(a){jH(this,_.Hb,a);kH(this)};_.h.ph=function(a){jH(this,_.Bb,a)};_.h.zi=function(a){jH(this,_.zb,a);kH(this)};
17
+ _.h.Si=function(){this.B=!0;if(!this.C)return this.l.play();this.C=!1;this.h.stop();this.l.isEnded()||this.l.play();jH(this,_.wb);lH(this)};_.h.Ki=function(){this.I=!0};_.h.Qi=function(){this.M=!0;this.o.contentComplete()};
18
+ _.h.load=function(){var a=this,b,c,d,e,f;return _.z(function(g){if(1==g.a){b=a.l;c=a.K;try{if(typeof c.adTagUrl!==_.me)throw new _.J(1,9,10001,{missingKeys:"adTagUrl"});}catch(k){return b.onError(k),a.f.resolve(),g["return"](a.f)}return c.adTagUrl?_.v(g,a.G.canPlay(!1),2):(a.f.resolve(),g["return"](a.f))}if(3!=g.a)return d=g.f,_.v(g,a.G.canPlay(!0),3);e=g.f;f=new google.ima.AdsRequest;f.adTagUrl=c.adTagUrl;f.setAdWillAutoPlay(d);f.setAdWillPlayMuted(e);a.o.requestAds(f);return g["return"](a.f)})};
19
+ _.h.start=function(a){var b=this;return _.z(function(c){return b.a&&b.g&&!b.D?b.g.Kb()?_.v(c,oH(b),0):_.v(c,pH(b,a),0):_.v(c,a.play(),0)})};_.h.resume=function(){this.a&&this.a.resume()};_.h.pause=function(){this.a&&this.a.pause()};_.h.skip=function(){this.a&&this.a.skip()};_.h.getVolume=function(){return this.a?this.a.getVolume():1};_.h.setVolume=function(a){this.a&&this.a.setVolume(a)};
20
20
  _.h.getPosition=function(){if(!this.a||null===this.A)return-1;var a=this.a.getRemainingTime();return 0>a?0:this.A-a};
21
- _.h.dispose=function(){var a=this;return(new Promise(function(b){a.D&&a.g&&a.g.ab()&&!a.I?(a.w.one(a.a,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(){b();a.m&&a.l.getSurface().hide(a.m)}),_.Vf(a.w,a.a,[google.ima.AdEvent.Type.LOADED,google.ima.AdEvent.Type.STARTED],function(){a.a&&a.a.discardAdBreak()})):b();a.a.discardAdBreak();a.o.contentComplete()})).then(function(){YG(a);a.w.release();a.h&&(a.h.stop(),a.h=null);a.a&&(a.a.destroy(),a.a=null)})};TG.prototype.getPosition=TG.prototype.getPosition;
22
- TG.prototype.setVolume=TG.prototype.setVolume;TG.prototype.getVolume=TG.prototype.getVolume;TG.prototype.skip=TG.prototype.skip;TG.prototype.pause=TG.prototype.pause;TG.prototype.resume=TG.prototype.resume;_.u(cH,_.To);_.h=cH.prototype;_.h.onPlayerCreated=function(a){if(dH())return a.onError(new _.J(1,9,1E4));this.f=_.hm(_.Lc,{"class":"clpp-ima clpp-hidden"});a.getSurface().addElementToContainer(this.f);this.g=new google.ima.AdDisplayContainer(this.f,a.getSurface().getMedia());this.a=new google.ima.AdsLoader(this.g);this.a.getSettings().setPlayerType(_.na);this.a.getSettings().setPlayerVersion(_.da);this.a.getSettings().setAutoPlayAdBreaks(!0)};
23
- _.h.onPlayerWillDestroy=function(a){this.a&&(this.a.destroy(),this.a=null);this.g&&(this.g.destroy(),this.g=null);this.f&&(a.getSurface().removeElementFromContainer(this.f),this.f=null)};_.h.fi=function(){return this.a};_.h.di=function(){return this.g};_.h.Bc=function(){return this.f};_.h.id=function(){return"ima"};_.A("clpp.ima.ImaPlugin",cH);cH.prototype.getAdContainer=cH.prototype.Bc;cH.prototype.getAdDisplayContainer=cH.prototype.di;cH.prototype.getAdsLoader=cH.prototype.fi;cH.Id="ima";
24
- cH.isSdkMissing=dH;eH.prototype.create=function(){return new cH};_.gn(new eH);fH.prototype.name=function(){return QG};fH.prototype.W=function(a,b){return a.namespace()===_.wc?!1:dH()?(this.a.warn("IMA SDK is not loaded."),!1):!(!b||!b.ima)};fH.prototype.create=function(a){return new TG(a)};fH.prototype.create=fH.prototype.create;fH.prototype.isSupported=fH.prototype.W;fH.prototype.name=fH.prototype.name;_.em(new fH);};
21
+ _.h.dispose=function(){var a=this;return(new Promise(function(b){a.D&&a.g&&a.g.bb()&&!a.I?(a.w.one(a.a,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(){b();a.m&&a.l.getSurface().hide(a.m)}),_.Zf(a.w,a.a,[google.ima.AdEvent.Type.LOADED,google.ima.AdEvent.Type.STARTED],function(){a.a&&a.a.discardAdBreak()})):b();a.a.discardAdBreak();a.o.contentComplete()})).then(function(){lH(a);a.w.release();a.h&&(a.h.stop(),a.h=null);a.a&&(a.a.destroy(),a.a=null)})};gH.prototype.getPosition=gH.prototype.getPosition;
22
+ gH.prototype.setVolume=gH.prototype.setVolume;gH.prototype.getVolume=gH.prototype.getVolume;gH.prototype.skip=gH.prototype.skip;gH.prototype.pause=gH.prototype.pause;gH.prototype.resume=gH.prototype.resume;_.u(qH,_.ap);_.h=qH.prototype;_.h.onPlayerCreated=function(a){if(rH())return a.onError(new _.J(1,9,1E4));this.f=_.um(_.Mc,{"class":"clpp-ima clpp-hidden"});a.getSurface().addElementToContainer(this.f);this.g=new google.ima.AdDisplayContainer(this.f,a.getSurface().getMedia());this.a=new google.ima.AdsLoader(this.g);this.a.getSettings().setPlayerType(_.na);this.a.getSettings().setPlayerVersion(_.ea);this.a.getSettings().setAutoPlayAdBreaks(!0)};
23
+ _.h.onPlayerWillDestroy=function(a){this.a&&(this.a.destroy(),this.a=null);this.g&&(this.g.destroy(),this.g=null);this.f&&(a.getSurface().removeElementFromContainer(this.f),this.f=null)};_.h.fi=function(){return this.a};_.h.di=function(){return this.g};_.h.Ac=function(){return this.f};_.h.id=function(){return"ima"};_.A("clpp.ima.ImaPlugin",qH);qH.prototype.getAdContainer=qH.prototype.Ac;qH.prototype.getAdDisplayContainer=qH.prototype.di;qH.prototype.getAdsLoader=qH.prototype.fi;qH.Id="ima";
24
+ qH.isSdkMissing=rH;sH.prototype.create=function(){return new qH};_.pn(new sH);tH.prototype.name=function(){return dH};tH.prototype.W=function(a,b){return a.namespace()===_.xc?!1:rH()?(this.a.warn("IMA SDK is not loaded."),!1):!(!b||!b.ima)};tH.prototype.create=function(a){return new gH(a)};tH.prototype.create=tH.prototype.create;tH.prototype.isSupported=tH.prototype.W;tH.prototype.name=tH.prototype.name;_.rm(new tH);};
25
25
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
26
26
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
27
27
  else{_=this.clpp._;(f.call(g,this));}