@castlabs/prestoplay 6.25.2 → 6.26.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 +15 -0
- package/README.md +5 -5
- package/cjs/cl.adobe.js +3 -3
- package/cjs/cl.airplay.js +3 -3
- package/cjs/cl.broadpeak.js +7 -7
- package/cjs/cl.cast.js +112 -112
- package/cjs/cl.conviva.js +32 -32
- package/cjs/cl.core.js +601 -600
- package/cjs/cl.crypto.js +9 -9
- package/cjs/cl.dash.js +89 -88
- package/cjs/cl.externs.js +37 -31
- package/cjs/cl.freewheel.js +24 -24
- package/cjs/cl.hls.js +77 -77
- package/cjs/cl.hlssmpte.js +6 -6
- package/cjs/cl.htmlcue.js +30 -30
- package/cjs/cl.ima.js +23 -23
- package/cjs/cl.mediatailor.js +3 -3
- package/cjs/cl.mse.js +341 -334
- package/cjs/cl.muxdata.js +15 -15
- package/cjs/cl.onboard.js +3 -3
- package/cjs/cl.persistent.js +14 -14
- package/cjs/cl.playlist.js +6 -6
- package/cjs/cl.sessions.js +16 -16
- package/cjs/cl.simid.js +17 -17
- package/cjs/cl.smooth.js +72 -72
- package/cjs/cl.thumbnails.js +26 -26
- package/cjs/cl.tizen.js +71 -71
- package/cjs/cl.ttml.js +29 -29
- package/cjs/cl.verimatrix.js +5 -5
- package/cjs/cl.vimond.js +12 -12
- package/cjs/cl.vr.js +19 -19
- package/cjs/cl.vtt.js +14 -14
- package/cjs/cl.yospace.js +4 -4
- package/cjs/cl.youbora.js +38 -36
- package/cl.adobe.js +3 -3
- package/cl.airplay.js +3 -3
- package/cl.broadpeak.js +5 -5
- package/cl.cast.js +87 -87
- package/cl.conviva.js +27 -27
- package/cl.core.js +489 -488
- package/cl.crypto.js +9 -9
- package/cl.dash.js +82 -82
- package/cl.externs.js +37 -31
- package/cl.freewheel.js +19 -19
- package/cl.hls.js +79 -80
- package/cl.hlssmpte.js +5 -5
- package/cl.htmlcue.js +26 -26
- package/cl.ima.js +17 -17
- package/cl.mediatailor.js +3 -3
- package/cl.mse.js +299 -292
- package/cl.muxdata.js +13 -13
- package/cl.onboard.js +4 -4
- package/cl.persistent.js +10 -10
- package/cl.playlist.js +5 -5
- package/cl.sessions.js +10 -10
- package/cl.simid.js +14 -14
- package/cl.smooth.js +60 -60
- package/cl.thumbnails.js +19 -19
- 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 +14 -14
- package/cl.vtt.js +12 -12
- package/cl.yospace.js +3 -3
- package/cl.youbora.js +28 -27
- package/package.json +3 -3
- package/typings.d.ts +41 -3
package/cjs/cl.htmlcue.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
(function(){var g={}; var _ = _ || {}
|
|
2
|
-
var f=function(window){var
|
|
3
|
-
var b=a.input.match(/^([^<]*)(<[^>]+>?)?/);b=b[1]?b[1]:b[2];a.input=a.input.substr(b.length);return b},
|
|
4
|
-
1<Math.abs(a-b)},
|
|
5
|
-
0;c=parseFloat(c.getPropertyValue("border-bottom-width"))||0;var g=(b.top||a.offsetTop)+f;f=(b.height||a.offsetHeight)-f-c;return new
|
|
6
|
-
case "+y":return
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
a.a;this.j=void 0===b?!1:b;this.a=
|
|
10
|
-
a.id,"clpp-text-cue-region",b);this.f=a},
|
|
11
|
-
a.f.cssRules[0];d instanceof CSSStyleRule&&(c=d.selectorText.split(",").every(function(e){return 0===e.trim().indexOf("."+a.h+" ")}))}catch(e){}0<a.f.cssRules.length&&a.f.deleteRule(0);return c},
|
|
12
|
-
c)}
|
|
13
|
-
c.observe(b,{subtree:!1,childList:!0});a.j.push(function(){return c.disconnect()})},
|
|
14
|
-
this.G=new _.
|
|
15
|
-
d)){c={color:a.getFontColor()||void 0,backgroundColor:a.getBackgroundColor()||void 0,fontFamily:a.getFontFamily()||void 0,textShadow:_
|
|
16
|
-
else{
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
d=g)}}else d.appendChild(document.createTextNode(
|
|
21
|
-
|
|
22
|
-
c.next();!d.done;d=c.next())_.
|
|
23
|
-
c,null),f=
|
|
24
|
-
|
|
25
|
-
l.f)-Math.max(c.left,l.left))*Math.max(0,Math.min(c.a,l.a)-Math.max(c.top,l.top))/(c.height*c.width);l>h&&(g=
|
|
26
|
-
|
|
27
|
-
"flex-direction":this.f.writingMode},this.a);this.f.displayAlign&&
|
|
28
|
-
}a=
|
|
29
|
-
|
|
30
|
-
_.r.destroy=function(){var a=this;return _.H(function(b){if(1==b.a){if(null==a.h)return b["return"]();
|
|
31
|
-
_.r.setTextVisibility=function(a){null!=this.h&&this.j!==a&&((this.j=a)?(this.G.Jb(.25),this.L.enableResizeObserver&&this.w.start(),
|
|
2
|
+
var f=function(window){var xU="CLPP Subtitle Styles",yU="Unsupported unit",zU="clpp-text-plain",AU="clpp-text-ttml",BU="clpp.htmlcue.HtmlTextDisplayer",CU="initial",DU=function(a){return _.Li(a,{Lh:function(b,c){return b.ra(c)}})},EU=function(a,b){if(0===b.length)return a;var c=a,d=a.findIndex(function(e){return e.startTime>=b[0].startTime});0<=d&&(c=c.slice(0,d));return c.concat(b)},FU=function(a,b){for(var c=0,d=a.length-1;c<=d;){var e=c+d>>1,f=b(a[e]);if(0===f)return e;0<f?c=e+1:d=e-1}return-1},GU=function(){},HU=function(a){if(!a.input)return null;
|
|
3
|
+
var b=a.input.match(/^([^<]*)(<[^>]+>?)?/);b=b[1]?b[1]:b[2];a.input=a.input.substr(b.length);return b},JU=function(a){for(var b=null;b=a.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)a=a.replace(b[0],function(c){return IU[c]});return a},LU=function(a,b){KU(a,b);Array.from(b.getElementsByTagName("*")).forEach(function(c){KU(a,c)})},KU=function(a,b){for(var c in a)null!=a[c]&&(b.style[c]=a[c])},MU=function(a,b){return 0===a?"0":a+b},NU=function(a,b){return 1>Math.abs(a-b)||a<b},OU=function(a,b){return a<b&&
|
|
4
|
+
1<Math.abs(a-b)},PU=function(a,b){return a>b&&1<Math.abs(a-b)},QU=function(a,b){return 1>Math.abs(a-b)||a>b},RU=function(a,b,c,d,e,f){this.left=a;this.f=b;this.top=c;this.a=d;this.height=e;this.width=f},SU=function(a){return new RU(a.left,a.f,a.top,a.a,a.height,a.width)},TU=function(a){var b=a.getBoundingClientRect(),c=getComputedStyle(a,null),d=parseFloat(c.getPropertyValue("border-left-width"))||0,e=parseFloat(c.getPropertyValue("border-right-width"))||0,f=parseFloat(c.getPropertyValue("border-top-width"))||
|
|
5
|
+
0;c=parseFloat(c.getPropertyValue("border-bottom-width"))||0;var g=(b.top||a.offsetTop)+f;f=(b.height||a.offsetHeight)-f-c;return new RU(b.left+d,b.right+e,g,(b.bottom||g+f)+c,f,(b.width||a.offsetWidth)-d-e)},UU=function(a,b){return b.some(function(c){return OU(a.left,c.f)&&PU(a.f,c.left)&&OU(a.top,c.a)&&PU(a.a,c.top)})},VU=function(a,b){return QU(a.top,b.top)&&NU(a.a,b.a)&&QU(a.left,b.left)&&NU(a.f,b.f)},WU=function(a,b,c){switch(c){case "+x":return OU(a.left,b.left);case "-x":return PU(a.f,b.f);
|
|
6
|
+
case "+y":return OU(a.top,b.top);case "-y":return PU(a.a,b.a);default:throw Error("Unknown axis");}},XU=function(a,b,c){this.id=a;this.w=b;this.B=c;this.a=this.o();this.j=!1},YU=function(a,b,c){XU.call(this,a.id,"clpp-text-cue",{});this.l=b;this.f=a;this.h=!!this.f.backgroundImage;this.F=c},$U=function(a){var b=a.a.childNodes[0],c=a.a.getBoundingClientRect(),d=b.getClientRects();b=c.height/d.length;c=c.width/d.length;return ZU(a)?b:c},cV=function(a,b,c){return ZU(a)&&_.L.ya(c)?MU(c,_.If):(aV(a)||
|
|
7
|
+
bV(a))&&_.L.ya(b)?MU(b,"%"):CU},aV=function(a){return a.f.writingMode===_.Gg},bV=function(a){return a.f.writingMode===_.Hg},ZU=function(a){return a.f.writingMode===_.Pi},dV=function(a,b,c){return(aV(a)||bV(a))&&_.L.ya(c)?MU(c,_.If):aV(a)&&_.L.R(c)?MU(0,_.If):ZU(a)&&_.L.ya(b)?MU(b,"%"):CU},eV=function(a,b){if(typeof a.f.position===_.k&&typeof a.f.size===_.k)switch(b){case _.ze:return a.f.position;case "auto":case _.id:return a.f.position-a.f.size/2;case _.Ae:return a.f.position-a.f.size}return 0},
|
|
8
|
+
fV=function(a){switch(a.f.positionAlign){case _.ze:return _.we;case "auto":case _.id:return _.Oi;case _.Ae:return _.Pf}return a.f.textAlign},gV=function(a){if(!a.f.positionAlign)switch(a.f.textAlign){case _.bg:case _.we:return _.ze;case _.Oi:return _.id;case _.ge:case _.Pf:return _.Ae}return a.f.positionAlign},hV=function(a){switch(a.f.writingMode){case _.Pi:return"horizontal-tb";case _.Gg:return _.Gg;case _.Hg:return _.Hg;default:throw Error("Unknown writing mode");}},iV=function(a,b){this.l=a;this.f=
|
|
9
|
+
a.a;this.j=void 0===b?!1:b;this.a=TU(a.a);this.h=[]},jV=function(a,b){if(a.j)switch(b.writingMode){case _.Pi:return["-y"];case _.Gg:return["+x"];case _.Hg:return["-x"]}var c=[];switch(b.writingMode){case _.Pi:c=["+y","-y"];break;case _.Gg:c=["+x","-x"];break;case _.Hg:c=["-x","+x"]}0>b.line&&(c=c.reverse());return c},kV=function(a){for(a.h=[];0<a.f.childNodes.length;)a.f.removeChild(a.f.childNodes[0]);a.a=TU(a.l.a)},lV=function(a,b,c){XU.call(this,a,b,c);this.h=null;this.l=[]},mV=function(a,b){lV.call(this,
|
|
10
|
+
a.id,"clpp-text-cue-region",b);this.f=a},nV=function(a,b,c){a=a.f;var d=a.viewportAnchorUnits;if(d===_.Ui)return a.viewportAnchorY/100*c-a.regionAnchorY/100*b;if(0===d)return a.viewportAnchorY-a.regionAnchorY;throw Error(yU);},pV=function(a){this.g=new _.J("clpp.htmlcue.StyleManager");this.j=[];this.h=a;this.l=[];this.a=oV(this,this.h);this.f=oV(this,this.h,!0);this.f.disabled=!0;this.g.debug("Stylesheet CLPP Subtitle Styles has been created.")},qV=function(a,b){var c=!1;try{a.f.insertRule(b,0);var d=
|
|
11
|
+
a.f.cssRules[0];d instanceof CSSStyleRule&&(c=d.selectorText.split(",").every(function(e){return 0===e.trim().indexOf("."+a.h+" ")}))}catch(e){}0<a.f.cssRules.length&&a.f.deleteRule(0);return c},rV=function(a,b){var c="."+a.h+" .clpp-text-container",d=c+" .clpp-text-cue";return b=b.replace(/::cue\((#[^)]+)\)/g,c+" $1").replace(/::cue\(([^)]+)\)/g,d+" $1").replace(/::cue-region\(([^)]+)\)/g,c+" $1 .clpp-text-cue").replace(/::cue/g,d).replace(/::cue-region/g,c+" .clpp-text-cue-region .clpp-text-cue").replace(/::ttml/g,
|
|
12
|
+
c)},oV=function(a,b,c){var d=document.createElement(_.hg),e=d.dataset;e.name=xU;e["for"]=b;c&&(e.name="CLPP Subtitle Styles (sandbox)",e.sandbox=!0);b=document.head;b.appendChild(d);sV(a,b);a.g.debug("Created HTML style element #CLPP Subtitle Styles.");return d.sheet},sV=function(a,b){var c=new MutationObserver(function(d){d.forEach(function(e){e.removedNodes.forEach(function(f){f.id===xU&&a.g.error("PRESTOplay HTML style element #CLPP Subtitle Styles has been unexpectedly removed! Some styles will not work!")})})});
|
|
13
|
+
c.observe(b,{subtree:!1,childList:!0});a.j.push(function(){return c.disconnect()})},vV=function(a){_.Ov.call(this,a);var b=this;this.g=new _.J(BU);this.m=a;this.L=tV(a.getConfiguration());this.j=!1;this.f=[];this.F=a.getSurface().getContainer();this.h=new pV(a.getSurface().getUniqueCssClass());this.a=new lV(null,"clpp-text-container",{});this.w=new _.Zu(a.getSurface(),this.Dk.bind(this));this.J=null;this.F?(this.F.appendChild(this.a.a),this.a.init(null)):this.g.warn("No container element! Subtitles will not appear. Please check your player surface configuration or switch to NativeTextDisplayer.");
|
|
14
|
+
this.G=new _.Yh(function(){uV(b)});this.A=new Map;this.l=null},tV=function(a){a=_.L.kb(a.htmlcue||{});_.L.R(a.stretchSmpteImage)&&(a.stretchSmpteImage=!1);_.L.R(a.enableResizeObserver)&&(a.enableResizeObserver=!0);return a},wV=function(a,b){return a.startTime<=b&&a.endTime>b},uV=function(a,b){if((b||a.j)&&a.F){var c=a.m.getPosition();if(b||a.J!==c&&a.m.getState()===_.Kq){a.J=c;var d=xV(a,c);(c=b)||(c=a.l,c=!(null===c&&null===d||null!==c&&null!==d&&c.start===d.start&&c.end===d.end));if(c&&(a.l=d,yV(a),
|
|
15
|
+
d)){c={color:a.getFontColor()||void 0,backgroundColor:a.getBackgroundColor()||void 0,fontFamily:a.getFontFamily()||void 0,textShadow:_.$v(a)||void 0};d=a.f.slice(d.start,d.end+1);d=_.v(d);for(var e=d.next();!e.done;e=d.next()){var f=a;e=e.value;var g=f.a.a,h=null;switch(e.payloadType){case _.Rg:h="clpp-text-vtt";break;case _.vg:h=AU;break;case _.Ni:h=zU}h&&!g.classList.contains(h)&&_.ir(g,h);g=TU(f.a.a);if(0===g.width||0===g.height)f.g.warn("The height or width of the `.clpp-text-container` element is zero. Captions will not be displayed. Please check if the `clpp.styles.css` file has been included.");
|
|
16
|
+
else{KU({fontSize:zV(f,e.containerRows)},f.a.a);g=null;h=e.payloadType===_.Rg;var l=e.payloadType===_.vg;e.region&&(h||l||e.backgroundImage)&&(f.A.has(e.region.id)?g=f.A.get(e.region.id):(g=new mV(e.region,{}),f.A.set(e.region.id,g),f.a.appendChild(g)));e=new YU(e,f.L,c);g?g.appendChild(e):f.a.appendChild(e)}}}}}},xV=function(a,b){var c=FU(a.f,function(e){return wV(e,b)?0:b!==e.startTime?b-e.startTime:b-e.endTime});if(-1===c)return null;for(var d=c;0<=d-1&&wV(a.f[d-1],b);)d--;for(;c+1<a.f.length&&
|
|
17
|
+
wV(a.f[c+1],b);)c++;return{start:d,end:c}},AV=function(a){yV(a);a.J=null;a.l=null;a.f=[]},yV=function(a){a.A.clear();if(a.a){var b=a.a.a;b.classList.remove("clpp-text-vtt");b.classList.remove(AU);b.classList.remove(zU);a=a.a;kV(a.h);a.l=[]}},zV=function(a,b){var c=TU(a.a.a).height;if(null!==a.I)return a.getFontSize();if(null!==a.B){var d=a.getFontSizePercent();return Math.round(c*d)+_.If}if(typeof b===_.k&&0<b)return Math.round(c/b)+_.If;d=a.getFontSizePercent();return Math.round(c*d)+_.If},BV=function(){},
|
|
18
|
+
CV=function(){};
|
|
19
|
+
GU.prototype.parse=function(a){a={input:a};for(var b=_.kr(_.Pd),c=[],d=b,e;null!==(e=HU(a));)if("\x3c"===e[0])if("/"===e[1])c.length&&c[c.length-1]===e.substr(2).replace("\x3e","")&&(c.pop(),d=d.parentNode);else{if(e=e.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/)){var f=e[1];var g=e[3];var h=DV[f];h?(h=_.kr(h),(f=EV[f])&&g&&h.setAttribute(f,g.trim()),g=h):g=null;!g||FV[g.localName]&&FV[g.localName]!==d.localName||(e[2]&&(g.className=e[2].substr(1).replace(/\./g," ")),c.push(e[1]),d.appendChild(g),
|
|
20
|
+
d=g)}}else d.appendChild(document.createTextNode(JU(e)));return b};var DV={c:"c",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"v",lang:"lang"},EV={v:"voice",lang:"lang"},FV={rt:"ruby"},IU={"\x26amp;":"\x26","\x26lt;":"\x3c","\x26gt;":"\x3e","\x26lrm;":"\u200e","\x26rlm;":"\u200f","\x26nbsp;":"\u00a0"};XU.prototype.init=function(){this.j=!0};XU.prototype.A=function(){return!1};_.w(YU,XU);YU.prototype.A=function(){return!this.h&&!(this.f.region&&this.f.region.displayAlign)};
|
|
21
|
+
YU.prototype.init=function(a){XU.prototype.init.call(this,a);if(this.h)_.ir(this.a,"clpp-text-cue-image"),this.a.style.backgroundImage='url("'+this.f.backgroundImage+'")',this.l.stretchSmpteImage&&(this.a.style.backgroundSize="contain");else if(a){var b=this.f;if(b.payloadType===_.vg){var c=_.kr(_.Pd);c.innerHTML=b.payload;b=c}else b.payloadType===_.Rg?b=(new GU).parse(b.payload):(c=_.kr(_.Pd),c.textContent=b.payload,b=c);_.ir(b,this.w);this.id&&(b.id=this.id);c=_.v(this.f.cssClassList);for(var d=
|
|
22
|
+
c.next();!d.done;d=c.next())_.ir(b,d.value);KU({writingMode:hV(this)},b);this.a.appendChild(b);_.ir(this.a,"clpp-text-wrapper");c=_.v(this.f.cssClassList);for(d=c.next();!d.done;d=c.next())_.ir(this.a,"clpp-text-wrapper__"+d.value);_.L.R(this.f.line)&&(this.f.lineInterpretation=_.Qi,this.f.line=ZU(this)?-1:0);c=hV(this);KU({writingMode:c,webkitWritingMode:c,direction:CU,textAlign:fV(this)},this.a);if(!this.f.region||!this.f.region.displayAlign){c=eV(this,gV(this));d=dV(this,c,null);var e=cV(this,
|
|
23
|
+
c,null),f=bV(this)&&_.L.R(null)?MU(0,_.If):CU;KU({position:"absolute",left:d,right:f,top:e,width:ZU(this)?MU(this.f.size,"%"):CU,height:aV(this)||bV(this)?MU(this.f.size,"%"):CU},this.a);d=this.f;a=ZU(this)?a.height:a.width;e=$U(this);if(d.lineInterpretation===_.Qi)f=e*Math.round(d.line),Math.abs(f)>a&&(f=e*(0>d.line?0:-1)),0>f&&(f+=a);else{f=e/a*100;var g=d.line;switch(d.lineAlign){case _.id:g-=f/2;break;case _.ge:g-=f}f=Math.round(g/100*a)}bV(this)&&(f=a-f-e);a=f;d=dV(this,c,a);e=bV(this)&&_.L.R(a)?
|
|
24
|
+
MU(0,_.If):CU;KU({left:d,right:e,top:cV(this,c,a)},this.a)}LU(this.F,b)}};YU.prototype.o=function(){return _.kr(_.Pd)};iV.prototype.append=function(a){var b=a.a;b.style.visibility=_.oe;this.f.appendChild(b);a.j||a.init(this.a);if(a.A()){a:{var c=TU(a.a);var d=jV(this,a.f),e=$U(a),f=SU(c),g=null,h=0;d=_.v(d);for(var l=d.next();!l.done;l=d.next()){for(l=l.value;WU(c,this.a,l)||VU(c,this.a)&&UU(c,this.h);){var m=c,n=e;switch(l){case "+x":m.left+=n;m.f+=n;break;case "-x":m.left-=n;m.f-=n;break;case "+y":m.top+=n;m.a+=n;break;case "-y":m.top-=n,m.a-=n}}if(this.j||VU(c,this.a))break a;l=this.a;l=Math.max(0,Math.min(c.f,
|
|
25
|
+
l.f)-Math.max(c.left,l.left))*Math.max(0,Math.min(c.a,l.a)-Math.max(c.top,l.top))/(c.height*c.width);l>h&&(g=SU(c),h=l);c=SU(f)}c=g||f}KU({top:MU(c.top-this.a.top,_.If),bottom:MU(this.a.a-c.a,_.If),left:MU(c.left-this.a.left,_.If),right:MU(this.a.f-c.f,_.If),height:MU(c.height,_.If),width:MU(c.width,_.If)},a.a)}b.style.visibility="visible";this.h.push(TU(a.a))};_.w(lV,XU);lV.prototype.init=function(){this.h=new iV(this);this.j=!0};lV.prototype.o=function(){var a=_.kr(_.Pd);_.ir(a,this.w);this.id&&(a.id=this.id);return a};lV.prototype.appendChild=function(a){kV(this.h);this.l.unshift(a);a=_.v(this.l);for(var b=a.next();!b.done;b=a.next())this.h.append(b.value)};_.w(mV,lV);
|
|
26
|
+
mV.prototype.init=function(a){a:{var b=this.f;switch(b.widthUnits){case 0:b=b.width;break a;case _.Ui:b=b.width/100*a.width;break a;default:throw Error(yU);}}var c=this.f;var d=c.viewportAnchorUnits;if(d===_.Ui)c=c.viewportAnchorX/100*a.width-c.regionAnchorX/100*b;else if(0===d)c=c.viewportAnchorX-c.regionAnchorX;else throw Error(yU);d=a.height;var e=nV(this,d,a.height);KU(this.B,this.a);KU({left:MU(c,_.If),top:MU(e,_.If),width:MU(b,_.If),height:MU(d,_.If)},this.a);this.f.writingMode&&KU({display:"flex",
|
|
27
|
+
"flex-direction":this.f.writingMode},this.a);this.f.displayAlign&&KU({"justify-content":this.f.displayAlign},this.a);b=_.v(this.f.cssClassList);for(c=b.next();!c.done;c=b.next())_.ir(this.a,c.value);a:switch(b=this.f,b.heightUnits){case 0:b=b.height;break a;case _.Ui:b=b.height/100*a.height;break a;case 2:b=b.height;d=new YU(new _.Ti(0,1,"Lorem ipsum",_.Ni),{},{});c=d.a;this.a.appendChild(c);d.init(TU(this.a));d=c.getBoundingClientRect().height;this.a.removeChild(c);b*=d;break a;default:throw Error(yU);
|
|
28
|
+
}a=nV(this,b,a.height);KU({top:MU(a,_.If),height:MU(b,_.If)},this.a);this.h=new iV(this,!0);this.j=!0};mV.prototype.getId=function(){return this.f.id};pV.prototype.appendRule=function(a){if(null!=this.a&&!this.l.some(function(c){return c===a})){var b=rV(this,a);if(qV(this,b)){try{this.a.insertRule(b,this.a.cssRules.length),this.g.debug("Added CSS rule "+b)}catch(c){this.g.error("An error occurred when adding a CSS rule: "+b)}this.l.push(a)}else this.g.warn("Stylesheet CLPP Subtitle Styles ignoring the CSS rule because it's not safe: "+b)}};
|
|
29
|
+
pV.prototype.destroy=function(){var a=this;return _.H(function(b){if(null==a.a)return b["return"]();a.j.forEach(function(c){return c()});a.j=[];if(null!=a.a){for(;0<a.a.cssRules.length;)a.a.deleteRule(0);a.l=[]}document.head.removeChild(a.a.ownerNode);document.head.removeChild(a.f.ownerNode);a.a=null;a.f=null;a.g.debug("Stylesheet CLPP Subtitle Styles has been destroyed.");_.z(b)})};_.w(vV,_.Ov);_.r=vV.prototype;_.r.append=function(a,b){if(null!=this.h&&0!==a.length){for(var c=_.v(b),d=c.next();!d.done;d=c.next())this.h.appendRule(d.value);a.sort(function(e,f){return e.startTime!==f.startTime?e.startTime-f.startTime:e.endTime-f.endTime});this.f=EU(this.f,DU(a));this.l=null;uV(this,!1)}};_.r.Wb=function(){null==this.h||uV(this,!0)};
|
|
30
|
+
_.r.destroy=function(){var a=this;return _.H(function(b){if(1==b.a){if(null==a.h)return b["return"]();AV(a);a.G.stop();return _.x(b,a.h.destroy(),2)}a.h=null;a.F.removeChild(a.a.a);a.a=null;a.w.stop();a.w=null;a.j=!1;_.z(b)})};_.r.remove=function(a,b){if(null==this.h)return!1;this.f=this.f.filter(function(c){return c.startTime<a||c.endTime>=b});this.l=null;uV(this,!0);return!0};_.r.isTextVisible=function(){return this.j};
|
|
31
|
+
_.r.setTextVisibility=function(a){null!=this.h&&this.j!==a&&((this.j=a)?(this.G.Jb(.25),this.L.enableResizeObserver&&this.w.start(),uV(this,!0)):(this.G.stop(),this.w.stop(),AV(this)))};_.r.Dk=function(){uV(this,!0)};_.I(BU,vV);vV.prototype.setTextVisibility=vV.prototype.setTextVisibility;vV.prototype.isTextVisible=vV.prototype.isTextVisible;vV.prototype.remove=vV.prototype.remove;vV.prototype.destroy=vV.prototype.destroy;vV.prototype.append=vV.prototype.append;BV.prototype.a=function(a){return!!a.enableHtmlCue&&!_.Cl()};BV.prototype.create=function(a){return new vV(a)};_.w(CV,_.Fu);CV.prototype.f=function(){_.mq(_.re,new BV)};CV.prototype.a=function(){_.kq.has(_.re)&&(_.kq["delete"](_.re),_.lq.info("Removed factory: 'html'"))};CV.prototype.id=function(){return _.jg};_.I("clpp.htmlcue.HtmlCueComponent",CV);};
|
|
32
32
|
if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
|
|
33
33
|
else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
|
|
34
34
|
else{_=this.clpp._;(f.call(g,this));}
|
package/cjs/cl.ima.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
(function(){var g={}; var _ = _ || {}
|
|
2
|
-
var f=function(window){var
|
|
3
|
-
c;this.N=d;this.j=b;this.J=new _.
|
|
4
|
-
d.LOADED,a.
|
|
5
|
-
d.CONTENT_RESUME_REQUESTED,a.
|
|
6
|
-
_.Zc&&(b.useStyledLinearAds=a.useStyledLinearAds);b.uiElements=Array.isArray(a.uiElements)?a.uiElements:[];return b},
|
|
7
|
-
|
|
8
|
-
(
|
|
2
|
+
var f=function(window){var cU="clpp.ima.AdsManagerFactory",dU=function(a,b,c){this.a=a;this.f=a.getAdPodInfo();this.j=b;this.h=c},eU=function(){},fU=function(a){this.a=a},gU=function(a){var b=a.je("ima");if(!b)throw Error("IMA plugin not created.");var c=b.ud(),d=b.h;b=b.a;if(!c||!d||!b)throw Error("IMA plugin not initialized.");var e=a.getSurface().getMedia();if(!e)throw Error("Missing media element.");this.m=a;this.l=e;a=this.m.getConfiguration();a=_.L.kb(a.ima||{});this.I=_.L.ua({disableCustomPlayback:!1},a);this.L=
|
|
3
|
+
c;this.N=d;this.j=b;this.J=new _.av;this.g=new _.J("clpp.ima");this.h=this.a=null;this.f=new _.qk;this.K=!1;this.F=new _.hi;this.P=new eU;this.o=null;this.H=this.A=this.B=!1;this.G=this.w=null;c=this.F;d=google.ima.AdErrorEvent.Type.AD_ERROR;c.one(this.j,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.$m.bind(this));c.on(this.j,d,this.Zm.bind(this));c.on(this.m,_.he,this.fn.bind(this))},hU=function(a){var b=a.a,c=a.F,d=google.ima.AdEvent.Type;c.on(b,d.AD_BREAK_READY,a.Qm.bind(a));c.on(b,
|
|
4
|
+
d.LOADED,a.Hk.bind(a));c.on(b,d.CONTENT_PAUSE_REQUESTED,a.gn.bind(a));c.on(b,d.STARTED,a.Kk.bind(a));c.on(b,d.LOG,a.Um.bind(a));c.on(b,d.AD_PROGRESS,a.Ik.bind(a));c.on(b,d.AD_BUFFERING,a.Rm.bind(a));c.on(b,d.FIRST_QUARTILE,a.Fk.bind(a));c.on(b,d.MIDPOINT,a.Vm.bind(a));c.on(b,d.THIRD_QUARTILE,a.Lk.bind(a));c.on(b,d.PAUSED,a.Xm.bind(a));c.on(b,d.RESUMED,a.Ym.bind(a));c.on(b,d.CLICK,a.Ek.bind(a));c.on(b,d.SKIPPED,a.Jk.bind(a));c.on(b,d.IMPRESSION,a.Gk.bind(a));c.on(b,d.COMPLETE,a.Sm.bind(a));c.on(b,
|
|
5
|
+
d.CONTENT_RESUME_REQUESTED,a.hn.bind(a))},iU=function(a){a=a.I;var b=new google.ima.AdsRenderingSettings;b.restoreCustomPlaybackStateOnAdBreakComplete=!1;typeof a.bitrate===_.k&&(b.bitrate=a.bitrate);b.enablePreloading=typeof a.enablePreloading===_.Zc?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===
|
|
6
|
+
_.Zc&&(b.useStyledLinearAds=a.useStyledLinearAds);b.uiElements=Array.isArray(a.uiElements)?a.uiElements:[];return b},kU=function(a){a.o=null;jU(a,_.zc);a.m.getSurface().hide(a.L)},lU=function(a){return _.H(function(b){if(1==b.a)return _.x(b,a.m.detach(),2);var c=a.m;c.a&&c.a.stopForwardingEventsTo(c);_.z(b)})},mU=function(a){return _.H(function(b){return b["return"](new Promise(function(c){a.F.on(a.m,_.cg,function(){a.m.getState()===_.Jq&&c()})}))})},nU=function(a){_.jr(a.l,{visibility:"visible"})},
|
|
7
|
+
jU=function(a,b,c){c=c&&c.getAd();var d=null;c&&(d={ad:new dU(c,a.B,a.A)});a.m.trigger(new _.K(b,d))},oU=function(a,b){var c=b?a.P.create(b.getErrorCode()):null;a.m.onError(new _.N(1,9,10003,{errorType:c},b))},pU=function(a){return!1===a.I.disableCustomPlayback&&a.a.isCustomPlaybackUsed()&&_.wk()||_.xk()},rU=function(a){var b,c;return _.H(function(d){if(1==d.a)return a.N.initialize(),b=!!a.m.getConfiguration().muted,_.x(d,a.J.canPlay(b),2);if(3!=d.a)return c=d.f,c||pU(a)?pU(a)?_.x(d,lU(a),3):d.D(3):
|
|
8
|
+
(jU(a,_.Xc),a.g.warn(_.oa),d["return"]());qU(a);_.z(d)})},sU=function(a,b){return _.H(function(c){if(1==c.a)return a.N.initialize(),_.x(c,b.play(),2);qU(a);_.z(c)})},qU=function(a){a.a.init(a.l.offsetWidth,a.l.offsetHeight,google.ima.ViewMode.NORMAL);a.a.start();a.K=!0},tU=function(){this.a=this.h=this.f=null},uU=function(){return!window.google||!google.ima||!google.ima.AdsLoader},vU=function(){},wU=function(){this.Da=new _.J(cU)};_.r=dU.prototype;_.r.xb=function(){return"Google IMA SDK"};
|
|
9
9
|
_.r.yb=function(){return google.ima.VERSION};_.r.Cb=function(){return 0};_.r.getId=function(){return this.a.getAdId()};_.r.getCreativeId=function(){return this.a.getCreativeId()};_.r.bc=function(){return""};_.r.getApiFramework=function(){return this.a.getApiFramework()};_.r.getAdSystem=function(){return this.a.getAdSystem()};_.r.getAdvertiserName=function(){return this.a.getAdvertiserName()};_.r.getTitle=function(){return this.a.getTitle()};_.r.getDuration=function(){return this.a.getDuration()};
|
|
10
|
-
_.r.getPosition=function(){return 0};_.r.getSkipTimeOffset=function(){return this.a.getSkipTimeOffset()};_.r.fc=function(){return this.f?this.f.getIsBumper():!1};_.r.zb=function(){var a=null,b=this.a,c=Object.keys(b).find(function(d){return typeof b[d]===_.
|
|
11
|
-
_.r.
|
|
12
|
-
_.r.getWrapperCreativeIds=function(){return this.a.getWrapperCreativeIds()};_.r.ec=function(){return null};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
_.r
|
|
17
|
-
_.r.
|
|
18
|
-
_.r.
|
|
19
|
-
_.r.
|
|
20
|
-
_.r.
|
|
21
|
-
_.r.load=function(){var a=this,b,c,d,e,f;return _.H(function(g){if(1==g.a){b=a.m;c=a.I;try{if(typeof c.adTagUrl!==_.
|
|
22
|
-
return g["return"](a.f)})};_.r.start=function(a){var b=this;return _.H(function(c){return b.a&&b.w&&!b.K?b.w.Rb()?_.x(c,
|
|
23
|
-
_.r.getPosition=function(){if(!this.a||null===this.o)return-1;var a=this.a.getRemainingTime();return 0>a?0:this.o-a};_.r.Dc=function(){this.a&&(this.a.destroy(),this.a=null);
|
|
24
|
-
_.r.onPlayerWillDestroy=function(a){this.a&&(this.a.destroy(),this.a=null);this.h&&(this.h.destroy(),this.h=null);this.f&&(a.getSurface().removeElementFromContainer(this.f),this.f=null)};_.r.
|
|
25
|
-
|
|
10
|
+
_.r.getPosition=function(){return 0};_.r.getSkipTimeOffset=function(){return this.a.getSkipTimeOffset()};_.r.fc=function(){return this.f?this.f.getIsBumper():!1};_.r.zb=function(){var a=null,b=this.a,c=Object.keys(b).find(function(d){return typeof b[d]===_.Se&&typeof b[d].clickThroughUrl===_.fg});c&&(a=b[c].clickThroughUrl);return a};_.r.getMediaUrl=function(){return this.a.getMediaUrl()};_.r.ob=function(){return this.a.getVastMediaWidth()};_.r.nb=function(){return this.a.getVastMediaHeight()};
|
|
11
|
+
_.r.Wa=function(){return this.a.getVastMediaBitrate()};_.r.Xa=function(){return this.h?2:this.j?1:0};_.r.getPodIndex=function(){return this.f?this.f.getPodIndex():0};_.r.Ob=function(){return this.f?this.f.getTimeOffset():0};_.r.Bb=function(){return this.f?this.f.getAdPosition():1};_.r.pb=function(){return this.f?this.f.getTotalAds():1};_.r.getWrapperAdIds=function(){return this.a.getWrapperAdIds()};_.r.canSeek=function(){return!1};_.r.getWrapperAdSystems=function(){return this.a.getWrapperAdSystems()};
|
|
12
|
+
_.r.getWrapperCreativeIds=function(){return this.a.getWrapperCreativeIds()};_.r.ec=function(){return null};dU.prototype.getVideoElement=dU.prototype.ec;dU.prototype.getWrapperCreativeIds=dU.prototype.getWrapperCreativeIds;dU.prototype.getWrapperAdSystems=dU.prototype.getWrapperAdSystems;dU.prototype.canSeek=dU.prototype.canSeek;dU.prototype.getWrapperAdIds=dU.prototype.getWrapperAdIds;dU.prototype.getSequenceLength=dU.prototype.pb;dU.prototype.getPositionInSequence=dU.prototype.Bb;
|
|
13
|
+
dU.prototype.getPodTimeOffset=dU.prototype.Ob;dU.prototype.getPodIndex=dU.prototype.getPodIndex;dU.prototype.getPodType=dU.prototype.Xa;dU.prototype.getMediaBitrate=dU.prototype.Wa;dU.prototype.getMediaHeight=dU.prototype.nb;dU.prototype.getMediaWidth=dU.prototype.ob;dU.prototype.getMediaUrl=dU.prototype.getMediaUrl;dU.prototype.getClickThroughUrl=dU.prototype.zb;dU.prototype.isBumper=dU.prototype.fc;dU.prototype.getSkipTimeOffset=dU.prototype.getSkipTimeOffset;dU.prototype.getPosition=dU.prototype.getPosition;
|
|
14
|
+
dU.prototype.getDuration=dU.prototype.getDuration;dU.prototype.getTitle=dU.prototype.getTitle;dU.prototype.getAdvertiserName=dU.prototype.getAdvertiserName;dU.prototype.getAdSystem=dU.prototype.getAdSystem;dU.prototype.getApiFramework=dU.prototype.getApiFramework;dU.prototype.getSourceId=dU.prototype.bc;dU.prototype.getCreativeId=dU.prototype.getCreativeId;dU.prototype.getId=dU.prototype.getId;dU.prototype.getTechnology=dU.prototype.Cb;dU.prototype.getAdManagerVersion=dU.prototype.yb;
|
|
15
|
+
dU.prototype.getAdManagerName=dU.prototype.xb;eU.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}};fU.prototype.getCuePoints=function(){return this.a};fU.prototype.Rb=function(){return 0<=this.a.indexOf(0)||0===this.a.length};fU.prototype.Qb=function(){return 0<=this.a.indexOf(-1)};fU.prototype.hasPostroll=fU.prototype.Qb;fU.prototype.hasPreroll=fU.prototype.Rb;fU.prototype.getCuePoints=fU.prototype.getCuePoints;_.r=gU.prototype;
|
|
16
|
+
_.r.$m=function(a){var b=this;this.a=a.getAdsManager(this.l,iU(this));this.a.isCustomPlaybackUsed()&&!pU(this)?(this.g.warn("IMA plugin is disabled for this platform with single video element. Disposing."),this.m.onError(new _.N(1,9,10002)),this.Dc()):(this.h=new _.Zu(this.m.getSurface(),function(c,d,e){b.a.resize(c,d,e?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a=this.a.getCuePoints(),this.w=new fU(a),this.m.trigger(new _.K(_.Cc,{adsTimeline:this.w})),hU(this));this.f.resolve()};
|
|
17
|
+
_.r.Zm=function(a){oU(this,a.getError());this.f.resolve()};_.r.gn=function(a){var b=this;return _.H(function(c){if(1==c.a)return b.H=!0,pU(b)?(b.G=b.m.getPosition(),_.x(c,lU(b),3)):_.x(c,b.m.pause(),4);if(3!=c.a)return _.jr(b.l,{visibility:_.oe}),c.D(3);jU(b,_.hc,a);b.h.start();_.z(c)})};_.r.Qm=function(){var a=this;return _.H(function(b){a.a.start();_.z(b)})};_.r.Hk=function(a){a.getAd().isLinear()?jU(this,_.rc,a):(this.a.discardAdBreak(),this.B||(this.B=!0,this.m.play()))};
|
|
18
|
+
_.r.Kk=function(a){this.o=a.getAd().getDuration();jU(this,_.xc,a);this.m.getSurface().show(this.L)};_.r.Um=function(a){a=a.getAdData();oU(this,a?a.adError:null);kU(this)};_.r.Ik=function(a){jU(this,_.uc,a)};_.r.Rm=function(a){jU(this,_.jc,a)};_.r.Fk=function(a){jU(this,_.mc,a)};_.r.Vm=function(a){jU(this,_.sc,a)};_.r.Lk=function(a){jU(this,_.Ac,a)};_.r.Xm=function(a){jU(this,_.tc,a)};_.r.Ym=function(a){jU(this,_.vc,a)};_.r.Ek=function(a){this.pause();jU(this,_.kc,a)};
|
|
19
|
+
_.r.Jk=function(a){jU(this,_.wc,a);kU(this)};_.r.Gk=function(a){jU(this,_.qc,a)};_.r.Sm=function(a){jU(this,_.lc,a);kU(this)};
|
|
20
|
+
_.r.hn=function(){var a=this;return _.H(function(b){switch(b.a){case 1:a.B=!0;if(!pU(a)||null===a.G){if(!a.H)return b["return"](a.m.play());nU(a);b.D(2);break}var c=a.m;c.a&&c.a.forwardEventsTo(c);return _.x(b,_.Yt(a.m),3);case 3:if(a.A||!a.G){b.D(2);break}return _.x(b,mU(a),5);case 5:return _.x(b,a.m.seek(a.G),2);case 2:a.H=!1;a.h&&a.h.stop();if(a.A){b.D(7);break}return _.x(b,a.m.play(),7);case 7:jU(a,_.ic),_.z(b)}})};_.r.fn=function(){this.A=!0;this.j.contentComplete()};
|
|
21
|
+
_.r.load=function(){var a=this,b,c,d,e,f;return _.H(function(g){if(1==g.a){b=a.m;c=a.I;try{if(typeof c.adTagUrl!==_.fg)throw new _.N(1,9,10001,{missingKeys:"adTagUrl"});}catch(h){return b.onError(h),a.f.resolve(),g["return"](a.f)}return c.adTagUrl?_.x(g,a.J.canPlay(!1),2):(a.f.resolve(),g["return"](a.f))}if(3!=g.a)return d=g.f,_.x(g,a.J.canPlay(!0),3);e=g.f;f=new google.ima.AdsRequest;f.adTagUrl=c.adTagUrl;f.setAdWillAutoPlay(d);f.setAdWillPlayMuted(e);a.j.getSettings().setAutoPlayAdBreaks(!1);a.j.requestAds(f);
|
|
22
|
+
return g["return"](a.f)})};_.r.start=function(a){var b=this;return _.H(function(c){return b.a&&b.w&&!b.K?b.w.Rb()?_.x(c,rU(b),0):_.x(c,sU(b,a),0):_.x(c,a.play(),0)})};_.r.md=function(){};_.r.hd=function(){return!0};_.r.resume=function(){this.a&&this.a.resume()};_.r.pause=function(){this.a&&this.a.pause()};_.r.skip=function(){this.a&&this.a.skip()};_.r.getVolume=function(){return this.a?this.a.getVolume():1};_.r.setVolume=function(a){this.a&&this.a.setVolume(a)};
|
|
23
|
+
_.r.getPosition=function(){if(!this.a||null===this.o)return-1;var a=this.a.getRemainingTime();return 0>a?0:this.o-a};_.r.Dc=function(){this.a&&(this.a.destroy(),this.a=null);nU(this);this.F.release();this.h&&(this.h.stop(),this.h=null);return Promise.resolve()};gU.prototype.getPosition=gU.prototype.getPosition;gU.prototype.setVolume=gU.prototype.setVolume;gU.prototype.getVolume=gU.prototype.getVolume;gU.prototype.skip=gU.prototype.skip;gU.prototype.pause=gU.prototype.pause;gU.prototype.resume=gU.prototype.resume;_.w(tU,_.ew);_.r=tU.prototype;_.r.onPlayerCreated=function(a){if(uU())return a.onError(new _.N(1,9,1E4));this.f=_.hr(_.Pd,{"class":"clpp-ima clpp-hidden"});a.getSurface().addElementToContainer(this.f);this.h=new google.ima.AdDisplayContainer(this.f,a.getSurface().getMedia());this.a=new google.ima.AdsLoader(this.h);this.a.getSettings().setPlayerType(_.xa);this.a.getSettings().setPlayerVersion(_.ia);this.a.getSettings().setAutoPlayAdBreaks(!0)};
|
|
24
|
+
_.r.onPlayerWillDestroy=function(a){this.a&&(this.a.destroy(),this.a=null);this.h&&(this.h.destroy(),this.h=null);this.f&&(a.getSurface().removeElementFromContainer(this.f),this.f=null)};_.r.Ql=function(){return this.a};_.r.Ol=function(){return this.h};_.r.ud=function(){return this.f};_.r.id=function(){return"ima"};_.I("clpp.ima.ImaPlugin",tU);tU.prototype.getAdContainer=tU.prototype.ud;tU.prototype.getAdDisplayContainer=tU.prototype.Ol;tU.prototype.getAdsLoader=tU.prototype.Ql;tU.Id="ima";
|
|
25
|
+
tU.isSdkMissing=uU;vU.prototype.create=function(){return new tU};_.bu(new vU);wU.prototype.name=function(){return cU};wU.prototype.a=function(a,b){return a.namespace()===_.sd?!1:uU()?(this.Da.warn("IMA SDK is not loaded."),!1):!(!b||!b.ima)};wU.prototype.create=function(a){return new gU(a)};_.cr(new wU);};
|
|
26
26
|
if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
|
|
27
27
|
else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
|
|
28
28
|
else{_=this.clpp._;(f.call(g,this));}
|
package/cjs/cl.mediatailor.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(function(){var g={}; var _ = _ || {}
|
|
2
|
-
var f=function(window){var
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
var f=function(window){var $T=function(){this.g=new _.J("clpp.mediatailor.MediaTailorPlugin")},aU=function(a,b,c){var d,e,f,g,h;return _.H(function(l){if(1==l.a)return _.x(l,fetch(b,{method:_.sb,body:JSON.stringify(c.sessionConfig)}),2);if(3!=l.a)return d=l.f,_.x(l,d.json(),3);e=l.f;f=e.manifestUrl;g=e.trackingUrl;h={dj:_.bk(f,b),Fp:g?_.bk(g,b):null};a.g.info("Media Tailor session initialized.\n - manifest URI: "+h.dj);return l["return"](h)})},bU=function(){};_.w($T,_.ew);
|
|
3
|
+
$T.prototype.onContentWillLoad=function(a,b){var c=this,d,e,f;return _.H(function(g){if(1==g.a){d=a.getConfiguration().mediatailor;if(!d.enabled)return g["return"]();c.g.info("MediaTailor plugin is enabled");_.D(g,2);return _.x(g,aU(c,b.url,d),4)}if(2!=g.a)return e=g.f,a.trigger(new _.K("mt-session-started")),b.url=e.dj,_.vh(g,0);f=_.F(g);c.g.error("Failed to start session",f);throw new _.N(_.O,9,7003,"Media Tailor session failed to initialize.");})};$T.prototype.id=function(){return"mediatailor"};
|
|
4
|
+
bU.prototype.create=function(){return new $T};_.bu(new bU);};
|
|
5
5
|
if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
|
|
6
6
|
else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
|
|
7
7
|
else{_=this.clpp._;(f.call(g,this));}
|