@castlabs/prestoplay 6.6.1 → 6.8.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.
- package/CHANGELOG.md +36 -1
- package/cjs/cl.adobe.js +3 -3
- package/cjs/cl.airplay.js +3 -3
- package/cjs/cl.broadpeak.js +6 -6
- package/cjs/cl.cast.js +110 -110
- package/cjs/cl.conviva.js +33 -33
- package/cjs/cl.core.js +418 -419
- package/cjs/cl.crypto.js +10 -10
- package/cjs/cl.dash.js +72 -72
- package/cjs/cl.externs.js +48 -42
- package/cjs/cl.freewheel.js +24 -24
- package/cjs/cl.hls.js +68 -49
- package/cjs/cl.hlssmpte.js +6 -6
- package/cjs/cl.htmlcue.js +31 -31
- package/cjs/cl.ima.js +24 -23
- package/cjs/cl.mse.js +275 -261
- package/cjs/cl.muxdata.js +15 -12
- package/cjs/cl.onboard.js +3 -3
- package/cjs/cl.persistent.js +14 -14
- package/cjs/cl.playlist.js +6 -6
- package/cjs/cl.smooth.js +71 -71
- package/cjs/cl.thumbnails.js +24 -24
- package/cjs/cl.tizen.js +71 -71
- package/cjs/cl.ttml.js +27 -27
- package/cjs/cl.verimatrix.js +5 -5
- package/cjs/cl.vimond.js +13 -13
- package/cjs/cl.vr.js +19 -19
- package/cjs/cl.vtt.js +14 -14
- package/cjs/cl.youbora.js +20 -20
- package/cl.adobe.js +3 -3
- package/cl.airplay.js +3 -3
- package/cl.broadpeak.js +5 -5
- package/cl.cast.js +88 -88
- package/cl.conviva.js +27 -27
- package/cl.core.js +362 -365
- package/cl.crypto.js +8 -8
- package/cl.dash.js +67 -67
- package/cl.externs.js +48 -42
- package/cl.freewheel.js +19 -19
- package/cl.hls.js +58 -40
- package/cl.hlssmpte.js +5 -5
- package/cl.htmlcue.js +25 -25
- package/cl.ima.js +17 -16
- package/cl.mse.js +238 -228
- package/cl.muxdata.js +12 -8
- package/cl.onboard.js +4 -4
- package/cl.persistent.js +10 -10
- package/cl.playlist.js +5 -5
- package/cl.smooth.js +58 -59
- package/cl.thumbnails.js +17 -17
- package/cl.tizen.js +57 -57
- package/cl.ttml.js +22 -22
- package/cl.verimatrix.js +4 -4
- package/cl.vimond.js +8 -8
- package/cl.vr.js +15 -15
- package/cl.vtt.js +12 -12
- package/cl.youbora.js +15 -15
- package/package.json +1 -1
- package/typings.d.ts +147 -19
package/cjs/cl.conviva.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
(function(){var g={}; var _ = _ || {}
|
|
2
|
-
var f=function(window){var
|
|
3
|
-
_.
|
|
4
|
-
a.deviceType||d);b(Conviva.Constants.DeviceMetadata.OS_NAME,f);b(Conviva.Constants.DeviceMetadata.OS_VERSION,c);b(Conviva.Constants.DeviceMetadata.CATEGORY,a.deviceCategory||e);b(Conviva.Constants.DeviceMetadata.BRAND,a.deviceBrand||g);return h},
|
|
5
|
-
b;e[Conviva.Constants.IS_LIVE]=
|
|
6
|
-
Conviva.Constants.AdType.CLIENT_SIDE:Conviva.Constants.AdType.SERVER_SIDE,e["c3.ad.adManagerName"]=
|
|
7
|
-
b=a.getWrapperAdIds().slice(-1)[0]||a.getId(),c=a.getWrapperAdSystems().slice(-1)[0]||a.getAdSystem(),a=a.getWrapperCreativeIds().slice(-1)[0]||a.getCreativeId(),e["c3.ad.firstAdId"]=
|
|
8
|
-
b){var c=
|
|
9
|
-
a.a=null;a.
|
|
10
|
-
b.detail;if(10003===c.code&&(a.
|
|
11
|
-
|
|
12
|
-
null,c);Conviva.Analytics.setDeviceMetadata(
|
|
13
|
-
"N/A",e=c&&c.defaultResource||"N/A";a.
|
|
14
|
-
1E3*a.l.getPosition();a.
|
|
15
|
-
Conviva.Constants.PlayerState.STOPPED),a.
|
|
16
|
-
_.
|
|
17
|
-
_.t.
|
|
18
|
-
_.t.
|
|
19
|
-
_.t.
|
|
20
|
-
_.t.
|
|
21
|
-
_.t.
|
|
22
|
-
_.t.initialize=function(a,b,c){this.m||(this.
|
|
23
|
-
this.
|
|
24
|
-
_.t.reportAppEvent=function(a,b){var c=!1;try{Conviva.Analytics.reportAppEvent(a,b),c=!0}catch(d){this.
|
|
25
|
-
_.t.
|
|
26
|
-
break;case _
|
|
27
|
-
_.t.
|
|
28
|
-
_.t.
|
|
29
|
-
_.t.
|
|
30
|
-
b,e);this.B=!0}else this.
|
|
31
|
-
_.t.
|
|
32
|
-
|
|
33
|
-
_.t.onPlayerWillDestroy=function(){this.a&&(this.a=!1,this.f.destroy(),this.f=null,this.g&&(this.g.destroy(),this.g=null))};_.t.onPlayerWillRelease=function(){this.a&&(this.f.release(),this.g&&this.g.release())};_.t.id=function(){return"conviva"};_.t.T=function(a,b){a.trigger(new _.J(_.
|
|
34
|
-
|
|
2
|
+
var f=function(window){var GL="Ad Error",HL="onAdBreakStarted()",IL="onAdBreakStopped()",JL=function(a){function b(l,m){l in h||!m||(h[l]=m)}var c=_.li(),d=Conviva.Constants.DeviceType.DESKTOP,e=Conviva.Constants.DeviceCategory.WEB,f=c.os;c=c.osVersion.name;var g="";_.gj()&&(g="Apple");_.fj()?(g="Google",d=Conviva.Constants.DeviceType.SETTOP,e=Conviva.Constants.DeviceCategory.CHROMECAST):_.hj()?(d=Conviva.Constants.DeviceType.MOBILE,/(android)/i.test(navigator.userAgent)?e=Conviva.Constants.DeviceCategory.ANDROID_DEVICE:
|
|
3
|
+
_.gj()&&(e=Conviva.Constants.DeviceCategory.APPLE_DEVICE)):_.ki()||_.ji()||_.cj("Hisense")?(d=Conviva.Constants.DeviceType.SMARTTV,e=Conviva.Constants.DeviceCategory.SMART_TV,_.ki()?(c="",g="LG",e=Conviva.Constants.DeviceCategory.LG_TV):_.ji()?(g="Samsung",e=Conviva.Constants.DeviceCategory.SAMSUNG_TV):_.cj("Hisense")&&(c="",g="Hisense")):_.cj("Xbox One")&&(g="Microsoft",d=Conviva.Constants.DeviceType.CONSOLE,e=Conviva.Constants.DeviceCategory.XBOX);var h=a.deviceMetadata||{};b(Conviva.Constants.DeviceMetadata.TYPE,
|
|
4
|
+
a.deviceType||d);b(Conviva.Constants.DeviceMetadata.OS_NAME,f);b(Conviva.Constants.DeviceMetadata.OS_VERSION,c);b(Conviva.Constants.DeviceMetadata.CATEGORY,a.deviceCategory||e);b(Conviva.Constants.DeviceMetadata.BRAND,a.deviceBrand||g);return h},KL=function(a){return a?Conviva.Constants.StreamType.LIVE:Conviva.Constants.StreamType.VOD},LL=function(a){return 0===a?"Pre-roll":-1===a?"Post-roll":"Mid-roll"},NL=function(a,b,c,d){var e={};e[Conviva.Constants.PLAYER_NAME]=c;e[Conviva.Constants.VIEWER_ID]=
|
|
5
|
+
b;e[Conviva.Constants.IS_LIVE]=KL(!!d);e[Conviva.Constants.ASSET_NAME]=GL;a&&(e[Conviva.Constants.ASSET_NAME]=a.getTitle(),e[Conviva.Constants.STREAM_URL]=a.getMediaUrl(),e[Conviva.Constants.DURATION]=a.getDuration(),e["c3.ad.id"]=ML(a.getId()),e["c3.ad.creativeId"]=ML(a.getCreativeId()),e["c3.ad.system"]=ML(a.getAdSystem()),e["c3.ad.mediaFileApiFramework"]=ML(a.getApiFramework()),e["c3.ad.advertiser"]=ML(a.getAdvertiserName()),e["c3.ad.position"]=LL(a.getPodIndex()),e["c3.ad.technology"]=0===a.zb()?
|
|
6
|
+
Conviva.Constants.AdType.CLIENT_SIDE:Conviva.Constants.AdType.SERVER_SIDE,e["c3.ad.adManagerName"]=ML(a.tb()),e["c3.ad.adManagerVersion"]=ML(a.ub()),e["c3.ad.advertiserCategory"]=ML(null),e["c3.ad.advertiserId"]=ML(null),e["c3.ad.breakId"]=ML(null),e["c3.ad.campaignName"]=ML(null),e["c3.ad.category"]=ML(null),e["c3.ad.classification"]=ML(null),e["c3.ad.creativeName"]=ML(null),e["c3.ad.sequence"]=ML(a.Pb()),e["c3.ad.sessionStartEvent"]=ML(null),e["c3.ad.unitName"]=ML(null),e["c3.ad.dayPart"]=ML(null),
|
|
7
|
+
b=a.getWrapperAdIds().slice(-1)[0]||a.getId(),c=a.getWrapperAdSystems().slice(-1)[0]||a.getAdSystem(),a=a.getWrapperCreativeIds().slice(-1)[0]||a.getCreativeId(),e["c3.ad.firstAdId"]=ML(b),e["c3.ad.firstAdSystem"]=ML(c),e["c3.ad.firstCreativeId"]=ML(a));return e},ML=function(a){return a?""+a:"NA"},OL=function(a,b){this.l=a;this.B=b;this.A="";this.w=_.ra;this.h=new _.H("clpp.conviva.ad");this.f=new _.dg;this.a=null;this.j=this.m=this.o=this.g=!1},PL=function(a,b){if(!a.m){a.j=!1;try{if(a.a=Conviva.Analytics.buildAdAnalytics(a.B()),
|
|
8
|
+
b){var c=NL(b,a.A,a.w,a.l.isLive()),d=String(b.ub()),e={};e[Conviva.Constants.FRAMEWORK_NAME]=b.tb();e[Conviva.Constants.FRAMEWORK_VERSION]=d;a.a.setAdPlayerInfo(e);a.a.reportAdStarted(c)}}catch(f){a.h.error("Could not create ad analytics session",f)}}},SL=function(a,b,c){c=void 0===c?GL:c;if(a.a){a.a.reportAdMetric(Conviva.Constants.Playback.PLAYER_STATE,Conviva.Constants.PlayerState.STOPPED);switch(b){case QL:a.a.reportAdFailed(c,NL(null,a.A,a.w));break;case RL:a.a.reportAdSkipped();break;default:a.a.reportAdEnded()}a.a.release();
|
|
9
|
+
a.a=null;a.g=!1}},TL=function(a){a.f.on(a.l,_.Hb,a.Ih.bind(a));a.f.on(a.l,_.Ib,a.Jh.bind(a));a.f.on(a.l,_.Ub,a.Ph.bind(a));a.f.on(a.l,_.Rb,a.Xd.bind(a));a.f.on(a.l,_.Qb,a.Xd.bind(a));a.f.on(a.l,_.Sb,a.Xd.bind(a));a.f.on(a.l,_.Jb,a.Xd.bind(a));a.f.on(a.l,_.Vb,a.Qh.bind(a));a.f.on(a.l,_.Tb,a.Oh.bind(a));a.f.on(a.l,_.Kb,a.Kh.bind(a));a.f.on(a.l,_.Nb,a.Mh.bind(a));a.f.on(a.l,_.Ob,a.Nh.bind(a));a.f.on(a.l,_.Mb,a.Lh.bind(a));a.f.on(a.l,_.Pb,a.Rj.bind(a));a.f.on(a.l,_.Wb,a.Rh.bind(a));a.f.on(a.l,_.id,function(b){var c=
|
|
10
|
+
b.detail;if(10003===c.code&&(a.h.debug("onAdError()"),!a.j)){b=Conviva.Constants.ErrorSeverity;switch(c.data.errorType){case 0:c="Ad Load Error";break;case 1:c="Ad Play Error";break;default:c=GL}null===a.a&&PL(a,null);a.a.reportAdError(c,b.FATAL);a.j=!0;a.h.debug("Ad Playback Failure");SL(a,QL,c)}})},UL=function(a,b){this.l=a;this.f=new _.dg;this.a=null;this.o=!1;this.H=!0;this.B=this.g=this.A=this.D=this.m=!1;this.O=0;this.K=!1;this.w=null;this.J=!1;this.h=b;this.L=this.F=null;this.j=[];this.I=0},
|
|
11
|
+
VL=function(a){if(!a.m&&a.a){var b=KL(a.l.isLive()),c={};c[Conviva.Constants.IS_LIVE]=b;c[Conviva.Constants.DURATION]=a.l.getDuration();a.a.setContentInfo(c)}},WL=function(a){return null!==a.a&&a.D},XL=function(a){return a.l.getConfiguration().autoplay||!1},YL=function(a,b){var c={};c[Conviva.Constants.LOG_LEVEL]=Conviva.Constants.LogLevel.DEBUG;b.serviceUrl&&(a.h.warn("Touchstone URL is set. Do not set this in production!"),c[Conviva.Constants.GATEWAY_URL]=b.serviceUrl.replace(/\/$/,""));Conviva.Analytics.init(b.customerKey,
|
|
12
|
+
null,c);Conviva.Analytics.setDeviceMetadata(JL(b));b.connectionType&&Conviva.Analytics.reportDeviceMetric(Conviva.Constants.Network.CONNECTION_TYPE,b.connectionType);a.a=Conviva.Analytics.buildVideoAnalytics();a.o=!1;c={};c[Conviva.Constants.FRAMEWORK_NAME]=_.ra;c[Conviva.Constants.FRAMEWORK_VERSION]=_.ea;a.a.setPlayerInfo(c)},ZL=function(a){if(!a.m)if(a.D)a.h.warn("Current session still active. No-op.");else{var b=a.l.getLoadedSource()||a.L,c=a.l.getConfiguration().conviva||null,d=c&&c.viewerId||
|
|
13
|
+
"N/A",e=c&&c.defaultResource||"N/A";a.h.debug(a.l.getConfiguration().source);var f={},g=new _.Ai(b.url);b&&(f[Conviva.Constants.ASSET_NAME]=b.name||"N/A",f[Conviva.Constants.STREAM_URL]=_.Bi(g));f[Conviva.Constants.PLAYER_NAME]=c.playerName||_.ra;f[Conviva.Constants.VIEWER_ID]=d;f[Conviva.Constants.DEFAULT_RESOURCE]=e;if(c&&!_.K.R(c.customTags))for(var h in c.customTags)f[h]=c.customTags[h];a.a.reportPlaybackRequested(f);a.a.setCallback(function(){a.h.debug("reportMiscellaneousMetrics()");if(WL(a)){var l=
|
|
14
|
+
1E3*a.l.getPosition();a.a.reportPlaybackMetric(Conviva.Constants.Playback.PLAY_HEAD_TIME,l);if(l=a.l.getStats()){l=l.decodedFrames;var m=l-a.I;a.I=l;isFinite(m)&&(a.h.debug("Current FPS",m),a.a.reportPlaybackMetric(Conviva.Constants.Playback.RENDERED_FRAMERATE,m))}}});a.D=!0;a.g=!0;a.J=!1;0<a.j.length&&(a.h.debug("Report deferred events"),a.j.forEach(function(l){l.dg(l.zf)}));a.j=[]}},$L=function(a){a.h.debug("terminateSession()");a.a&&(a.a.reportPlaybackMetric(Conviva.Constants.Playback.PLAYER_STATE,
|
|
15
|
+
Conviva.Constants.PlayerState.STOPPED),a.a.reportPlaybackEnded(),a.a.release(),Conviva.Analytics.release(),a.o=!0,a.D=!1,a.A=!1,a.g=!1,a.w=null,a.B=!1,a.O=0,a.K=!1,a.j=[],a.I=0)},aM=function(){this.g=this.f=null;this.a=!1;this.h=new _.H("clpp.conviva")},bM=function(a){var b=[];typeof a===_.Kd&&(a.customerKey||b.push("customerKey"),a.viewerId||b.push("viewerId"));if(0<b.length)throw new _.L(1,9,9001,{missingKeys:b});},cM=function(a,b){var c=b.getConfiguration();a.a=!_.K.R(c.conviva)&&typeof c.conviva===
|
|
16
|
+
_.Kd;a.a?"undefined"===typeof window.Conviva?(a.h.warn("Conviva SDK is not loaded. Will do nothing."),a.a=!1,c=new _.L(1,9,9E3),a.T(b,c)):b.namespace()===_.Jc&&(a.a=!1,a.h.debug("Conviva does not report when casting.")):a.h.warn("Conviva plugin is loaded but not configured. Will do nothing.")},dM=function(){};_.t=OL.prototype;_.t.initialize=function(a){this.h.debug("Initialize Ad Insights");this.j=this.o=!1;this.A=a.viewerId;this.w=a.playerName||_.ra;TL(this)};_.t.release=function(){this.h.debug("Release Ad Insights");this.o?this.h.debug(_.ia):(_.gg(this.f),this.a&&SL(this,eM),this.f.release(),this.o=!0,this.g=this.j=!1)};_.t.destroy=function(){this.h.debug(_.Xc);this.m?this.h.debug(_.ha):this.m=!0};_.t.Ih=function(){this.h.debug(HL)};_.t.Jh=function(){this.h.debug(IL)};
|
|
17
|
+
_.t.Ph=function(a){this.h.debug("onAdStarted()");a=a.ad;this.g||(this.h.warn("Ad load event was not triggered. This will have incidence on VSF"),PL(this,a));this.g=!1;this.a.reportAdMetric(Conviva.Constants.Playback.PLAYER_STATE,Conviva.Constants.PlayerState.PLAYING);this.a.reportAdMetric(Conviva.Constants.Playback.RESOLUTION,a.wb(),a.vb());this.a.reportAdMetric(Conviva.Constants.Playback.BITRATE,a.ib())};
|
|
18
|
+
_.t.Xd=function(a){var b=this;this.h.debug("onAdStateChanged()");if(this.a){var c=function(d){b.a.reportAdMetric(Conviva.Constants.Playback.PLAYER_STATE,d)};switch(a.type){case _.Rb:case _.Sb:c(Conviva.Constants.PlayerState.PLAYING);break;case _.Qb:c(Conviva.Constants.PlayerState.PAUSED);break;case _.Jb:c(Conviva.Constants.PlayerState.BUFFERING)}}};_.t.Qh=function(){this.h.debug("onAdStopped()");this.a&&!this.j&&SL(this,eM)};_.t.Oh=function(){this.h.debug("onAdSkipped()");this.a&&SL(this,RL)};
|
|
19
|
+
_.t.Kh=function(){this.h.debug("onAdClicked()");this.a&&this.a.reportAdPlayerEvent("AdClicked")};_.t.Mh=function(){this.h.debug("onAdImpression()");if(this.a){var a=Conviva.Constants.Events;this.a.reportAdPlayerEvent(a.AD_IMPRESSION_START);this.a.reportAdPlayerEvent(a.AD_IMPRESSION_END)}};
|
|
20
|
+
_.t.Nh=function(a){var b=this;this.h.debug("onAdLoaded()");var c=a.ad;if(-1!==c.getPodIndex()||this.l.getPosition()>=this.l.getDuration()-5)b.g=!0,PL(b,c);else this.f.on(this.l,_.Ee,function(){b.l.getPosition()>=b.l.getDuration()-5&&(b.f.off(b.l,_.Ee),b.g=!0,PL(b,c))})};_.t.Lh=function(){this.h.debug("onAdFirstQuartile()");this.a&&this.a.reportAdPlayerEvent(Conviva.Constants.Events.AD_FIRST_QUARTILE)};_.t.Rj=function(){this.h.debug("onAdMidPoint()");this.a&&this.a.reportAdPlayerEvent(Conviva.Constants.Events.AD_MID_QUARTILE)};
|
|
21
|
+
_.t.Rh=function(){this.h.debug("onAdThirdQuartile()");this.a&&this.a.reportAdPlayerEvent(Conviva.Constants.Events.AD_THIRD_QUARTILE)};var RL=0,eM=1,QL=2;_.t=UL.prototype;
|
|
22
|
+
_.t.initialize=function(a,b,c){this.m||(this.h.debug("Initialize conviva"),this.H=!1,this.F=_.K.Qa(b),this.L=c,this.l=a,YL(this,this.F),this.f.on(this.l,_.Yd,this.rk.bind(this)),this.f.on(this.l,_.qe,this.Wh.bind(this)),this.f.on(this.l,_.tc,this.Jf.bind(this)),this.f.on(this.l,_.Me,this.Vh.bind(this)),this.f.on(this.l,_.Le,this.Uh.bind(this)),this.f.on(this.l,_.Hb,this.Sh.bind(this)),this.f.on(this.l,_.Ib,this.Th.bind(this)),this.f.on(this.l,_.Yb,this.Xj.bind(this)),this.f.on(this.l,_.sc,this.Zj.bind(this)),
|
|
23
|
+
this.f.on(this.l,_.id,this.Kf.bind(this)),XL(this)&&(this.h.debug("Start a new session: A new video starts in autoplay."),ZL(this)))};_.t.release=function(){this.h.debug("Release conviva");this.H?this.h.debug(_.ia):(_.gg(this.f),WL(this)||this.o||!XL(this)||this.a&&this.a.reportPlaybackFailed("Exit Before Video Start"),WL(this)&&$L(this),this.a=null,this.H=!0)};_.t.destroy=function(){this.h.debug(_.Xc);this.m?this.h.debug(_.ha):this.m=!0};
|
|
24
|
+
_.t.reportAppEvent=function(a,b){var c=!1;try{Conviva.Analytics.reportAppEvent(a,b),c=!0}catch(d){this.h.debug("Report app event error",d),c=!1}return c};_.t.rk=function(){this.h.debug("onPlayRequest()");WL(this)||XL(this)?WL(this)&&this.A&&!this.g&&(this.h.debug("Resuming VST monitoring ..."),WL(this)&&!this.g&&(this.a.reportPlaybackEvent(Conviva.Constants.Events.USER_WAIT_ENDED),this.g=!0),this.A=!1):(this.h.debug("Creating conviva session. On Play Requested / No autoplay"),ZL(this))};
|
|
25
|
+
_.t.Wh=function(a){function b(d){if(c.o&&(c.h.debug("Creating conviva session (On Seek / Replay)"),YL(c,c.F),ZL(c),VL(c),WL(c))){var e=c.l.getTrackManager();e=e.fa()||e.Xa();e.width&&e.height&&c.a.reportPlaybackMetric(Conviva.Constants.Playback.RESOLUTION,e.width,e.height);e.bandwidth&&c.a.reportPlaybackMetric(Conviva.Constants.Playback.BITRATE,e.bandwidth/1E3)}WL(c)&&c.a.reportPlaybackMetric(Conviva.Constants.Playback.PLAYER_STATE,d)}var c=this;this.h.debug(_.Pd);switch(a.detail.currentState){case _.an:b(Conviva.Constants.PlayerState.PLAYING);
|
|
26
|
+
break;case _.$m:b(Conviva.Constants.PlayerState.PAUSED);break;case _.Sm:b(Conviva.Constants.PlayerState.BUFFERING);break;case _.Um:this.h.debug("onVideoEnded()"),WL(this)&&(this.w&&this.w.jb()?(this.h.debug("Waiting for postroll Ad before terminating session"),this.K=!0):$L(this))}};
|
|
27
|
+
_.t.Jf=function(a){this.h.debug(_.Ld);if(WL(this)){if(a=a.detail,typeof a.width===_.k&&typeof a.height===_.k&&this.a.reportPlaybackMetric(Conviva.Constants.Playback.RESOLUTION,a.width,a.height),a.bandwidth&&this.a.reportPlaybackMetric(Conviva.Constants.Playback.BITRATE,a.bandwidth/1E3),(a=a.rendition)&&a.track&&(a=a.track)&&a.frameRate){var b={};b[Conviva.Constants.ENCODED_FRAMERATE]=a.frameRate;this.a.setContentInfo(b)}}else this.j.push({dg:this.Jf.bind(this),zf:a})};
|
|
28
|
+
_.t.Vh=function(){this.h.debug("onSeeking()");WL(this)&&this.a.reportPlaybackMetric(Conviva.Constants.Playback.SEEK_STARTED)};_.t.Uh=function(){this.h.debug("onSeeked()");WL(this)&&this.a.reportPlaybackMetric(Conviva.Constants.Playback.SEEK_ENDED)};_.t.Xj=function(a){this.h.debug("onAdsTimelineChanged()");if(a=a.adsTimeline)this.w=a};
|
|
29
|
+
_.t.Sh=function(a){this.h.debug(HL);var b=a.ad;a=0===b.Ya();var c=LL(b.getPodIndex());WL(this)||XL(this)||!a||ZL(this);if(WL(this)){a=0===b.zb()?Conviva.Constants.AdType.CLIENT_SIDE:Conviva.Constants.AdType.SERVER_SIDE;var d=0,e={};1===b.yb()&&(d=b.getDuration());e[Conviva.Constants.POD_DURATION]=d;e[Conviva.Constants.POD_INDEX]=++this.O;e[Conviva.Constants.POD_POSITION]=c;b=Conviva.Constants.AdPlayer;b=a!==Conviva.Constants.AdType.CLIENT_SIDE||_.fj()?b.CONTENT:b.SEPARATE;this.a.reportAdBreakStarted(a,
|
|
30
|
+
b,e);this.B=!0}else this.h.debug("Bug: should already have a valid session")};_.t.Th=function(){this.h.debug(IL);WL(this)&&this.B&&(this.a.reportAdBreakEnded(),this.B=!1,this.K&&$L(this))};
|
|
31
|
+
_.t.Kf=function(a){this.h.debug(_.Md);if(this.o&&this.J)this.h.debug("Session ended in VPF; ignoring subsequent errors");else{var b=a.detail||null,c=b&&b.message||"Player error",d=Conviva.Constants.ErrorSeverity.WARNING;b&&b.severity&&b.severity===_.M&&(d=Conviva.Constants.ErrorSeverity.FATAL,WL(this)||ZL(this));WL(this)?(this.h.debug("Report error",c,d),this.a.reportPlaybackError(c,d),d===Conviva.Constants.ErrorSeverity.FATAL&&(this.h.debug("Video Playback Failure"),this.J=!0,$L(this))):this.j.push({dg:this.Kf.bind(this),
|
|
32
|
+
zf:a})}};_.t.Zj=function(){this.h.debug("onAutoPlayBlocked()");WL(this)&&(this.h.debug("Auto-play blocked. Pausing VST monitoring."),this.A=!0,WL(this)&&this.g&&(this.a.reportPlaybackEvent(Conviva.Constants.Events.USER_WAIT_STARTED),this.g=!1))};_.t=aM.prototype;_.t.onPlayerCreated=function(a){this.f=new UL(a,this.h)};_.t.onContentWillLoad=function(a,b){var c=this;cM(this,a);if(this.a){var d=a.getConfiguration();d=_.K.Qa(d.conviva||{});try{bM(d);var e=d.enableAdInsights||!1;this.f.initialize(a,d,b);e&&(this.g=new OL(a,function(){return c.f.a}),this.g.initialize(d))}catch(f){f instanceof _.L?this.T(a,f):this.T(a,new _.L(1,9,9002,f,f))}}};_.t.onContentLoaded=function(a,b){for(var c=1;c<arguments.length;++c);this.a&&VL(this.f)};
|
|
33
|
+
_.t.onPlayerWillDestroy=function(){this.a&&(this.a=!1,this.f.destroy(),this.f=null,this.g&&(this.g.destroy(),this.g=null))};_.t.onPlayerWillRelease=function(){this.a&&(this.f.release(),this.g&&this.g.release())};_.t.id=function(){return"conviva"};_.t.T=function(a,b){a.trigger(new _.J(_.id,{detail:b}))};_.t.reportAppEvent=function(a,b){return this.f?this.f.reportAppEvent(a,b):!1};_.C("clpp.conviva.ConvivaPlugin",aM);aM.prototype.reportAppEvent=aM.prototype.reportAppEvent;aM.Id="conviva";
|
|
34
|
+
dM.prototype.create=function(){return new aM};_.uo(new dM);};
|
|
35
35
|
if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
|
|
36
36
|
else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
|
|
37
37
|
else{_=this.clpp._;(f.call(g,this));}
|