@castlabs/prestoplay 6.4.1 → 6.5.0

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 +35 -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 +110 -110
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +419 -416
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +72 -72
  10. package/cjs/cl.externs.js +26 -26
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +47 -47
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +31 -31
  15. package/cjs/cl.ima.js +22 -22
  16. package/cjs/cl.mse.js +258 -255
  17. package/cjs/cl.muxdata.js +12 -12
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +14 -14
  20. package/cjs/cl.playlist.js +6 -6
  21. package/cjs/cl.smooth.js +69 -69
  22. package/cjs/cl.thumbnails.js +24 -24
  23. package/cjs/cl.tizen.js +71 -71
  24. package/cjs/cl.ttml.js +27 -27
  25. package/cjs/cl.verimatrix.js +5 -5
  26. package/cjs/cl.vimond.js +13 -13
  27. package/cjs/cl.vr.js +19 -18
  28. package/cjs/cl.vtt.js +14 -14
  29. package/cjs/cl.youbora.js +20 -20
  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 +88 -88
  34. package/cl.conviva.js +27 -27
  35. package/cl.core.js +354 -351
  36. package/cl.crypto.js +8 -8
  37. package/cl.dash.js +66 -66
  38. package/cl.externs.js +26 -26
  39. package/cl.freewheel.js +19 -19
  40. package/cl.hls.js +40 -39
  41. package/cl.hlssmpte.js +5 -5
  42. package/cl.htmlcue.js +25 -25
  43. package/cl.ima.js +16 -16
  44. package/cl.mse.js +230 -231
  45. package/cl.muxdata.js +8 -8
  46. package/cl.onboard.js +4 -4
  47. package/cl.persistent.js +9 -9
  48. package/cl.playlist.js +5 -5
  49. package/cl.smooth.js +58 -58
  50. package/cl.thumbnails.js +17 -17
  51. package/cl.tizen.js +57 -57
  52. package/cl.ttml.js +22 -22
  53. package/cl.verimatrix.js +4 -4
  54. package/cl.vimond.js +8 -8
  55. package/cl.vr.js +15 -14
  56. package/cl.vtt.js +12 -12
  57. package/cl.youbora.js +15 -16
  58. package/package.json +6 -2
package/cjs/cl.ima.js CHANGED
@@ -1,27 +1,27 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var qI="clpp.ima.AdsManagerFactory",rI=function(a,b,c){this.a=a;this.f=a.getAdPodInfo();this.h=b;this.g=c},sI=function(){},tI=function(a){this.a=a},uI=function(a){this.l=a;this.j=a.getSurface().getMedia();a=this.l.getConfiguration();this.K=_.J.Ma(a.ima||{});this.m=this.l.$b("ima").Dc();this.J=this.l.$b("ima").g;this.o=this.l.$b("ima").a;this.G=new _.rp;this.O=new _.H("clpp.ima");this.h=this.a=null;this.f=new _.Mh;this.D=!1;this.w=new _.cg;this.S=new sI;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.Oi.bind(this));a.on(this.o,b,this.Ni.bind(this));a.one(this.j,_.ed,this.Vi.bind(this))},vI=function(a){var b=a.a,c=a.w,d=google.ima.AdEvent.Type;c.on(b,d.LOADED,a.ph.bind(a));c.on(b,d.CONTENT_PAUSE_REQUESTED,a.Wi.bind(a));c.on(b,d.STARTED,a.rh.bind(a));c.on(b,d.LOG,a.Hi.bind(a));c.on(b,d.AD_PROGRESS,a.Li.bind(a));c.on(b,d.AD_BUFFERING,a.Ei.bind(a));c.on(b,d.FIRST_QUARTILE,
4
- a.nh.bind(a));c.on(b,d.MIDPOINT,a.Ii.bind(a));c.on(b,d.THIRD_QUARTILE,a.sh.bind(a));c.on(b,d.PAUSED,a.Ki.bind(a));c.on(b,d.RESUMED,a.Mi.bind(a));c.on(b,d.CLICK,a.mh.bind(a));c.on(b,d.SKIPPED,a.qh.bind(a));c.on(b,d.IMPRESSION,a.oh.bind(a));c.on(b,d.COMPLETE,a.Fi.bind(a));c.on(b,d.CONTENT_RESUME_REQUESTED,a.Xi.bind(a));c.on(b,d.ALL_ADS_COMPLETED,a.Qi.bind(a))},wI=function(a){a=a.K;var b=new google.ima.AdsRenderingSettings;b.restoreCustomPlaybackStateOnAdBreakComplete=!1;typeof a.bitrate===_.k&&(b.bitrate=
5
- a.bitrate);b.enablePreloading=typeof a.enablePreloading===_.rc?a.enablePreloading:!0;typeof a.loadVideoTimeout===_.k&&(b.loadVideoTimeout=a.loadVideoTimeout);Array.isArray(a.mimeTypes)&&(b.mimeTypes=a.mimeTypes);typeof a.playAdsAfterTime===_.k&&(b.playAdsAfterTime=a.playAdsAfterTime);typeof a.useStyledLinearAds===_.rc&&(b.useStyledLinearAds=a.useStyledLinearAds);b.uiElements=Array.isArray(a.uiElements)?a.uiElements:[];return b},yI=function(a){a.A=null;xI(a,_.Tb);a.m&&a.l.getSurface().hide(a.m)},zI=
6
- function(a){_.zn(a.j,{visibility:"visible"})},xI=function(a,b,c){c=c&&c.getAd();var d=null;c&&(d={ad:new rI(c,a.B,a.L)});a.l.trigger(new _.I(b,d))},AI=function(a,b){var c=b?a.S.create(b.getErrorCode()):null;a.l.onError(new _.L(1,9,10003,{errorType:c},b))},CI=function(a){var b,c;return _.A(function(d){if(1==d.a)return a.J.initialize(),b=!!a.l.getConfiguration().muted,_.y(d,a.G.canPlay(b),2);c=d.f;if(!c)return xI(a,_.pc),a.O.warn(_.ma),d["return"]();BI(a);_.z(d)})},DI=function(a,b){return _.A(function(c){if(1==
7
- c.a)return a.J.initialize(),_.y(c,b.play(),2);BI(a);_.z(c)})},BI=function(a){a.a.init(a.j.offsetWidth,a.j.offsetHeight,google.ima.ViewMode.NORMAL);a.a.start();a.D=!0},EI=function(){this.a=this.g=this.f=null},FI=function(){return!window.google||!google.ima||!google.ima.AdsLoader},GI=function(){},HI=function(){this.a=new _.H(qI)};_.t=rI.prototype;_.t.sb=function(){return"Google IMA SDK"};_.t.tb=function(){return google.ima.VERSION};_.t.yb=function(){return 0};_.t.getId=function(){return this.a.getAdId()};
8
- _.t.getCreativeId=function(){return this.a.getCreativeId()};_.t.getApiFramework=function(){return this.a.getApiFramework()};_.t.getAdSystem=function(){return this.a.getAdSystem()};_.t.getAdvertiserName=function(){return this.a.getAdvertiserName()};_.t.getTitle=function(){return this.a.getTitle()};_.t.getDuration=function(){return this.a.getDuration()};_.t.getSkipTimeOffset=function(){return this.a.getSkipTimeOffset()};_.t.dc=function(){return this.f?this.f.getIsBumper():!1};
9
- _.t.Ib=function(){var a=null,b=this.a,c=Object.keys(b).find(function(d){return typeof b[d]===_.Id&&typeof b[d].clickThroughUrl===_.te});c&&(a=b[c].clickThroughUrl);return a};_.t.getMediaUrl=function(){return this.a.getMediaUrl()};_.t.vb=function(){return this.a.getVastMediaWidth()};_.t.ub=function(){return this.a.getVastMediaHeight()};_.t.gb=function(){return this.a.getVastMediaBitrate()};_.t.Ua=function(){return this.g?2:this.h?1:0};_.t.getPodIndex=function(){return this.f?this.f.getPodIndex():0};
10
- _.t.Jb=function(){return this.f?this.f.getTimeOffset():0};_.t.Kb=function(){return this.f?this.f.getAdPosition():1};_.t.xb=function(){return this.f?this.f.getTotalAds():1};_.t.getWrapperAdIds=function(){return this.a.getWrapperAdIds()};_.t.getWrapperAdSystems=function(){return this.a.getWrapperAdSystems()};_.t.getWrapperCreativeIds=function(){return this.a.getWrapperCreativeIds()};rI.prototype.getWrapperCreativeIds=rI.prototype.getWrapperCreativeIds;rI.prototype.getWrapperAdSystems=rI.prototype.getWrapperAdSystems;
11
- rI.prototype.getWrapperAdIds=rI.prototype.getWrapperAdIds;rI.prototype.getSequenceLength=rI.prototype.xb;rI.prototype.getPositionInSequence=rI.prototype.Kb;rI.prototype.getPodTimeOffset=rI.prototype.Jb;rI.prototype.getPodIndex=rI.prototype.getPodIndex;rI.prototype.getPodType=rI.prototype.Ua;rI.prototype.getMediaBitrate=rI.prototype.gb;rI.prototype.getMediaHeight=rI.prototype.ub;rI.prototype.getMediaWidth=rI.prototype.vb;rI.prototype.getMediaUrl=rI.prototype.getMediaUrl;
12
- rI.prototype.getClickThroughUrl=rI.prototype.Ib;rI.prototype.isBumper=rI.prototype.dc;rI.prototype.getSkipTimeOffset=rI.prototype.getSkipTimeOffset;rI.prototype.getDuration=rI.prototype.getDuration;rI.prototype.getTitle=rI.prototype.getTitle;rI.prototype.getAdvertiserName=rI.prototype.getAdvertiserName;rI.prototype.getAdSystem=rI.prototype.getAdSystem;rI.prototype.getApiFramework=rI.prototype.getApiFramework;rI.prototype.getCreativeId=rI.prototype.getCreativeId;rI.prototype.getId=rI.prototype.getId;
13
- rI.prototype.getTechnology=rI.prototype.yb;rI.prototype.getAdManagerVersion=rI.prototype.tb;rI.prototype.getAdManagerName=rI.prototype.sb;sI.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}};tI.prototype.getCuePoints=function(){return this.a};tI.prototype.Lb=function(){return 0<=this.a.indexOf(0)||0===this.a.length};tI.prototype.hb=function(){return 0<=this.a.indexOf(-1)};tI.prototype.hasPostroll=tI.prototype.hb;tI.prototype.hasPreroll=tI.prototype.Lb;tI.prototype.getCuePoints=tI.prototype.getCuePoints;_.t=uI.prototype;
14
- _.t.Oi=function(a){var b=this;this.a=a.getAdsManager(this.j,wI(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 _.L(1,9,10002)),this.dispose()):(this.h=new _.pp(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 tI(a),this.l.trigger(new _.I(_.Wb,{adsTimeline:this.g})),vI(this));this.f.resolve()};
15
- _.t.Ni=function(a){AI(this,a.getError());this.f.resolve()};_.t.Wi=function(a){var b=this;return _.A(function(c){if(1==c.a)return b.C=!0,_.y(c,b.l.pause(),2);_.zn(b.j,{visibility:_.jd});xI(b,_.Fb,a);b.h.start();_.z(c)})};_.t.ph=function(a){a.getAd().isLinear()?xI(this,_.Mb,a):(this.a.discardAdBreak(),this.B||(this.B=!0,this.l.play()))};_.t.rh=function(a){this.A=a.getAd().getDuration();xI(this,_.Sb,a);this.l.getSurface().show(this.m)};_.t.Hi=function(a){a=a.getAdData();AI(this,a?a.adError:null);yI(this)};
16
- _.t.Li=function(a){xI(this,_.Pb,a)};_.t.Ei=function(a){xI(this,_.Hb,a)};_.t.nh=function(a){xI(this,_.Kb,a)};_.t.Ii=function(a){xI(this,_.Nb,a)};_.t.sh=function(a){xI(this,_.Ub,a)};_.t.Ki=function(a){xI(this,_.Ob,a)};_.t.Mi=function(a){xI(this,_.Qb,a)};_.t.mh=function(a){this.pause();xI(this,_.Ib,a)};_.t.qh=function(a){xI(this,_.Rb,a);yI(this)};_.t.oh=function(a){xI(this,_.Lb,a)};_.t.Fi=function(a){xI(this,_.Jb,a);yI(this)};
17
- _.t.Xi=function(){this.B=!0;if(!this.C)return this.l.play();this.C=!1;this.h.stop();this.l.isEnded()||this.l.play();xI(this,_.Gb);zI(this)};_.t.Qi=function(){this.I=!0};_.t.Vi=function(){this.L=!0;this.o.contentComplete()};
18
- _.t.load=function(){var a=this,b,c,d,e,f;return _.A(function(g){if(1==g.a){b=a.l;c=a.K;try{if(typeof c.adTagUrl!==_.te)throw new _.L(1,9,10001,{missingKeys:"adTagUrl"});}catch(h){return b.onError(h),a.f.resolve(),g["return"](a.f)}return c.adTagUrl?_.y(g,a.G.canPlay(!1),2):(a.f.resolve(),g["return"](a.f))}if(3!=g.a)return d=g.f,_.y(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
- _.t.start=function(a){var b=this;return _.A(function(c){return b.a&&b.g&&!b.D?b.g.Lb()?_.y(c,CI(b),0):_.y(c,DI(b,a),0):_.y(c,a.play(),0)})};_.t.resume=function(){this.a&&this.a.resume()};_.t.pause=function(){this.a&&this.a.pause()};_.t.skip=function(){this.a&&this.a.skip()};_.t.getVolume=function(){return this.a?this.a.getVolume():1};_.t.setVolume=function(a){this.a&&this.a.setVolume(a)};
2
+ var f=function(window){var vI="clpp.ima.AdsManagerFactory",wI=function(a,b,c){this.a=a;this.f=a.getAdPodInfo();this.h=b;this.g=c},xI=function(){},yI=function(a){this.a=a},zI=function(a){this.l=a;this.j=a.getSurface().getMedia();a=this.l.getConfiguration();this.L=_.K.Na(a.ima||{});this.m=this.l.bc("ima").Fc();this.K=this.l.bc("ima").g;this.o=this.l.bc("ima").a;this.I=new _.tp;this.R=new _.H("clpp.ima");this.h=this.a=null;this.f=new _.Nh;this.F=!1;this.w=new _.dg;this.T=new xI;this.A=null;this.J=this.D=this.N=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.Pi.bind(this));a.on(this.o,b,this.Oi.bind(this));a.one(this.j,_.fd,this.Wi.bind(this))},AI=function(a){var b=a.a,c=a.w,d=google.ima.AdEvent.Type;c.on(b,d.LOADED,a.sh.bind(a));c.on(b,d.CONTENT_PAUSE_REQUESTED,a.Xi.bind(a));c.on(b,d.STARTED,a.uh.bind(a));c.on(b,d.LOG,a.Ii.bind(a));c.on(b,d.AD_PROGRESS,a.Mi.bind(a));c.on(b,d.AD_BUFFERING,a.Fi.bind(a));c.on(b,d.FIRST_QUARTILE,
4
+ a.qh.bind(a));c.on(b,d.MIDPOINT,a.Ji.bind(a));c.on(b,d.THIRD_QUARTILE,a.vh.bind(a));c.on(b,d.PAUSED,a.Li.bind(a));c.on(b,d.RESUMED,a.Ni.bind(a));c.on(b,d.CLICK,a.ph.bind(a));c.on(b,d.SKIPPED,a.th.bind(a));c.on(b,d.IMPRESSION,a.rh.bind(a));c.on(b,d.COMPLETE,a.Gi.bind(a));c.on(b,d.CONTENT_RESUME_REQUESTED,a.Yi.bind(a));c.on(b,d.ALL_ADS_COMPLETED,a.Ri.bind(a))},BI=function(a){a=a.L;var b=new google.ima.AdsRenderingSettings;b.restoreCustomPlaybackStateOnAdBreakComplete=!1;typeof a.bitrate===_.k&&(b.bitrate=
5
+ a.bitrate);b.enablePreloading=typeof a.enablePreloading===_.rc?a.enablePreloading:!0;typeof a.loadVideoTimeout===_.k&&(b.loadVideoTimeout=a.loadVideoTimeout);Array.isArray(a.mimeTypes)&&(b.mimeTypes=a.mimeTypes);typeof a.playAdsAfterTime===_.k&&(b.playAdsAfterTime=a.playAdsAfterTime);typeof a.useStyledLinearAds===_.rc&&(b.useStyledLinearAds=a.useStyledLinearAds);b.uiElements=Array.isArray(a.uiElements)?a.uiElements:[];return b},DI=function(a){a.A=null;CI(a,_.Tb);a.m&&a.l.getSurface().hide(a.m)},EI=
6
+ function(a){_.Bn(a.j,{visibility:"visible"})},CI=function(a,b,c){c=c&&c.getAd();var d=null;c&&(d={ad:new wI(c,a.B,a.N)});a.l.trigger(new _.J(b,d))},FI=function(a,b){var c=b?a.T.create(b.getErrorCode()):null;a.l.onError(new _.L(1,9,10003,{errorType:c},b))},HI=function(a){var b,c;return _.B(function(d){if(1==d.a)return a.K.initialize(),b=!!a.l.getConfiguration().muted,_.x(d,a.I.canPlay(b),2);c=d.f;if(!c)return CI(a,_.pc),a.R.warn(_.ma),d["return"]();GI(a);_.z(d)})},II=function(a,b){return _.B(function(c){if(1==
7
+ c.a)return a.K.initialize(),_.x(c,b.play(),2);GI(a);_.z(c)})},GI=function(a){a.a.init(a.j.offsetWidth,a.j.offsetHeight,google.ima.ViewMode.NORMAL);a.a.start();a.F=!0},JI=function(){this.a=this.g=this.f=null},KI=function(){return!window.google||!google.ima||!google.ima.AdsLoader},LI=function(){},MI=function(){this.a=new _.H(vI)};_.t=wI.prototype;_.t.sb=function(){return"Google IMA SDK"};_.t.tb=function(){return google.ima.VERSION};_.t.yb=function(){return 0};_.t.getId=function(){return this.a.getAdId()};
8
+ _.t.getCreativeId=function(){return this.a.getCreativeId()};_.t.getApiFramework=function(){return this.a.getApiFramework()};_.t.getAdSystem=function(){return this.a.getAdSystem()};_.t.getAdvertiserName=function(){return this.a.getAdvertiserName()};_.t.getTitle=function(){return this.a.getTitle()};_.t.getDuration=function(){return this.a.getDuration()};_.t.getSkipTimeOffset=function(){return this.a.getSkipTimeOffset()};_.t.fc=function(){return this.f?this.f.getIsBumper():!1};
9
+ _.t.Kb=function(){var a=null,b=this.a,c=Object.keys(b).find(function(d){return typeof b[d]===_.Jd&&typeof b[d].clickThroughUrl===_.ue});c&&(a=b[c].clickThroughUrl);return a};_.t.getMediaUrl=function(){return this.a.getMediaUrl()};_.t.vb=function(){return this.a.getVastMediaWidth()};_.t.ub=function(){return this.a.getVastMediaHeight()};_.t.hb=function(){return this.a.getVastMediaBitrate()};_.t.Va=function(){return this.g?2:this.h?1:0};_.t.getPodIndex=function(){return this.f?this.f.getPodIndex():0};
10
+ _.t.Lb=function(){return this.f?this.f.getTimeOffset():0};_.t.Mb=function(){return this.f?this.f.getAdPosition():1};_.t.xb=function(){return this.f?this.f.getTotalAds():1};_.t.getWrapperAdIds=function(){return this.a.getWrapperAdIds()};_.t.getWrapperAdSystems=function(){return this.a.getWrapperAdSystems()};_.t.getWrapperCreativeIds=function(){return this.a.getWrapperCreativeIds()};wI.prototype.getWrapperCreativeIds=wI.prototype.getWrapperCreativeIds;wI.prototype.getWrapperAdSystems=wI.prototype.getWrapperAdSystems;
11
+ wI.prototype.getWrapperAdIds=wI.prototype.getWrapperAdIds;wI.prototype.getSequenceLength=wI.prototype.xb;wI.prototype.getPositionInSequence=wI.prototype.Mb;wI.prototype.getPodTimeOffset=wI.prototype.Lb;wI.prototype.getPodIndex=wI.prototype.getPodIndex;wI.prototype.getPodType=wI.prototype.Va;wI.prototype.getMediaBitrate=wI.prototype.hb;wI.prototype.getMediaHeight=wI.prototype.ub;wI.prototype.getMediaWidth=wI.prototype.vb;wI.prototype.getMediaUrl=wI.prototype.getMediaUrl;
12
+ wI.prototype.getClickThroughUrl=wI.prototype.Kb;wI.prototype.isBumper=wI.prototype.fc;wI.prototype.getSkipTimeOffset=wI.prototype.getSkipTimeOffset;wI.prototype.getDuration=wI.prototype.getDuration;wI.prototype.getTitle=wI.prototype.getTitle;wI.prototype.getAdvertiserName=wI.prototype.getAdvertiserName;wI.prototype.getAdSystem=wI.prototype.getAdSystem;wI.prototype.getApiFramework=wI.prototype.getApiFramework;wI.prototype.getCreativeId=wI.prototype.getCreativeId;wI.prototype.getId=wI.prototype.getId;
13
+ wI.prototype.getTechnology=wI.prototype.yb;wI.prototype.getAdManagerVersion=wI.prototype.tb;wI.prototype.getAdManagerName=wI.prototype.sb;xI.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}};yI.prototype.getCuePoints=function(){return this.a};yI.prototype.Nb=function(){return 0<=this.a.indexOf(0)||0===this.a.length};yI.prototype.ib=function(){return 0<=this.a.indexOf(-1)};yI.prototype.hasPostroll=yI.prototype.ib;yI.prototype.hasPreroll=yI.prototype.Nb;yI.prototype.getCuePoints=yI.prototype.getCuePoints;_.t=zI.prototype;
14
+ _.t.Pi=function(a){var b=this;this.a=a.getAdsManager(this.j,BI(this));this.a.isCustomPlaybackUsed()?(this.R.warn("IMA plugin does not work correctly right now on platforms with single video element. Disposing."),this.l.onError(new _.L(1,9,10002)),this.dispose()):(this.h=new _.rp(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 yI(a),this.l.trigger(new _.J(_.Wb,{adsTimeline:this.g})),AI(this));this.f.resolve()};
15
+ _.t.Oi=function(a){FI(this,a.getError());this.f.resolve()};_.t.Xi=function(a){var b=this;return _.B(function(c){if(1==c.a)return b.D=!0,_.x(c,b.l.pause(),2);_.Bn(b.j,{visibility:_.kd});CI(b,_.Fb,a);b.h.start();_.z(c)})};_.t.sh=function(a){a.getAd().isLinear()?CI(this,_.Mb,a):(this.a.discardAdBreak(),this.B||(this.B=!0,this.l.play()))};_.t.uh=function(a){this.A=a.getAd().getDuration();CI(this,_.Sb,a);this.l.getSurface().show(this.m)};_.t.Ii=function(a){a=a.getAdData();FI(this,a?a.adError:null);DI(this)};
16
+ _.t.Mi=function(a){CI(this,_.Pb,a)};_.t.Fi=function(a){CI(this,_.Hb,a)};_.t.qh=function(a){CI(this,_.Kb,a)};_.t.Ji=function(a){CI(this,_.Nb,a)};_.t.vh=function(a){CI(this,_.Ub,a)};_.t.Li=function(a){CI(this,_.Ob,a)};_.t.Ni=function(a){CI(this,_.Qb,a)};_.t.ph=function(a){this.pause();CI(this,_.Ib,a)};_.t.th=function(a){CI(this,_.Rb,a);DI(this)};_.t.rh=function(a){CI(this,_.Lb,a)};_.t.Gi=function(a){CI(this,_.Jb,a);DI(this)};
17
+ _.t.Yi=function(){this.B=!0;if(!this.D)return this.l.play();this.D=!1;this.h.stop();this.l.isEnded()||this.l.play();CI(this,_.Gb);EI(this)};_.t.Ri=function(){this.J=!0};_.t.Wi=function(){this.N=!0;this.o.contentComplete()};
18
+ _.t.load=function(){var a=this,b,c,d,e,f;return _.B(function(g){if(1==g.a){b=a.l;c=a.L;try{if(typeof c.adTagUrl!==_.ue)throw new _.L(1,9,10001,{missingKeys:"adTagUrl"});}catch(h){return b.onError(h),a.f.resolve(),g["return"](a.f)}return c.adTagUrl?_.x(g,a.I.canPlay(!1),2):(a.f.resolve(),g["return"](a.f))}if(3!=g.a)return d=g.f,_.x(g,a.I.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
+ _.t.start=function(a){var b=this;return _.B(function(c){return b.a&&b.g&&!b.F?b.g.Nb()?_.x(c,HI(b),0):_.x(c,II(b,a),0):_.x(c,a.play(),0)})};_.t.resume=function(){this.a&&this.a.resume()};_.t.pause=function(){this.a&&this.a.pause()};_.t.skip=function(){this.a&&this.a.skip()};_.t.getVolume=function(){return this.a?this.a.getVolume():1};_.t.setVolume=function(a){this.a&&this.a.setVolume(a)};
20
20
  _.t.getPosition=function(){if(!this.a||null===this.A)return-1;var a=this.a.getRemainingTime();return 0>a?0:this.A-a};
21
- _.t.dispose=function(){var a=this;return(new Promise(function(b){a.D&&a.g&&a.g.hb()&&!a.I?(a.w.one(a.a,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(){b();a.m&&a.l.getSurface().hide(a.m)}),_.dg(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(){zI(a);a.w.release();a.h&&(a.h.stop(),a.h=null);a.a&&(a.a.destroy(),a.a=null)})};uI.prototype.getPosition=uI.prototype.getPosition;
22
- uI.prototype.setVolume=uI.prototype.setVolume;uI.prototype.getVolume=uI.prototype.getVolume;uI.prototype.skip=uI.prototype.skip;uI.prototype.pause=uI.prototype.pause;uI.prototype.resume=uI.prototype.resume;_.v(EI,_.cq);_.t=EI.prototype;_.t.onPlayerCreated=function(a){if(FI())return a.onError(new _.L(1,9,1E4));this.f=_.xn(_.Vc,{"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(_.ta);this.a.getSettings().setPlayerVersion(_.ia);this.a.getSettings().setAutoPlayAdBreaks(!0)};
23
- _.t.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)};_.t.ei=function(){return this.a};_.t.ci=function(){return this.g};_.t.Dc=function(){return this.f};_.t.id=function(){return"ima"};_.B("clpp.ima.ImaPlugin",EI);EI.prototype.getAdContainer=EI.prototype.Dc;EI.prototype.getAdDisplayContainer=EI.prototype.ci;EI.prototype.getAdsLoader=EI.prototype.ei;EI.Id="ima";
24
- EI.isSdkMissing=FI;GI.prototype.create=function(){return new EI};_.uo(new GI);HI.prototype.name=function(){return qI};HI.prototype.aa=function(a,b){return a.namespace()===_.Fc?!1:FI()?(this.a.warn("IMA SDK is not loaded."),!1):!(!b||!b.ima)};HI.prototype.create=function(a){return new uI(a)};HI.prototype.create=HI.prototype.create;HI.prototype.isSupported=HI.prototype.aa;HI.prototype.name=HI.prototype.name;_.un(new HI);};
21
+ _.t.dispose=function(){var a=this;return(new Promise(function(b){a.F&&a.g&&a.g.ib()&&!a.J?(a.w.one(a.a,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(){b();a.m&&a.l.getSurface().hide(a.m)}),_.eg(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(){EI(a);a.w.release();a.h&&(a.h.stop(),a.h=null);a.a&&(a.a.destroy(),a.a=null)})};zI.prototype.getPosition=zI.prototype.getPosition;
22
+ zI.prototype.setVolume=zI.prototype.setVolume;zI.prototype.getVolume=zI.prototype.getVolume;zI.prototype.skip=zI.prototype.skip;zI.prototype.pause=zI.prototype.pause;zI.prototype.resume=zI.prototype.resume;_.v(JI,_.eq);_.t=JI.prototype;_.t.onPlayerCreated=function(a){if(KI())return a.onError(new _.L(1,9,1E4));this.f=_.zn(_.Wc,{"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(_.ta);this.a.getSettings().setPlayerVersion(_.ea);this.a.getSettings().setAutoPlayAdBreaks(!0)};
23
+ _.t.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)};_.t.gi=function(){return this.a};_.t.ei=function(){return this.g};_.t.Fc=function(){return this.f};_.t.id=function(){return"ima"};_.C("clpp.ima.ImaPlugin",JI);JI.prototype.getAdContainer=JI.prototype.Fc;JI.prototype.getAdDisplayContainer=JI.prototype.ei;JI.prototype.getAdsLoader=JI.prototype.gi;JI.Id="ima";
24
+ JI.isSdkMissing=KI;LI.prototype.create=function(){return new JI};_.wo(new LI);MI.prototype.name=function(){return vI};MI.prototype.ca=function(a,b){return a.namespace()===_.Gc?!1:KI()?(this.a.warn("IMA SDK is not loaded."),!1):!(!b||!b.ima)};MI.prototype.create=function(a){return new zI(a)};MI.prototype.create=MI.prototype.create;MI.prototype.isSupported=MI.prototype.ca;MI.prototype.name=MI.prototype.name;_.wn(new MI);};
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));}