@castlabs/prestoplay 6.28.0 → 6.29.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/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 +123 -113
- package/cjs/cl.conviva.js +28 -28
- package/cjs/cl.core.js +616 -609
- package/cjs/cl.crypto.js +7 -7
- package/cjs/cl.dash.js +89 -89
- package/cjs/cl.externs.js +127 -34
- package/cjs/cl.freewheel.js +25 -25
- package/cjs/cl.hls.js +79 -78
- package/cjs/cl.hlssmpte.js +6 -6
- package/cjs/cl.htmlcue.js +24 -24
- package/cjs/cl.ima.js +24 -23
- package/cjs/cl.mediatailor.js +3 -3
- package/cjs/cl.mse.js +350 -350
- package/cjs/cl.muxdata.js +14 -14
- package/cjs/cl.onboard.js +4 -4
- package/cjs/cl.persistent.js +14 -14
- package/cjs/cl.playlist.js +6 -6
- package/cjs/cl.simid.js +16 -16
- package/cjs/cl.smooth.js +71 -72
- package/cjs/cl.thumbnails.js +26 -26
- package/cjs/cl.tizen.js +70 -70
- 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 +37 -37
- package/cl.adobe.js +3 -3
- package/cl.airplay.js +3 -3
- package/cl.broadpeak.js +6 -6
- package/cl.cast.js +98 -91
- package/cl.conviva.js +27 -27
- package/cl.core.js +492 -488
- package/cl.crypto.js +8 -8
- package/cl.dash.js +82 -82
- package/cl.externs.js +123 -34
- package/cl.freewheel.js +19 -19
- package/cl.hls.js +82 -80
- package/cl.hlssmpte.js +5 -5
- package/cl.htmlcue.js +26 -26
- package/cl.ima.js +16 -15
- package/cl.mediatailor.js +2 -2
- package/cl.mse.js +303 -304
- 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.simid.js +14 -14
- package/cl.smooth.js +60 -60
- package/cl.thumbnails.js +19 -19
- package/cl.tizen.js +56 -56
- 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 +31 -31
- package/package.json +1 -1
- package/typings.d.ts +187 -87
package/cjs/cl.tizen.js
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
1
|
(function(){var g={}; var _ = _ || {}
|
|
2
|
-
var f=function(window){var
|
|
3
|
-
e);a.removeEventListener(b,d)}a.addEventListener(b,d)},
|
|
4
|
-
5):_.x(e,
|
|
5
|
-
f=JSON.stringify(e);a.g.debug("PlayReady properties: ",f);try{webapis.avplay.setDrm(c.PLAYREADY,"SetProperties",f)}catch(h){throw h;}_.z(g)})},
|
|
6
|
-
b.challenge);e=atob(b.challenge);f=new Uint8Array(e.length);for(g=0;g<e.length;++g)f[g]=e.charCodeAt(g);h=b.serverurl&&""!==b.serverurl?b.serverurl:d.
|
|
7
|
-
B=new _.N(_.O,6,6008,{browserError:JSON.stringify(D)}),a.
|
|
8
|
-
function(a,b){if(a.f!==b)if(a.f===_.
|
|
9
|
-
|
|
10
|
-
a.m.getConfiguration(),c=null,_.x(d,_.
|
|
11
|
-
onEvent:function(){}
|
|
12
|
-
c[d].textStreams;break}a=b}else a=[];b=[];for(d=c=0;d<a.length;d++){var e=new _.
|
|
13
|
-
break}}return c}return null},
|
|
14
|
-
a.o=f.language;_.z(g)})},
|
|
15
|
-
[]),d=a.f[_.X]||[];if(d.length){var e=null;c.some(function(g){e=_.
|
|
16
|
-
b){if(b){var c=b.track.type.toUpperCase();
|
|
17
|
-
b.bit_rate||null;return a},
|
|
18
|
-
|
|
19
|
-
_.
|
|
20
|
-
b){for(var c=a.f[_.
|
|
21
|
-
b.toUpperCase()})[0];var d=null;b===_.
|
|
22
|
-
1920;a.g.debug("Display resolution ratio: ",a.A)},function(c){a.g.debug("Could not load DISPLAY property");throw c;});_.z(b)})},
|
|
23
|
-
!!a.m.getTrackManager().
|
|
24
|
-
c),c;}},
|
|
25
|
-
d["return"](Promise.reject("SDK Timeout"));_.z(d)})},
|
|
26
|
-
e.nextBandwidth?(
|
|
27
|
-
a.setVolume(b.volume),b.muted&&
|
|
28
|
-
d(e)}}))})},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
d,e,b);0===c&&0===d&&1920===e&&1080===b&&webapis.avplay.setDisplayMethod("PLAYER_DISPLAY_MODE_LETTER_BOX")}else a.g.debug("Could not apply dimension. Player state "+a.a.getState())},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
var
|
|
37
|
-
_.r.
|
|
38
|
-
_.r.
|
|
39
|
-
_.r.load=function(a){var b=this,c,d,e,f,g,h,l;return _.I(function(m){switch(m.a){case 1:if(!b.m)return b.g.debug("Text streamer is not initialized. Will not load()"),m["return"]();b.B=a;c=b;return _.x(m,
|
|
40
|
-
onEvent:function(){},onError:function(){}};_.F(m,3);e=b;return _.x(m,b.j.start(a.url,d),5);case 5:e.a=m.f;_.G(m,4);break;case 3:return f=_.H(m),b.g.warn(f),_.F(m,6),g=b,_.x(m,b.j.start(a.url.replace(_.
|
|
41
|
-
_.G(m,0);break;case 10:_.H(m),b.g.debug("Could not setup media source..."),b.h=null,b.f=null,b.j=null,b.a=null,_.z(m)}})};_.r.
|
|
42
|
-
_.r.
|
|
43
|
-
_.r.release=function(){var a=this;return _.I(function(b){a.m=null;a.a=null;a.B=null;a.A=null;a.o=null;a.w=!0;a.l=null;_.z(b)})};_.r.destroy=function(){var a=this;return _.I(function(b){switch(b.a){case 1:if(!a.j){b.C(2);break}return _.x(b,a.j.stop(),3);case 3:a.j=null;case 2:if(!a.f){b.C(4);break}return _.x(b,a.f.destroy(),5);case 5:a.f=null,a.w=!0;case 4:if(!a.h){b.C(0);break}return _.x(b,a.h.destroy(),7);case 7:a.h=null,_.z(b)}})};_.w(
|
|
44
|
-
_.r.initialize=function(a){var b=this;this.m=a;this.a=this.m.a;this.m.on(_.
|
|
45
|
-
_.r.load=function(){if(this.a&&!(0<Object.keys(this.f).length)){this.j=this.m.h;this.m.off(_.
|
|
46
|
-
_.r.
|
|
47
|
-
_.r.Gb=function(a){var b=this;null===a?(a=this.
|
|
48
|
-
_.r.qb=function(a){var b=this,c=this.
|
|
49
|
-
_.r.addTextTrack=function(){};_.r.
|
|
50
|
-
|
|
51
|
-
_.r.
|
|
52
|
-
_.r.play=function(){function a(){return new Promise(function(d,e){function f(){d();clearTimeout(g)}var g=null;b.one(
|
|
53
|
-
Promise.resolve():Promise.reject("Player is in invalid state")};_.r.pause=function(){try{webapis.avplay.pause()}catch(a){Promise.reject(a)}return this.getState()===
|
|
54
|
-
_.r.setPlaybackRate=function(a){var b=this.getState();if(b===
|
|
55
|
-
_.r.load=function(a,b){var c=this,d;return _.I(function(e){switch(e.a){case 1:return c.g.debug("configure()",b||""),_.F(e,2),_.x(e,
|
|
56
|
-
_.r.seek=function(a){var b=this,c=1E3*a;return new Promise(function(d,e){b.B=!0;b.m.trigger(new _.Q(_.
|
|
57
|
-
_.r.release=function(){var a=this;return new Promise(function(b,c){try{a.h&&(a.h.release(),a.h=null);webapis.avplay.stop();webapis.avplay.close();for(var d in a.j){var e=a.j[d];e&&e.
|
|
58
|
-
_.r.setVolume=function(a){try{tizen.tvaudiocontrol.setVolume(Math.max(0,Math.min(100*a,100)))}catch(b){switch(b.name){case "InvalidValueError":this.g.warn("Invalid value passed for setVolume.","The passed value value should be in the range of 0 to 1.");break;case
|
|
59
|
-
_.r.isLive=function(){if(this.f&&this.a)return this.a.isLive;try{return"1"===webapis.avplay.getStreamingProperty("IS_LIVE")}catch(a){this.
|
|
60
|
-
var
|
|
61
|
-
_.r.
|
|
62
|
-
_.r.
|
|
63
|
-
_.r.init=function(a,b){this.configuration=this.B=b;this.w=a;this.a.on(
|
|
64
|
-
var e=[_.
|
|
2
|
+
var f=function(window){var rP="An unknown error occurred while trying to get volume",sP="Cannot get loading rendition due to platform limitations",tP="PARAM_START_POSITION",uP="SecurityError",vP="The require privilege is: http://tizen.org/privilege/tv.audio",wP="onbufferingcomplete",xP="onbufferingprogress",yP="onbufferingstart",zP="oncurrentplaytime",AP="ondrmevent",BP="onerror",CP="onstreamcompleted",DP="onsubtitlechange",EP="preparingend",FP="preparingstart",GP="|STARTBITRATE\x3d",HP=function(a,b,c){function d(e){c.call(a,
|
|
3
|
+
e);a.removeEventListener(b,d)}a.addEventListener(b,d)},IP=function(a,b){this.h=a;this.o=null;this.a=_.Se;this.l=null;this.j=!1;this.f=new Map;this.F=b;this.g=new _.L("clpp.tizen.DrmEngine")},LP=function(a){var b,c,d;return _.I(function(e){if(1==e.a){b=a.a===_.Gd||a.a===_.Ed;if(!b)throw new _.N(_.O,6,6001,"The key system "+a.a+" is not supported by the player or the platform");c=a.f.get(a.a);if(!c.Ae)throw new _.N(_.O,6,6012,"No license server given for "+a.a);_.F(e,2);return a.a===_.Gd?_.x(e,JP(a),
|
|
4
|
+
5):_.x(e,KP(a,c),5)}if(2!=e.a)return a.o={keySystem:a.a,licenseServerUri:c.Ae,distinctiveIdentifierRequired:!1,persistentStateRequired:c.Jg,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[],periodId:null},_.G(e,0);d=_.H(e);a.g.error("Error while configuring CDM for "+a.a,d);throw new _.N(_.O,6,6005,{message:JSON.stringify(d)});})},KP=function(a,b){var c,d,e,f;return _.I(function(g){c=MP;d=NP;e={};e[d.Pj]=!b.Jg;e[d.Rj]=b.Ae;""!==b.customData&&(e[d.Nj]=b.customData);
|
|
5
|
+
f=JSON.stringify(e);a.g.debug("PlayReady properties: ",f);try{webapis.avplay.setDrm(c.PLAYREADY,"SetProperties",f)}catch(h){throw h;}_.z(g)})},JP=function(a){var b;return _.I(function(c){b=MP;try{webapis.avplay.setDrm(b.Ze,"Initialize",""),webapis.avplay.setDrm(b.Ze,"widevine_app_session",a.l.id),webapis.avplay.setDrm(b.Ze,"widevine_data_type",a.l.type)}catch(d){throw d;}_.z(c)})},OP=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,t,u,y,B,A,C;_.I(function(E){if(1==E.a){c=MP;d=a.f.get(a.a);a.g.debug("DRM Challenge data: ",
|
|
6
|
+
b.challenge);e=atob(b.challenge);f=new Uint8Array(e.length);for(g=0;g<e.length;++g)f[g]=e.charCodeAt(g);h=b.serverurl&&""!==b.serverurl?b.serverurl:d.Ae;l=_.Xk([h],_.Tk());l.type=3;l.body=f.buffer;l.method=_.qb;_.F(E,2);return _.x(E,a.F.Cb.fetch(l).T,4)}if(2!=E.a){m=E.f;if(a.j){n=_.Ni(m.data);p=n.byteLength;q="";for(t=0;t<p;t++)q+=String.fromCharCode(n[t]);u=btoa(q);y=b.session_id+tP+(u+tP);a.g.debug("Widevine license params",y);try{webapis.avplay.setDrm(c.Ze,"widevine_license_data",y)}catch(D){a.g.error("License response rejected by CDM"),
|
|
7
|
+
B=new _.N(_.O,6,6008,{browserError:JSON.stringify(D)}),a.F.onError(B)}}return _.G(E,0)}A=_.H(E);a.g.error("License request failed.",JSON.stringify(A));C=new _.N(_.O,6,6007,{message:"Error while fetching license!",url:A.data.url,status:A.data.status||NaN,response:A.data.response||"",headers:A.data.headers||{}},A);a.F.onError(C);_.z(E)})},PP=function(a){this.m=a;this.a=this.m.a;this.f=_.gu;this.j=7;this.w=(new Date).getTime();this.l=!1;this.o=-1;this.h=2;this.g=new _.L("clpp.tizen.StateManager")},RP=
|
|
8
|
+
function(a,b){if(a.f!==b)if(a.f===_.Ko&&b!==_.gu)a.g.debug(_.OB+QP(b));else{var c=(new Date).getTime();a.j=a.f;a.f=b;2===a.f?(a.o=(new Date).getTime(),a.m.trigger(new _.Q(_.$c,{detail:{bufferedTimeMS:-1,reason:a.h}}))):2===a.j&&a.m.trigger(new _.Q(_.Zc,{detail:{bufferedTimeMS:c-a.o,reason:a.h}}));var d={currentState:a.f,previousState:a.j,timeSinceLastStateChangeMS:c-a.w};a.w=c;a.m.trigger(new _.Q(_.eg,{detail:d}));a.g.debug("State changed:",QP(a.j),"-\x3e",QP(a.f))}},QP=function(a){return Object.keys(_.nu)[a]},
|
|
9
|
+
UP=function(a){if(a.l){var b=a.a.getState(),c=a.f;switch(b){case SP:c=3;break;case TP:c=4;break;default:a.m.isEnded()?c=5:a.g.debug("Inconsistent AVPlay playback state:",b)}RP(a,c)}},VP=function(){this.o=this.A=this.f=this.h=this.B=this.m=this.j=this.a=null;this.D=!1;this.w=!0;this.l=null;this.g=new _.L("clpp.tizen.TextStreamer")},WP=function(a){if(!a)return!1;a=a.periods;for(var b=!1,c=0;c<a.length;c++)b=b||0<a[c].textStreams.length;return b},XP=function(a){var b,c;return _.I(function(d){if(1==d.a)return b=
|
|
10
|
+
a.m.getConfiguration(),c=null,_.x(d,_.aw(a.B.url,a.m.getNetworkEngine(),b.manifest.attemptParameters,a.B.type||null),2);(c=d.f)&&c.configure(b.manifest);return d["return"](c)})},YP=function(a){var b=document.createElement(_.Ng),c=new _.rF,d=new _.aD,e=a.m.getTextDisplayer();return new _.tF(b,c,e,d,a.m.getConfiguration())},ZP=function(a){var b={configuration:{},Ab:function(){return a.m.getPosition()},X:a.h,Cb:a.m.getNetworkEngine(),od:null,zg:a.wl.bind(a),Ui:a.vl.bind(a),onError:a.xl.bind(a),Vi:function(){},
|
|
11
|
+
onEvent:function(){},$i:a.yl.bind(a),Ef:function(){},he:function(){return new _.gG},fg:function(){return!1},be:null};return new _.NG(a.a,b)},$P=function(a){var b=a.m.getPosition(),c=null;a=_.v(a.a.periods);for(var d=a.next();!d.done;d=a.next())d=d.value,d.startTime<=b&&(c=d);return c},aQ=function(a){a.g.debug("getTextStreams()",a.a);if(a.a){var b=[],c=a.a.periods;a.g.debug("getting text streams");for(var d=0;d<c.length;d++)if(a.g.debug(c[d].startTime,a.m.getPosition()),c[d].startTime<=a.m.getPosition()){b=
|
|
12
|
+
c[d].textStreams;break}a=b}else a=[];b=[];for(d=c=0;d<a.length;d++){var e=new _.at(String(c++),_.ct);e.mimeType=a[d].mimeType;e.language=a[d].language;e.roles=a[d].roles;e.kind=a[d].kind||_.lC;var f=new _.jt(String(a[d].id),e);f.bandwidth=a[d].bandwidth||null;e.renditions.push(f);b.push(e)}return b},bQ=function(a){if(a.h&&!a.h.getTextDisplayer().isTextVisible())return null;if(a.f){var b=_.QG(a.f,_.Fn),c=null;if(b){a=aQ(a);for(var d=0;d<a.length;d++)if(a[d].renditions[0].id===String(b.id)){c=a[d].renditions[0];
|
|
13
|
+
break}}return c}return null},cQ=function(a,b){var c,d,e,f;_.I(function(g){if(1==g.a){c=_.AJ;a.g.debug("Set active track",b);if(!b)return g.C(0);a.o=b.language;a.A=b.roles[0]||"";a.D=b.kind===c.lh;if(!a.a||!a.f)return g.C(0);a.setTextVisibility(!0);d=$P(a);e=b.renditions[0];f=d.textStreams.find(function(h){return String(h.id)===e.id});return f?a.w?(a.g.debug("Switching period defer text selection"),a.l=f,g.C(4)):_.x(g,_.jH(a.f,f),5):(a.g.error("No stream with id",e.id),g["return"]())}4!=g.a&&a.m.trigger(new _.Q(_.qg));
|
|
14
|
+
a.o=f.language;_.z(g)})},dQ=function(){this.j=this.a=this.m=null;this.f={};this.g=new _.L("clpp.tizen.TrackManager");this.w=this.o=this.l=null;this.A=!1;this.h=1},eQ=function(a,b){a.m.trigger(new _.Q(_.Rg,{details:{width:b.width,height:b.height,bandwidth:b.bandwidth,track:b.track,abrSelection:a.a.o}}))},fQ=function(a){var b=a.qa();b&&a.m.trigger(new _.Q(_.Xc,{detail:{width:b.width,height:b.height,bandwidth:b.bandwidth,rendition:b}}))},gQ=function(a){var b=a.m.getConfiguration(),c=_.Ei(b.preferredAudioLanguage||
|
|
15
|
+
[]),d=a.f[_.X]||[];if(d.length){var e=null;c.some(function(g){e=_.SC(g,d.map(function(h){return h.language}));return!!e});if(e){var f=d.filter(function(g){return g.language===e});c=f[0];1<f.length&&b.preferredAudioRole&&(f=f.filter(function(g){return 0<=g.roles.indexOf(b.preferredAudioRole)}),0<f.length&&(c=f[0]));a.g.debug("Setting audio track with preferred language:",e);a.Ha(c)}else a.g.debug("Preferred language(s) not available")}else a.g.debug("Could not set preferred audio language")},kQ=function(a,
|
|
16
|
+
b){if(b){var c=b.track.type.toUpperCase();hQ(a.a,c,Number(b.id)).then(function(){c===iQ&&(a.l=b,a.m.trigger(new _.Q(_.Vc)));c===jQ&&(a.o=b,a.m.trigger(new _.Q(_.qg)))})["catch"](function(){a.g.error("Could not select "+c+" track.")})}else a.g.debug("Must provide valid rendition")},lQ=function(a,b,c){var d=_.uo(b.language||_.Cg);c.language=_.bt(d);c.originalLanguage=d;c.channelsCount=b.channels?Number(b.channels):null;c.mimeType=_.Sc;a=new _.jt(String(a),c);a.track=c;a.codec=b.fourCC||null;a.bandwidth=
|
|
17
|
+
b.bit_rate||null;return a},mQ=function(a,b,c){c.mimeType=_.Pg;a=new _.jt(String(a),c);a.track=c;a.width=b.Width||null;a.height=b.Height||null;a.bandwidth=b.Bit_rate?Number(b.Bit_rate):null;a.codec=b.fourCC||null;return a},nQ=function(a,b,c){b=_.uo(b.track_lang||_.Cg);c.mimeType="text/ttml";c.language=_.bt(b);c.originalLanguage=b;c.kind=_.lC;return new _.jt(String(a),c)},oQ=function(a,b){var c=null;try{c=JSON.parse(b)}catch(d){a.g.warn("Couldn't retrieve extra infos from stream."),c=null}return c},
|
|
18
|
+
rQ=function(a,b){function c(n,p){for(var q=0;q<n.length;q++)if(n[q].language===p)return n[q];return null}var d={};if(0>=b.length)return d;for(var e=b.filter(function(n){return n.type===pQ}),f=b.filter(function(n){return n.type===iQ}),g=[],h=0;h<f.length;h++){var l=oQ(a,f[h].extra_info);if(l){var m=_.uo(l.language||_.Cg);m=_.bt(m);m=c(g,m);m||(m=new _.at(String(a.h++),_.X),g.push(m));m.renditions.push(lQ(f[h].index,l,m))}else a.g.warn("Skipping audio stream with no extra info")}f=new _.at(String(a.h++),
|
|
19
|
+
_.dt);for(h=0;h<e.length;h++)(l=oQ(a,e[h].extra_info))?f.renditions.push(mQ(e[h].index,l,f)):a.g.warn("Skipping video stream with no extra info");e=[];e=a.j?aQ(a.j):qQ(a,b);d[_.dt]=[f];d[_.X]=g;d[_.ct]=e;return d},qQ=function(a,b){for(var c=b.filter(function(h){return h.type===jQ}),d=[],e=0;e<c.length;e++){var f=oQ(a,c[e].extra_info);if(f){var g=new _.at(String(a.h++),_.ct);g.renditions.push(nQ(c[e].index,f,g));d.push(g)}else a.g.warn("Skipping text stream with no extra info")}return d},sQ=function(a,
|
|
20
|
+
b){for(var c=a.f[_.dt]||[],d=[],e=0;e<c.length;e++)for(var f=0;f<c[e].renditions.length;f++)_.M.ta(c[e].renditions[f],b,Object.keys(b))&&d.push(c[e].renditions[f]);return d[0]||null},tQ=function(a,b,c){a=a.f[c]||[];b=String(b.index);c=null;for(var d=0;d<a.length;d++)for(var e=0;e<a[d].renditions.length;e++)if(a[d].renditions[e].id===b){c=a[d].renditions[e];break}return c},vQ=function(a,b){if(b===_.ct&&a.j)return bQ(a.j);var c=uQ(a.a)||[];if(0===c.length)return null;c=c.filter(function(e){return e.type===
|
|
21
|
+
b.toUpperCase()})[0];var d=null;b===_.dt&&(d=oQ(a,c.extra_info),d=sQ(a,{width:d.Width,height:d.Height}));b===_.X&&(c?(d=tQ(a,c,_.X),a.l=d):d=a.l);b===_.ct&&(c?(d=tQ(a,c,_.ct),a.o=d):d=a.o);return d},wQ=function(a){_.zi.call(this);this.m=a;this.h=null;this.g=new _.L("clpp.tizen.Middleware");this.D=1;this.B=!1;this.l=null;this.G=0;this.o=!0;this.f=!1;this.a=null;this.A=1;this.w=!1;this.j={}},xQ=function(a){return _.I(function(b){tizen.systeminfo.getPropertyValue("DISPLAY",function(c){a.A=c.resolutionWidth/
|
|
22
|
+
1920;a.g.debug("Display resolution ratio: ",a.A)},function(c){a.g.debug("Could not load DISPLAY property");throw c;});_.z(b)})},yQ=function(a){try{webapis.avplay.setListener({onbufferingstart:a.ql.bind(a),onbufferingprogress:a.pl.bind(a),onbufferingcomplete:a.ol.bind(a),onstreamcompleted:a.tl.bind(a),oncurrentplaytime:function(b){a.trigger(new _.Q(zP,{currentTime:b}))},onevent:a.sl.bind(a),onsubtitlechange:a.ul.bind(a),ondrmevent:a.rl.bind(a),onerror:a.Xd.bind(a)})}catch(b){a.g.error(b)}},zQ=function(a){var b=
|
|
23
|
+
!!a.m.getTrackManager().Ya();try{webapis.avplay.setSilentSubtitle(!b)}catch(c){a.g.debug("Could not set AVPlay subtitle config",c)}},AQ=function(a,b){try{var c=b.estimatedBandwidth||0,d=b.currentBandwidth||0;a.g.debug({estimatedBandwidth:c,xp:d});0!==c&&0!==d&&c>=1.15*d&&webapis.avplay.setStreamingProperty("ADAPTIVE_INFO",GP+d)}catch(e){a.g.debug(e)}},BQ=function(a,b){try{webapis.avplay.setStreamingProperty("ADAPTIVE_INFO","|BITRATES\x3d"+b+GP+b)}catch(c){throw a.g.debug("Could not set fixed bandwidth",
|
|
24
|
+
c),c;}},EQ=function(a){return{position:a.getPosition(),state:a.m.getState(),wh:a.getState(),playbackRate:a.getPlaybackRate(),isLive:a.isLive(),duration:a.getDuration(),isMuted:CQ(a),volume:a.getVolume(),So:DQ(a),Jl:uQ(a)}},GQ=function(a){var b,c;return _.I(function(d){if(1==d.a)return _.x(d,FQ(),2);if(3!=d.a)return b=new Promise(function(e){(new _.ej(e)).ha(5)}),_.x(d,Promise.race([xQ(a).then(function(){return!0}),b.then(function(){return!1})]),3);c=d.f;if(!c)return a.g.debug("Took to long for the SDK to be ready"),
|
|
25
|
+
d["return"](Promise.reject("SDK Timeout"));_.z(d)})},JQ=function(a,b,c){var d,e,f,g,h,l,m,n;return _.I(function(p){switch(p.a){case 1:a.l=_.Un(b);d=a.G;e=c||{estimatedBandwidth:0,currentBandwidth:0,nextBandwidth:null,currentPosition:0};a.g.debug("Loading manifest URL: "+a.l[d].url);f=b.startTime||void 0;a.f&&(a.trigger(new _.Q(yP)),f=c.currentPosition);_.F(p,2);g=a.l[d].url;h=a.l[d].type;h!==_.Hc||g.includes(".mpd")||(l=new URL(g),l.searchParams.append("cl-ext",".mpd"),g=l.toString());webapis.avplay.open(g);
|
|
26
|
+
e.nextBandwidth?(BQ(a,e.nextBandwidth),a.o=!1):(a.o||AQ(a,e),a.o=!0);yQ(a);if(!b.drm||!b.drm.env){a.g.debug("No DRM configuration was provided. Assuming clear content");p.C(4);break}m={onError:function(q){return a.m.onError(q)},Cb:a.m.getNetworkEngine()};a.h=new IP(b.drm,m);return _.x(p,a.h.init(),4);case 4:return a.f||a.trigger(new _.Q(FP)),_.x(p,HQ(a),6);case 6:a.f||a.trigger(new _.Q(EP));f&&typeof f===_.k&&0<f&&a.seek(f)["catch"](function(q){a.g.debug("Couldn't set start position",q)});a.f||(b.volume&&
|
|
27
|
+
a.setVolume(b.volume),b.muted&&IQ(a,b.muted),b.autoplay&&a.m.play()["catch"](function(q){a.g.debug("Autoplay failed",q)}));_.G(p,0);break;case 2:throw n=_.H(p),a.g.debug("Error while attempting to load source."),n;}})},HQ=function(a){return _.I(function(b){a.g.debug("avplay.prepare()");return b["return"](new Promise(function(c,d){try{webapis.avplay.prepareAsync(function(){a.g.debug("AVPlay is ready!");zQ(a);c()},function(e){a.g.debug("prepareAsync failed",e);d(e)})}catch(e){a.g.debug("Failed to prepare media player for playback"),
|
|
28
|
+
d(e)}}))})},KQ=function(a,b,c){a.g.debug("switchVideoTrack()");try{var d={estimatedBandwidth:parseInt(webapis.avplay.getStreamingProperty("CURRENT_BANDWITH"),10),currentBandwidth:b,nextBandwidth:c,currentPosition:a.getPosition()};a.a=EQ(a);a.f=!0;webapis.avplay.stop();webapis.avplay.close();return a.load(a.m.getConfiguration(),d).then(function(){var e=a.a.wh;a.f=!1;a.a=null;return e===TP?a.pause():a.play()})}catch(e){return Promise.reject(e)}},DQ=function(a){return a.f&&a.a?a.a.So:webapis.avplay.getTotalTrackInfo()},
|
|
29
|
+
uQ=function(a){return a.f&&a.a?a.a.Jl:webapis.avplay.getCurrentStreamInfo()},hQ=function(a,b,c){b=b.toUpperCase();b===jQ&&LQ(a,!0);var d=a.j[b];d&&(d.Pf.stop(),a.j[b]=null,a.g.debug("Cancelled pending track switch for "+b));return new Promise(function(e,f){function g(h,l,m){m=void 0===m?!1:m;try{webapis.avplay.setSelectTrack(h,l),a.j[h]=null,e()}catch(n){a.g.debug("Could not set "+h+" track. Trying again...AVPlay state: "+(a.getState()+", buffering: ")+a.w,n),!1===m&&(a.j[h]={type:h,index:l,sh:0,
|
|
30
|
+
Pf:new _.ej(function(){return g(h,c,!0)})}),(l=a.j[h])&&3>l.sh?(a.w||++l.sh,l.Pf.ha(a.w?.5:.25)):(a.g.debug("Could not set track after multiple attempts.Giving up..."),l&&l.Pf.stop(),a.j[h]=null,f())}}g(b,c)})},LQ=function(a,b){var c=a.m.getTextDisplayer();c&&c.setTextVisibility(b);c=a.m.h;try{c||webapis.avplay.setSilentSubtitle(!b)}catch(d){a.g.debug("Could not set text track visibility",d)}},IQ=function(a,b){try{tizen.tvaudiocontrol.setMute(b)}catch(c){switch(c.name){case uP:a.g.warn("The application does not have the privilege to set mute.",
|
|
31
|
+
vP);break;default:a.g.warn(rP,c)}}},CQ=function(a){var b=null;try{b=tizen.tvaudiocontrol.isMute()}catch(c){switch(c.name){case uP:a.g.warn("The application doesn't have the privilege to get the mute state.",vP);break;default:a.g.warn(rP,c)}}return!!b},FQ=function(){return new Promise(function(a,b){if(window.webapis)a();else{var c=document.createElement("script");HP(c,_.De,function(d){return a(d)});HP(c,_.ke,function(d){return b(d)});c.src="$WEBAPIS/webapis/webapis.js";document.querySelector("head").appendChild(c)}})},
|
|
32
|
+
MQ=function(){_.zi.call(this);this.a=new wQ(this);this.f=new PP(this);this.configuration=this.B=_.On();this.w=null;this.g=new _.L("clpp.tizen.Player");this.j=null;this.l=new dQ;this.D=new _.Zm;this.o=this.h=null;this.A=!1},NQ=function(a){if("NONE"!==a.a.getState()){var b=a.j.getBoundingClientRect();a=a.a;var c=Math.floor(b.left*a.A),d=Math.floor(b.top*a.A),e=Math.floor(b.width*a.A);b=Math.floor(b.height*a.A);a.g.debug("Setting display area to","x:",c,"y:",d,"width:",e,"height:",b);webapis.avplay.setDisplayRect(c,
|
|
33
|
+
d,e,b);0===c&&0===d&&1920===e&&1080===b&&webapis.avplay.setDisplayMethod("PLAYER_DISPLAY_MODE_LETTER_BOX")}else a.g.debug("Could not apply dimension. Player state "+a.a.getState())},OQ=function(){},PQ=function(){};
|
|
34
|
+
IP.prototype.init=function(){var a=this,b,c,d,e,f,g;return _.I(function(h){if(1==h.a){b=_.Xn[a.h.env]||null;if(!b)throw a.g.debug(_.Aa,_.vb+a.h.env+_.aa),new _.N(_.O,6,6015,_.Ba+a.h.env+"' is missing.");a.l={id:String(Math.floor(1E4*Math.random())),type:"MPEG-DASH"};c=Object.keys(a.h.customData||{}).length?btoa(JSON.stringify(a.h.customData)):"";d=_.Zn(b,a.h.customData);(e=d[_.Ed])&&a.f.set(_.Ed,{Ae:e.licenseUrl||"",customData:c,Jg:!1});(f=d[_.Gd])&&a.f.set(_.Gd,{Ae:f.licenseUrl||"",customData:c,
|
|
35
|
+
Jg:!1});if(0===a.f.size)throw new _.N(_.O,6,6E3);if((g=a.h.preferredDrmSystem)&&a.f.get(g))a.a=g;else if(a.f.get(_.Ed))a.a=_.Ed;else if(a.f.get(_.Gd))a.a=_.Gd;else throw new _.N(_.O,6,6001,"Configuration for the target system is missing.");return _.x(h,LP(a),2)}a.j=!0;_.z(h)})};IP.prototype.release=function(){var a=this;return _.I(function(b){a.j=!1;a.o=null;a.a=_.Se;a.l=null;a.f=new Map;_.z(b)})};IP.prototype.getDrmInfo=function(){return this.o};
|
|
36
|
+
var NP={Pj:"DeleteLicenseAfterUse",Rj:"LicenseServer",ip:"GetChallenge",jp:"HttpHeader",lp:"UserAgent",fp:"Cookie",Nj:"CustomData"};_.r=PP.prototype;_.r.initialize=function(){this.a.on(yP,this.Oh,this);this.a.on(xP,this.Nh,this);this.a.on(wP,this.Mh,this);this.a.on(FP,this.bj,this);this.a.on(EP,this.aj,this);this.a.on(CP,this.Ph,this)};_.r.release=function(){RP(this,_.gu);this.l=!1;this.o=-1;this.h=2};_.r.destroy=function(){this.release();this.a.off(yP,this.Oh);this.a.off(xP,this.Nh);this.a.off(wP,this.Mh);this.a.off(FP,this.bj);this.a.off(EP,this.aj);this.a.off(CP,this.Ph);this.m=this.a=null};
|
|
37
|
+
_.r.Oh=function(){this.g.debug("Buffering start. Player state: ",this.a.getState());this.h=this.a.B?1:2;RP(this,2)};_.r.Nh=function(a){this.g.debug("Buffering progress: "+a.percent+" %. Player state: ",QP(this.f))};_.r.Mh=function(){this.g.debug("Buffering complete. Player state: ",this.a.getState());if(!this.l){this.l=!0;var a=this.m.getConfiguration().autoplay,b=this.a.getState()===QQ;if(!a&&b){RP(this,4);return}}if(a=1!==this.f)a=this.a.getState(),a=a===SP||a===TP;a&&UP(this)};
|
|
38
|
+
_.r.bj=function(){this.g.debug("Preparing starts. AVPlay State: ",this.a.getState());this.a.getState()===RQ?RP(this,1):this.g.error("AVPlay prepares while state is not IDLE")};_.r.aj=function(){this.g.debug("Preparing ends: AVPlay state:",this.a.getState())};_.r.Ph=function(){RP(this,5)};_.r.getState=function(){return this.f};_.r=VP.prototype;_.r.initialize=function(a){this.m=a};
|
|
39
|
+
_.r.load=function(a){var b=this,c,d,e,f,g,h,l;return _.I(function(m){switch(m.a){case 1:if(!b.m)return b.g.debug("Text streamer is not initialized. Will not load()"),m["return"]();b.B=a;c=b;return _.x(m,XP(b),2);case 2:c.j=m.f;if(!b.j)return b.g.debug("Could not find manifest parser for source. Make sure parsers are registered."),m["return"]();d={configurationId:"",networkingEngine:b.m.getNetworkEngine(),onContentSteeringInfoFound:function(){return null},filterNewPeriod:function(){},filterAllPeriods:function(){},
|
|
40
|
+
onEvent:function(){},onError:function(){}};_.F(m,3);e=b;return _.x(m,b.j.start(a.url,d),5);case 5:e.a=m.f;_.G(m,4);break;case 3:return f=_.H(m),b.g.warn(f),_.F(m,6),g=b,_.x(m,b.j.start(a.url.replace(_.te,"http://"),d),8);case 8:g.a=m.f;_.G(m,4);break;case 6:h=_.H(m),b.g.error(h),b.a=null;case 4:if(!b.a||!WP(b.a)){m.C(0);break}b.h=YP(b);_.F(m,10);return _.x(m,b.h.open(),12);case 12:b.f=ZP(b);l=b.m.getConfiguration();b.f.h=l.streaming;b.o=l.preferredTextLanguage;b.A=l.preferredTextRole;b.D=l.preferForcedSubtitles;
|
|
41
|
+
_.G(m,0);break;case 10:_.H(m),b.g.debug("Could not setup media source..."),b.h=null,b.f=null,b.j=null,b.a=null,_.z(m)}})};_.r.wl=function(a){this.g.debug(_.fC,a.id);this.w=!0;var b=_.fG(a.textStreams,this.o||"",this.A||"",this.D)[0]||null;this.l&&(a.textStreams.includes(this.l)&&(b=this.l),this.l=null);return{video:null,audio:null,text:b,ab:null}};_.r.vl=function(){var a=this;return _.I(function(b){if(1==b.a)return a.g.debug("canSwitch_"),a.w=!1,a.l?_.x(b,_.jH(a.f,a.l),3):b.C(0);a.l=null;_.z(b)})};
|
|
42
|
+
_.r.xl=function(){this.g.debug("onError_")};_.r.yl=function(){this.j&&this.j.update&&this.j.update()};_.r.start=function(){var a=this;return _.I(function(b){if(!a.f)return b["return"]();try{a.f.start()}catch(c){a.g.error("Error while starting streaming engine",c)}_.z(b)})};_.r.setTextVisibility=function(a){this.g.debug("Set text visibility",a);this.h&&this.h.getTextDisplayer().setTextVisibility(a)};
|
|
43
|
+
_.r.release=function(){var a=this;return _.I(function(b){a.m=null;a.a=null;a.B=null;a.A=null;a.o=null;a.w=!0;a.l=null;_.z(b)})};_.r.destroy=function(){var a=this;return _.I(function(b){switch(b.a){case 1:if(!a.j){b.C(2);break}return _.x(b,a.j.stop(),3);case 3:a.j=null;case 2:if(!a.f){b.C(4);break}return _.x(b,a.f.destroy(),5);case 5:a.f=null,a.w=!0;case 4:if(!a.h){b.C(0);break}return _.x(b,a.h.destroy(),7);case 7:a.h=null,_.z(b)}})};_.w(dQ,_.zt);_.r=dQ.prototype;_.r.Si=function(a){var b=a.eventid;a=a.data;switch(b){case SQ:0<Object.keys(this.f).length||(this.g.debug("Loading track manager!"),this.load());b=webapis.avplay.getCurrentStreamInfo();0<b.length&&(b=+oQ(this,b[0].extra_info).Bit_rate,b=sQ(this,{bandwidth:b}))&&(this.w=b,eQ(this,b));break;case TQ:fQ(this);break;default:this.g.debug("Event type: "+b+" data: "+a)}};_.r.Dg=function(a){3===a.detail.currentState&&this.m.off(_.eg,this.Dg)};
|
|
44
|
+
_.r.initialize=function(a){var b=this;this.m=a;this.a=this.m.a;this.m.on(_.eg,function(c){b.A||(c=c.detail,3===c.currentState&&(b.g.debug("Current state",c.currentState),b.A=!0,gQ(b)))});this.a.on("onevent",this.Si,this)};_.r.release=function(){this.f={};this.j=this.w=this.o=this.l=null;this.A=!1;this.h=1};
|
|
45
|
+
_.r.load=function(){if(this.a&&!(0<Object.keys(this.f).length)){this.j=this.m.h;this.m.off(_.eg,this.Dg);this.m.on(_.eg,this.Dg,this);try{var a=DQ(this.a);this.f=rQ(this,a);var b=this.f[_.X]||[];b.length&&(this.l=b[0].renditions[0]||null);fQ(this)}catch(c){this.g.debug("Could not load track manager")}}};_.r.destroy=function(){this.a.off("onevent",this.Si);this.a=this.m=null};_.r.getVideoTracks=function(){return this.f[_.dt]||[]};_.r.getAudioTracks=function(){return this.f[_.X]||[]};
|
|
46
|
+
_.r.pa=function(){return this.f[_.ct]||[]};_.r.qa=function(){return vQ(this,_.dt)};_.r.Ta=function(){return vQ(this,_.X)};_.r.Ya=function(){return vQ(this,_.ct)};_.r.yb=function(){return this.w};_.r.Mb=function(){this.g.info(sP);return null};_.r.Nb=function(){this.g.info(sP);return null};_.r.Ma=function(){var a=this.qa();return a?a.track:null};_.r.oa=function(){var a=this.Ta();return a?a.track:null};_.r.wa=function(){var a=this.Ya();return a?a.track:null};
|
|
47
|
+
_.r.Gb=function(a){var b=this;null===a?(a=this.qa(),KQ(this.a,a.bandwidth,null).then(function(){fQ(b)})):0<a.renditions.length&&this.qb(a.renditions[0])};_.r.Ha=function(a){a?kQ(this,a.renditions[0]):this.g.warn("Cannot disable audio tracks on this platform.","Consider muting audio instead...")};_.r.Za=function(a){a?(a=a.renditions[0],this.j?cQ(this.j,a.track):kQ(this,a)):(this.g.debug("Disabling text tracks"),this.o=null,LQ(this.a,!1),this.m.trigger(new _.Q(_.qg)))};
|
|
48
|
+
_.r.qb=function(a){var b=this,c=this.qa();this.a.o||a.width!==c.width||a.height!==c.height||a.bandwidth!==c.bandwidth?(this.w=a,eQ(this,a),KQ(this.a,c.bandwidth,a.bandwidth).then(function(){fQ(b)})["catch"](function(d){var e=new _.N(_.O,7,7200,{tizenerror:d});b.g.debug("Error while switching video track",d);b.m.onError(e)})):this.g.debug("Trying to switch to already active rendition. Doing nothing...")};_.r.Eb=function(a){kQ(this,a)};_.r.Fb=function(a){this.j?cQ(this.j,a.track):kQ(this,a)};
|
|
49
|
+
_.r.addTextTrack=function(){};_.r.xa=function(){return this.a.o};dQ.prototype.isAbrEnabled=dQ.prototype.xa;dQ.prototype.addTextTrack=dQ.prototype.addTextTrack;dQ.prototype.setTextRendition=dQ.prototype.Fb;dQ.prototype.setAudioRendition=dQ.prototype.Eb;dQ.prototype.setVideoRendition=dQ.prototype.qb;dQ.prototype.setTextTrack=dQ.prototype.Za;dQ.prototype.setAudioTrack=dQ.prototype.Ha;dQ.prototype.setVideoTrack=dQ.prototype.Gb;dQ.prototype.getTextTrack=dQ.prototype.wa;dQ.prototype.getAudioTrack=dQ.prototype.oa;
|
|
50
|
+
dQ.prototype.getVideoTrack=dQ.prototype.Ma;dQ.prototype.getLoadingTextRendition=dQ.prototype.Nb;dQ.prototype.getLoadingAudioRendition=dQ.prototype.Mb;dQ.prototype.getLoadingVideoRendition=dQ.prototype.yb;dQ.prototype.getTextRendition=dQ.prototype.Ya;dQ.prototype.getAudioRendition=dQ.prototype.Ta;dQ.prototype.getVideoRendition=dQ.prototype.qa;dQ.prototype.getTextTracks=dQ.prototype.pa;dQ.prototype.getAudioTracks=dQ.prototype.getAudioTracks;dQ.prototype.getVideoTracks=dQ.prototype.getVideoTracks;_.w(wQ,_.zi);_.r=wQ.prototype;_.r.ql=function(){this.w=!0;this.f||this.trigger(new _.Q(yP))};_.r.pl=function(a){this.w=!0;this.trigger(new _.Q(xP,{percent:a}))};_.r.ol=function(){this.w=!1;this.trigger(new _.Q(wP))};_.r.tl=function(){this.trigger(new _.Q(CP))};_.r.sl=function(a,b){this.trigger(new _.Q("onevent",{eventid:a,data:b}))};_.r.ul=function(a,b,c,d,e){this.trigger(new _.Q(DP,{duration:a,text:b,subtitleType:c,attriCount:d,attributes:e}))};
|
|
51
|
+
_.r.rl=function(a,b){this.trigger(new _.Q(AP,{drmType:a,drmData:b}));if(this.h){var c=this.h;if(c.j)if(c.a===_.Gd&&"Challenge"===b.name)OP(c,b);else if("DrmError"===b.name){c.g.debug("DrmError event",b);var d=new _.N(_.O,6,6005,{message:JSON.stringify(b)});c.F.onError(d)}}};_.r.Xd=function(a){this.trigger(new _.Q(BP,{eventType:a}))};
|
|
52
|
+
_.r.play=function(){function a(){return new Promise(function(d,e){function f(){d();clearTimeout(g)}var g=null;b.one(zP,f,b);g=setTimeout(function(){b.off(zP,f);e("Timeout")},3E4)})}var b=this,c=this.getState();if(c===RQ)return(new Promise(function(d,e){webapis.avplay.prepareAsync(function(){zQ(b);d(webapis.avplay.play())},function(f){b.trigger(new _.Q(BP));e(f)})})).then(function(){return a()});if(c===TP||c===QQ)try{return webapis.avplay.play(),a()}catch(d){return Promise.reject(d)}return c===SP?
|
|
53
|
+
Promise.resolve():Promise.reject("Player is in invalid state")};_.r.pause=function(){try{webapis.avplay.pause()}catch(a){Promise.reject(a)}return this.getState()===TP?Promise.resolve():Promise.reject()};
|
|
54
|
+
_.r.setPlaybackRate=function(a){var b=this.getState();if(b===QQ||b===SP||b===TP){try{webapis.avplay.setSpeed(a),this.D=a}catch(c){return this.g.debug("Error while trying to set playback rate",c),this.setPlaybackRate(this.D)}return!0}this.g.debug("Cannot set playback rate; AVPlay is in inconsistent state: "+b);return!1};_.r.getPlaybackRate=function(){return this.D};
|
|
55
|
+
_.r.load=function(a,b){var c=this,d;return _.I(function(e){switch(e.a){case 1:return c.g.debug("configure()",b||""),_.F(e,2),_.x(e,GQ(c),4);case 4:return _.x(e,JQ(c,a,b),5);case 5:_.G(e,0);break;case 2:throw d=_.H(e),new _.N(_.O,7,7003,null,d);}})};_.r.getState=function(){if(this.f&&this.a)return this.a.wh;try{return webapis.avplay.getState()}catch(a){this.Xd(JSON.stringify(a))}};
|
|
56
|
+
_.r.seek=function(a){var b=this,c=1E3*a;return new Promise(function(d,e){b.B=!0;b.m.trigger(new _.Q(_.Ig));webapis.avplay.seekTo(c,function(){b.B=!1;b.m.trigger(new _.Q(_.Hg));d()},function(){b.B=!1;e()})})};_.r.getPosition=function(){if(this.f&&this.a)return this.a.position;try{return webapis.avplay.getCurrentTime()/1E3}catch(a){this.Xd(JSON.stringify(a))}};_.r.getDuration=function(){if(this.f&&this.a)return this.a.duration;try{return webapis.avplay.getDuration()/1E3}catch(a){this.Xd(JSON.stringify(a))}};
|
|
57
|
+
_.r.release=function(){var a=this;return new Promise(function(b,c){try{a.h&&(a.h.release(),a.h=null);webapis.avplay.stop();webapis.avplay.close();for(var d in a.j){var e=a.j[d];e&&e.Pf.stop()}a.j={};a.D=1;a.B=!1;a.l=null;a.a=null;return b()}catch(f){return c(f)}})};_.r.getVolume=function(){var a=null;try{a=tizen.tvaudiocontrol.getVolume()}catch(b){switch(b.name){case uP:this.g.debug("The application does not have the privilege to get the volume.",vP);break;default:this.g.debug(rP,b)}}return a};
|
|
58
|
+
_.r.setVolume=function(a){try{tizen.tvaudiocontrol.setVolume(Math.max(0,Math.min(100*a,100)))}catch(b){switch(b.name){case "InvalidValueError":this.g.warn("Invalid value passed for setVolume.","The passed value value should be in the range of 0 to 1.");break;case uP:this.g.warn("The application does not have the privilege to set the volume.",vP);break;default:this.g.warn("An unknown error occurred while trying to set volume",b)}}};
|
|
59
|
+
_.r.isLive=function(){if(this.f&&this.a)return this.a.isLive;try{return"1"===webapis.avplay.getStreamingProperty("IS_LIVE")}catch(a){this.Xd(JSON.stringify(a))}};_.r.stop=function(){try{webapis.avplay.stop()}catch(a){this.g.debug(a)}};_.r.getDrmInfo=function(){this.h&&this.h.getDrmInfo();return null};_.r.setSourceIndex=function(a){this.G=a};_.r.getSourceIndex=function(){return this.G};_.r.getLoadedSource=function(){return this.l&&this.l[this.getSourceIndex()]};
|
|
60
|
+
var RQ="IDLE",QQ="READY",SP="PLAYING",TP="PAUSED",pQ=_.Tb,iQ=_.ja,jQ="TEXT",TQ="PLAYER_MSG_RESOLUTION_CHANGED",SQ="PLAYER_MSG_BITRATE_CHANGE",MP={PLAYREADY:"PLAYREADY",gp:"EME_PLAYREADY",mp:"VERIMATRIX",Ze:"WIDEVINE_CDM",hp:"EME_WIDEVINE_CDM",op:"WIDEVINE_CLASSIC"};_.w(MQ,_.zi);_.r=MQ.prototype;_.r.Kh=function(){var a=this;this.g.debug("On Stream completed. Current time: ",this.getPosition());this.trigger(new _.Q(_.je));this.configuration.loop?this.seek(this.configuration.startTime||0)["catch"](function(){a.g.debug("Could not loop playback")}):this.a.stop()};_.r.Hh=function(a){this.trigger(new _.Q(_.vg,{currentTime:a.currentTime/1E3}))};
|
|
61
|
+
_.r.Lh=function(a){var b=this.a.getPosition(),c=b+a.duration/1E3,d=a.text||"";this.g.debug("Got subtitles: ",d,"start:",b,"end:",c,a);(d=_.R.Wg(d))&&this.o.append([new _.Hp(b,c,d)],[])};_.r.Ih=function(a){this.g.debug("DRM event: "+a.drmType+", data: "+a.drmData)};_.r.Ti=function(){this.A||(this.g.debug("Initial buffering completed..."),this.A=!0)};
|
|
62
|
+
_.r.Jh=function(a){this.g.debug("Error: TYPE: "+a.eventType);RP(this.f,_.Ko);a=new _.N(_.O,7,7200,{tizenerror:a.eventType});this.a.release();this.trigger(new _.Q(_.ke,{detail:a}))};
|
|
63
|
+
_.r.init=function(a,b){this.configuration=this.B=b;this.w=a;this.a.on(CP,this.Kh,this);this.a.on(zP,this.Hh,this);this.a.on(DP,this.Lh,this);this.a.on(AP,this.Ih,this);this.a.on(BP,this.Jh,this);this.a.on(wP,this.Ti,this);this.f.initialize();this.l.initialize(this);this.g.debug("Initializing player surface");this.w.hideMediaElement();var c=UQ;UQ+=1;this.j=_.Wi(_.Te,{id:"__clpp_tizen_player_"+c,type:"application/avplayer"});this.w.addElementToContainer(this.j,!0);var d=this.w.getMedia();if(d){c=this.j;
|
|
64
|
+
var e=[_.bh,_.pe,"position",_.xe,"top"],f={};d=null!==d.parentElement?window.getComputedStyle(d,null):d.style;if(!e||0===e.length){e||(e=[]);for(var g in d)e.push(g)}g=_.v(e);for(e=g.next();!e.done;e=g.next())e=e.value,f[e]=d[e];_.Yi(c,f);NQ(this)}};_.r.getSurface=function(){return this.w};_.r.getConfiguration=function(){return this.configuration};_.r.getTimeline=function(){return null};_.r.setupPlaylist=function(){return Promise.reject(_.mb)};_.r.appendLoad=function(){return Promise.reject(_.mb)};
|
|
65
65
|
_.r.seekWith=function(){return Promise.reject(_.mb)};_.r.setSeekInterceptor=function(){};_.r.setPlaybackSessionId=function(){};_.r.getBandwidthEstimate=function(){return null};
|
|
66
|
-
_.r.destroy=function(){var a=this;return _.I(function(b){switch(b.a){case 1:return _.x(b,a.release(),2);case 2:a.a.off(
|
|
66
|
+
_.r.destroy=function(){var a=this;return _.I(function(b){switch(b.a){case 1:return _.x(b,a.release(),2);case 2:a.a.off(CP,a.Kh);a.a.off(zP,a.Hh);a.a.off(DP,a.Lh);a.a.off(AP,a.Ih);a.a.off(BP,a.Jh);a.a.off(wP,a.Ti);if(!a.h){b.C(3);break}return _.x(b,a.h.destroy(),4);case 4:a.h=null;case 3:a.j&&(a.j.parentElement.removeChild(a.j),a.j=null),a.l.destroy(),a.f.destroy(),a.l=null,a.f=null,_.z(b)}})};_.r.namespace=function(){return VQ};_.r.getPlaybackRate=function(){return this.a.getPlaybackRate()};
|
|
67
67
|
_.r.setDrmCustomDataModifier=function(){};_.r.setCdnErrorCallback=function(){};_.r.detach=function(){};_.r.setPlaybackRate=function(a){this.a.setPlaybackRate(a)};_.r.getPosition=function(){return this.getMediaPosition()};_.r.getMediaPosition=function(){return 0<(this.configuration.startTime||0)&&!this.A?0:5===this.f.getState()?this.getDuration():this.a.getPosition()||0};_.r.seek=function(a){return typeof a===_.k&&0<=a?(this.isLive()||(a=Math.min(a,this.getDuration())),this.a.seek(a)):Promise.reject()};
|
|
68
|
-
_.r.getPresentationStartTime=function(){return null};_.r.getSeekRange=function(){return{start:0,end:0}};_.r.getVolume=function(){var a=this.a.getVolume();return typeof a===_.k?a/100:null};_.r.setVolume=function(a){this.a.setVolume(a)};_.r.getDuration=function(){return this.getMediaDuration()};_.r.getMediaDuration=function(){return this.a.getDuration()};_.r.getBufferInfo=function(){this.g.warn(_.va);return new _.
|
|
68
|
+
_.r.getPresentationStartTime=function(){return null};_.r.getSeekRange=function(){return{start:0,end:0}};_.r.getVolume=function(){var a=this.a.getVolume();return typeof a===_.k?a/100:null};_.r.setVolume=function(a){this.a.setVolume(a)};_.r.getDuration=function(){return this.getMediaDuration()};_.r.getMediaDuration=function(){return this.a.getDuration()};_.r.getBufferInfo=function(){this.g.warn(_.va);return new _.ci};_.r.getTrackManager=function(){return this.l};_.r.unload=function(){var a=this;return this.a.release().then(function(){a.l.release()})};
|
|
69
69
|
_.r.release=function(){var a=this;return _.I(function(b){switch(b.a){case 1:if(!a.h){b.C(2);break}return _.x(b,a.h.release(),2);case 2:if(!a.o){b.C(4);break}return _.x(b,a.o.destroy(),5);case 5:a.o=null;case 4:return _.x(b,a.a.release(),6);case 6:a.l.release(),a.f.release(),a.A=!1,_.z(b)}})};
|
|
70
|
-
_.r.load=function(a){var b=this,c,d,e,f,g;return _.I(function(h){switch(h.a){case 1:b.configuration=_.
|
|
71
|
-
_.H(h),b.onError(g),g;case 7:b.l.load(),_.z(h)}})};_.r.play=function(){var a=this;this.trigger(new _.Q(_.
|
|
72
|
-
_.r.getDrmInfo=function(){return this.a.getDrmInfo()};_.r.isEnded=function(){return 5===this.f.getState()};_.r.isPaused=function(){return this.a.getState()===
|
|
73
|
-
_.r.getSourceIndex=function(){return this.a.getSourceIndex()};_.r.getLoadedSource=function(){return this.a.getLoadedSource()};_.r.canPlay=function(a,b){return(new
|
|
74
|
-
|
|
70
|
+
_.r.load=function(a){var b=this,c,d,e,f,g;return _.I(function(h){switch(h.a){case 1:b.configuration=_.Qn([b.B,a]);c=_.Yt(b.configuration,[_.se,"native"]);b.o=c.create(b);d=_.Un(b.configuration)[0];e=!!b.configuration.tizen&&b.configuration.tizen.sideStreamText;if(!e){h.C(2);break}b.h=new VP;b.h.initialize(b);_.F(h,3);return _.x(h,b.h.load(d),5);case 5:b.h.start();_.G(h,2);break;case 3:f=_.H(h),b.g.error(f);case 2:return _.F(h,6),_.x(h,b.a.load(b.configuration),8);case 8:_.G(h,7);break;case 6:throw g=
|
|
71
|
+
_.H(h),b.onError(g),g;case 7:b.l.load(),_.z(h)}})};_.r.play=function(){var a=this;this.trigger(new _.Q(_.hf));NQ(this);return this.a.play().then(function(){UP(a.f)})};_.r.pause=function(){var a=this;return this.a.pause().then(function(){UP(a.f)})};_.r.getState=function(){return this.f.getState()};_.r.getPeriods=function(){return[]};_.r.onError=function(a){var b=new _.Q(_.ke,{detail:a});a.severity===_.O&&(RP(this.f,_.Ko),this.a.release());this.trigger(b);b.defaultPrevented&&(b.a=!0)};
|
|
72
|
+
_.r.getDrmInfo=function(){return this.a.getDrmInfo()};_.r.isEnded=function(){return 5===this.f.getState()};_.r.isPaused=function(){return this.a.getState()===TP};_.r.isMuted=function(){return CQ(this.a)};_.r.setMuted=function(a){IQ(this.a,a)};_.r.getNetworkEngine=function(){return this.D};_.r.setNetworkEngine=function(a){this.D=a};_.r.setCmsdManager=function(){};_.r.isLive=function(){return this.a.isLive()};_.r.getStats=function(){return null};_.r.setSourceIndex=function(a){this.a.setSourceIndex(a)};
|
|
73
|
+
_.r.getSourceIndex=function(){return this.a.getSourceIndex()};_.r.getLoadedSource=function(){return this.a.getLoadedSource()};_.r.canPlay=function(a,b){return(new OQ).canPlay(a,b)};_.r.getTimelineCues=function(){return[]};_.r.getCueTimeline=function(){return null};_.r.getTextDisplayer=function(){return this.o};_.r.resetAbr=function(){};var VQ="clpp.tizen",UQ=0;OQ.prototype.a=function(){return VQ};
|
|
74
|
+
OQ.prototype.canPlay=function(a){a=a.type;var b=!!window.webapis;if((a===_.Hc||a===_.Vl||a===_.Mc)&&b){if(_.jj(2))return 2;if(_.jj(3)||_.jj(4)||_.jj(5)||_.jj(6))return _.Mh("Use of clpp.tizen.TizenComponent is not recommended for Tizen version \x3e\x3d 3."),1}return 0};OQ.prototype.f=function(a){return a===_.pa};OQ.prototype.create=function(){return new MQ};_.w(PQ,_.ev);PQ.prototype.install=function(){_.Wh(new OQ)};PQ.prototype.uninstall=function(){var a=VQ;a&&_.Uh[a]&&(delete _.Uh[a],_.Vh.info("Removed Player factory: '"+a+"'"))};PQ.prototype.id=function(){return"tizen"};_.K("clpp.tizen.TizenComponent",PQ);};
|
|
75
75
|
if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
|
|
76
76
|
else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
|
|
77
77
|
else{_=this.clpp._;(f.call(g,this));}
|
package/cjs/cl.ttml.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
(function(){var g={}; var _ = _ || {}
|
|
2
|
-
var f=function(window){var
|
|
3
|
-
|
|
4
|
-
0)},
|
|
5
|
-
case _.
|
|
6
|
-
(this.frameRate*=Number(a[1])/Number(a[2]))},
|
|
7
|
-
function(a){a=a.getAttribute("cellResolution");return(a=
|
|
8
|
-
function(){return"inline-"+
|
|
9
|
-
_.
|
|
10
|
-
c,d,e,f,g);a.a.set(b,c);return c},
|
|
11
|
-
|
|
12
|
-
"lineHeight","opacity","padding",
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
g.backgroundImage=("PNG"===e&&"Base64"===d&&0<a.length?"data:image/png;base64,"+a:null)||"");return g};_.w(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
e+";";break a}}d=""}c+=d;a:{if("textOutline"in this.a){d=this.a.textOutline.split(" ");e="black";f=".4em";var g=d[0]&&d[0].trim(),h=d[1]&&d[1].trim(),l=d[2]&&d[2].trim();3===d.length&&!
|
|
20
|
-
d+";"):d="";c=c+d+("fontFamily"in this.a?"font-family:"+this.a.fontFamily.replace("monospaceSansSerif","monospace").replace("monospaceSerif","monospace").replace("proportionalSansSerif",
|
|
21
|
-
"text-decoration:"+d.join(" ")+";";break a}}d=""}e="padding"in this.a?"border: solid transparent;border-width:"+
|
|
22
|
-
c="::ttml .clpp-text-wrapper__"+this.h+" {",a.push(c+b+"}"));return a};var
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
b+=h}for(;f.
|
|
26
|
-
|
|
27
|
-
c=b),c&&(a.a=c.getId()),c=a.l,-1===[_.da,"span","br"].indexOf(
|
|
28
|
-
_.
|
|
29
|
-
case _.
|
|
30
|
-
|
|
2
|
+
var f=function(window){var Hy='application/mp4; codecs\x3d"stpp.ttml"',Iy='application/mp4; codecs\x3d"stpp.ttml.im1i"',Jy='application/mp4; codecs\x3d"stpp.ttml.im1t"',Ky="backgroundColor",Ly="direction",My="displayAlign",Ny="region",Oy="sans-serif",Py="textAlign",Qy="textDecoration",Ry="writingMode",Sy=function(a,b,c){this.h=a;this.f=b;this.a=c},Ty=function(a,b,c){Sy.call(this,a,[],c);this.j=b||""},Uy=function(a,b,c){Sy.call(this,a,b,c)},Vy=function(a,b,c){a=a.f;for(var d=a.length-1;0<=d;d--){var e=b.get(a[d]);if(e.hasAttribute(c))return e.getAttribute(c)}return null},
|
|
3
|
+
cz=function(a,b){var c=null;if(Wy.test(a)){c=Wy.exec(a);var d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]);g+=(Number(c[5])||0)/b.f;f+=g/b.frameRate;c=f+60*e+3600*d}else Xy.test(a)?c=Yy(Xy,a):Zy.test(a)?c=Yy(Zy,a):$y.test(a)?(c=$y.exec(a),c=Number(c[1])/b.frameRate):az.test(a)?(c=az.exec(a),c=Number(c[1])/b.a):bz.test(a)&&(c=Yy(bz,a));return c},Yy=function(a,b){var c=a.exec(b);return null==c||""===c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||
|
|
4
|
+
0)},dz=function(a){return a.split(":").pop()},ez=function(a){return a.replace(/(\d*\.?\d+)c/g,"$1em")},gz=function(a,b){for(;fz.test(a);){var c=fz.exec(a)[0];a=a.replace(c,parseInt(c,10)/b+"em")}return a},hz=function(a){return a?a.replace(/(\d*\.?\d+)%/g,function(b,c){return c/100+"em"}):""},iz=function(a,b,c,d,e,f,g){Sy.call(this,a,f,g);this.w=b;this.A=c;this.o=d;this.l=e;this.j=[]},jz=function(a,b,c){a=Vy(a,b,Py);if(!a&&c&&(a=Vy(c,b,Py),!a&&"rltb"===Vy(c,b,Ry)))return _.ie;switch(a){case _.hd:return _.Cp;
|
|
5
|
+
case _.Qf:case _.ie:return _.ie;default:return _.dg}},kz=function(a,b,c){if(_.R.zf(a.w))return document.createTextNode(_.R.Wg(a.w||""));if(a.A)return _.Wi("br");for(var d=_.Wi("span"),e=_.v(a.f),f=e.next();!f.done;f=e.next())_.Xi(d,f.value);a=_.v(a.j);for(e=a.next();!e.done;e=a.next())d.appendChild(kz(c.get(e.value),b,c));return d},lz=function(a,b,c,d){this.frameRate=Number(a)||30;this.f=Number(b)||1;this.a=Number(d);0===this.a&&(this.a=a?this.frameRate*this.f:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&
|
|
6
|
+
(this.frameRate*=Number(a[1])/Number(a[2]))},mz=function(a,b,c){Sy.call(this,a,b,c)},pz=function(a,b,c,d){var e=nz.exec(a);a=oz.exec(a);return typeof b===_.k&&0<b&&a?100*Number(a[c])/b:e?Number(e[c]):a?Number(a[c]):d},qz=function(a,b){return typeof b===_.k&&0<b?_.Ip:oz.test(a)?0:_.Ip},rz=function(a,b){Sy.call(this,"root-container",[],b);this.j=a},sz=function(a,b,c){return typeof a===_.k?a:typeof b===_.k?b:c},tz=function(a,b){var c=a.getAttribute("extent");return(c=oz.exec(c))?Number(c[b]):null},vz=
|
|
7
|
+
function(a){a=a.getAttribute("cellResolution");return(a=uz.exec(a))?Number(a[2]):null},wz=function(a,b,c){Sy.call(this,a,b,c)},xz=function(a){this.B=a;this.w=this.l=null;this.A=0;this.h=new Map;this.a=new Map;this.j=new Map;this.f=new Map;this.o=[]},zz=function(a){return yz.some(function(b){return b in a.attributes})},Az=function(a,b){if(0===b.length)return[];for(var c=[],d=_.v(b),e=d.next();!e.done;e=d.next())e=e.value,a.a.has(e)&&c.push.apply(c,_.kh(Az(a,a.a.get(e).f)).concat([e]));return c},Cz=
|
|
8
|
+
function(){return"inline-"+Bz++},Dz=function(a){return a.o.map(function(b){return b.build(a.l,a.w,a.A,a.h,a.a,a.j,a.f)}).filter(function(b){return null!=b})},Ez=function(a){this.a=a.firstChild;this.f=new Set},Fz=function(a,b,c,d,e,f){this.h=a;this.a=b;this.j=c;this.l=d;this.f=e;this.attributes=f},Gz=function(a){return dz(a.h.nodeName)},Hz=function(){this.a=new Map},Jz=function(a,b){if(a.a.has(b))return a.a.get(b);var c=null,d=null,e=[],f=[],g={},h=b.parentNode;if(h&&a.a.has(h)){var l=a.a.get(h);e=
|
|
9
|
+
_.kh(l.l).concat();-1===[_.da,"span","br"].indexOf(b.nodeName)&&(c=l.a,d=l.j,f=_.kh(l.f).concat(),g={},Iz.forEach(function(n){n in l.attributes&&(g[n]=l.attributes[n])}))}if(b.nodeType===b.ELEMENT_NODE){b.hasAttribute(Ny)&&(c=b.getAttribute(Ny));b.hasAttribute(_.jg)&&f.push.apply(f,_.kh(b.getAttribute(_.jg).split(" ")));d=Array.from(b.attributes).map(function(n){return n.name});d=_.v(d);for(h=d.next();!h.done;h=d.next()){h=h.value;var m=dz(h);g[m]=b.getAttribute(h)}d=g.backgroundImage}c=new Fz(b,
|
|
10
|
+
c,d,e,f,g);a.a.set(b,c);return c},Kz=function(a){this.a=a;this.f=new DOMParser},Lz=function(a){this.f=a},Mz=function(a){return String(Math.floor(a/3600)).padStart(2,"0")+":"+String(Math.floor(a/60%60)).padStart(2,"0")+":"+String(Math.floor(a%60)).padStart(2,"0")+"."+String(Math.floor(1E3*a%1E3)).padStart(3,"0")},Nz=function(){},Oz=function(a){this.a=new Kz(a);this.g=new _.L("clpp.ttml.Mp4TtmlParser")},Pz=function(){this.a=new Nz};Sy.prototype.getId=function(){return this.h};
|
|
11
|
+
Sy.prototype.hasAttribute=function(a){return a in this.a};Sy.prototype.getAttribute=function(a){return this.a[a]};_.w(Ty,Sy);_.w(Uy,Sy);var Wy=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Xy=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Zy=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,$y=/^(\d*(?:\.\d*)?)f$/,az=/^(\d*(?:\.\d*)?)t$/,bz=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,nz=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,oz=/^(\d+)px (\d+)px$/,uz=/^(\d+) (\d+)$/,fz=/(\d+)px/,Qz=/^(\d+px|\d+em|\d*\.?\d+c)$/,yz=[Ky,"color",Ly,My,"fontFamily","fontSize","fontStyle","fontWeight",
|
|
12
|
+
"lineHeight","opacity","padding",Py,Qy,"textOutline",Ry,"zIndex"],Iz=["begin",_.ie];_.w(iz,Uy);
|
|
13
|
+
iz.prototype.build=function(a,b,c,d,e,f,g){var h=cz(this.a.begin,b);b=cz(this.a.end,b);if(null===h||null===b)return null;h+=c;b+=c;c=_.Wi(_.Qd);for(var l=_.v(this.j),m=l.next();!m.done;m=l.next())c.appendChild(kz(g.get(m.value),e,g));g=new _.Hp(h,b,c.innerHTML.trim(),_.zg);g.cssClassList=_.kh(this.f).concat();g.textAlign=jz(this,e,null);g.writingMode=_.Dp;g.line=-1;g.lineInterpretation=_.Ep;g.lineAlign=_.Fp;g.containerRows=sz(null,vz(a),15);if(this.o&&(f=f.get(this.o))){g.region=f.build(a,e);g.textAlign=
|
|
14
|
+
jz(this,e,f);a:switch(Vy(f,e,Ry)){case "tb":case "tblr":a=_.Lg;break a;case "tbrl":a=_.Mg;break a;default:a=_.Dp}g.writingMode=a;a:switch(Vy(f,e,My)){case _.hd:a=50;break a;case "after":a=-1;break a;default:a=0}g.line=a;a:switch(Vy(f,e,My)){case _.hd:a=1;break a;default:a=_.Ep}g.lineInterpretation=a;a:switch(Vy(f,e,My)){case _.hd:e=_.hd;break a;default:e=_.Fp}g.lineAlign=e}this.l&&(a=d.get(this.l))&&(d=a.getAttribute("encoding"),e=a.getAttribute("imageType")||a.getAttribute("imagetype"),a=a.j.trim(),
|
|
15
|
+
g.backgroundImage=("PNG"===e&&"Base64"===d&&0<a.length?"data:image/png;base64,"+a:null)||"");return g};_.w(mz,Uy);
|
|
16
|
+
mz.prototype.build=function(a,b){var c=new _.Kp;c.id=this.getId();var d=sz(a.j.containerWidth,tz(a,1),720),e=sz(a.j.containerHeight,tz(a,2),480);a:switch(Vy(this,b,My)){case "after":var f="flex-start";break a;case _.hd:f=_.hd;break a;default:f="flex-end"}c.displayAlign=f;a:switch(Vy(this,b,Ry)){case "tb":case "tblr":f="row-reverse";break a;case "tbrl":f="row";break a;default:f=_.Ad}c.writingMode=f;f=this.getAttribute("extent")||Vy(this,b,"extent");c.width=pz(f,d,1,100);c.widthUnits=qz(f,d);c.height=
|
|
17
|
+
pz(f,e,2,100);c.heightUnits=qz(f,e);f=this.getAttribute("origin")||Vy(this,b,"origin");c.viewportAnchorX=pz(f,d,1,0);c.viewportAnchorY=pz(f,e,2,0);c.viewportAnchorUnits=qz(f,d);c.cssClassList=_.kh(this.f).concat();return c};_.w(rz,Sy);_.w(wz,Sy);
|
|
18
|
+
wz.prototype.build=function(a){var b=null;var c=vz(a);c&&(b=sz(a.j.containerHeight,tz(a,2),480)/c);b=sz(a.j.fontSizeRadix,b,16);a=[];c="::ttml ."+this.h+", ::ttml ."+this.h+" * {";for(var d=_.v(Rz.entries()),e=d.next();!e.done;e=d.next()){var f=_.v(e.value);e=f.next().value;f=f.next().value;e in this.a&&(c+=f+":"+ez(this.a[e])+";")}a:{if("unicodeBidi"in this.a){d=this.a.unicodeBidi;e="";switch(d){case "normal":case "embed":e=d;break;case "bidiOverride":e="bidi-override"}if(0<e.length){d="unicode-bidi:"+
|
|
19
|
+
e+";";break a}}d=""}c+=d;a:{if("textOutline"in this.a){d=this.a.textOutline.split(" ");e="black";f=".4em";var g=d[0]&&d[0].trim(),h=d[1]&&d[1].trim(),l=d[2]&&d[2].trim();3===d.length&&!Qz.test(g)&&Qz.test(h)&&Qz.test(l)?(e=g,f=h):2===d.length&&!Qz.test(g)&&Qz.test(h)?(e=g,f=h):2===d.length&&Qz.test(g)&&Qz.test(h)&&(f=g);if(""!==f){f=ez(f);d="text-shadow:0 0 "+(f+" "+e+",0 0 ")+(f+" "+e+",0 0 ")+(f+" "+e+";");break a}}d=""}c+=d;"textShadow"in this.a?(d=hz(this.a.textShadow),d=ez(d),d="text-shadow:"+
|
|
20
|
+
d+";"):d="";c=c+d+("fontFamily"in this.a?"font-family:"+this.a.fontFamily.replace("monospaceSansSerif","monospace").replace("monospaceSerif","monospace").replace("proportionalSansSerif",Oy).replace("proportionalSerif",Oy).replace("sansSerif",Oy).replace("default",Oy)+";":"");a:{if(Qy in this.a){d=[];e=_.v(this.a.textDecoration.split(" "));for(f=e.next();!f.done;f=e.next())switch(f=f.value,f){case "underline":case "overline":d.push(f);break;case "lineThrough":d.push("line-through")}if(0<d.length){d=
|
|
21
|
+
"text-decoration:"+d.join(" ")+";";break a}}d=""}e="padding"in this.a?"border: solid transparent;border-width:"+ez(this.a.padding)+";":"";c=c+d+e;"lineHeight"in this.a?(d="",e=this.a.lineHeight,e=ez(e),e=gz(e,b),d=d+"line-height:"+e+";"):d="";a.push(c+d+"}");a:{if("fontSize"in this.a&&(c=this.a.fontSize.split(" "),d=null,1===c.length&&(d=c[0]),2===c.length&&(d=c[1]),d)){d=d.trim();d=ez(d);d=gz(d,b);b="font-size:"+d+";";break a}b=null}b&&(c="::ttml ."+this.h+" .clpp-text-wrapper {",a.push(c+b+"}"),
|
|
22
|
+
c="::ttml .clpp-text-wrapper__"+this.h+" {",a.push(c+b+"}"));return a};var Rz=new Map([[Ky,"background-color"],["color","color"],[Ly,Ly],["fontStyle","font-style"],["fontWeight","font-weight"],["opacity","opacity"],["zIndex","z-index"]]);var Bz=0;Ez.prototype.qe=function(){return!!this.a};Ez.prototype.next=function(){if(!this.a)return null;var a=this.a;do this.f.add(a),a.nodeType!==Node.TEXT_NODE&&!Sz.has(dz(a.nodeName))||Tz.has(dz(a.nodeName))||!a.firstChild||this.f.has(a.firstChild)?a.nextSibling?a=a.nextSibling:a=a.parentNode:a=a.firstChild;while(a&&(this.f.has(a)||a.nodeType!==Node.TEXT_NODE&&!Sz.has(dz(a.nodeName))));var b=this.a;this.a=a;return b};
|
|
23
|
+
var Sz=new Set(["tt","head","layout",_.Me,_.ue,Ny,"styling",_.jg,"body",_.Qd,"p","span","br"]),Tz=new Set([_.jg,_.ue]);Fz.prototype.getId=function(){return this.attributes.id};Kz.prototype.parseInit=function(){};
|
|
24
|
+
Kz.prototype.parseMedia=function(a,b,c){c&&c.length||(c=[a.byteLength]);var d=_.M.ib(this.a.ttml||{}),e=_.Ni(a,0,c[0]);e=_.R.ea(e);if(""===e)return{cues:[],styles:[]};var f=null;try{f=this.f.parseFromString(e,_.pg)}catch(n){throw new _.N(_.O,2,2005,"Failed to parse TTML.");}d=new xz(d);e=new Hz;f=new Ez(f);b=b.periodStart;typeof b===_.k&&(d.A=b);b=c[0];for(var g=1;g<c.length;++g){var h=c[g],l=_.Ni(a,b,h);l=_.Lm(l);var m="urn:mpeg:14496-30:subs:"+g;d.h.set(m,new Ty(m,l,{imageType:"PNG",encoding:"Base64"}));
|
|
25
|
+
b+=h}for(;f.qe();)a=f.next(),a=Jz(e,a),"tt"===Gz(a)&&(d.l=new rz(d.B,Object.assign({},a.attributes))),"tt"===Gz(a)&&(d.w=new lz(a.attributes.frameRate,a.attributes.subFrameRate,a.attributes.frameRateMultiplier,a.attributes.tickRate)),Gz(a)!==_.ue||a.attributes.begin||a.attributes.end||(c="#"+a.getId(),d.h.set(c,new Ty(c,a.h.textContent,a.attributes))),Gz(a)===_.ue&&a.attributes.begin&&a.attributes.end?(c="#"+Cz(),b=new Ty(c,a.h.textContent,a.attributes),d.h.set(c,b),c=b):c=null,c&&(a.j=c.getId()),
|
|
26
|
+
Gz(a)===_.jg&&(c=a.getId()||Cz(),b=new wz(c,a.f,Object.assign({},a.attributes)),d.a.set(c,b),a.a&&d.j.get(a.a).f.push(c)),Gz(a)!==_.jg&&zz(a)?(c=Cz(),b=new wz(c,[],Object.assign({},a.attributes)),d.a.set(c,b),c=b):c=null,c&&a.f.push(c.getId()),Gz(a)!==_.Qd||!a.attributes.extent&&!a.attributes.origin?c=null:(c=Cz(),b=new mz(c,Az(d,a.f),Object.assign({},a.attributes)),d.j.set(c,b),c=b),c&&(a.a=c.getId()),Gz(a)!==Ny?c=null:(c=a.getId(),b=new mz(c,Az(d,a.f),Object.assign({},a.attributes)),d.j.set(c,b),
|
|
27
|
+
c=b),c&&(a.a=c.getId()),c=a.l,-1===[_.da,"span","br"].indexOf(Gz(a))||0===c.length?c=null:(g=c[c.length-1],d.f.has(g)?(c=Cz(),b=new iz(c,a.h.nodeName===_.da?a.h.textContent:null,"br"===Gz(a),a.a,a.j,Az(d,a.f),a.attributes),d.f.set(c,b),(g=d.f.get(g))&&g.j.push(c),c=b):c=null),c&&a.l.push(c.getId()),"p"===Gz(a)||a.j?(c=Cz(),b=new iz(c,null,!1,a.a,a.j,Az(d,a.f),a.attributes),d.f.set(c,b),d.o.push(b),c=b):c=null,c&&a.l.push(c.getId());e=Dz(d);f=[];a=_.v(d.a.values());for(c=a.next();!c.done;c=a.next())f.push.apply(f,
|
|
28
|
+
_.kh(c.value.build(d.l)));return{cues:e,styles:f}};Lz.prototype.a=function(a){a=(new Kz(this.f)).parseMedia(a,{periodStart:0,segmentStart:null,segmentEnd:0}).cues;var b="WEBVTT\n\n";a=_.v(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Mz(c.startTime)+" --\x3e "+Mz(c.endTime),e=[];switch(c.textAlign){case _.xe:e.push("align:left");break;case _.Qf:e.push("align:right");break;case _.Cp:e.push("align:middle");break;case _.dg:e.push("align:start");break;case _.ie:e.push("align:end")}switch(c.writingMode){case _.Lg:e.push("vertical:lr");break;
|
|
29
|
+
case _.Mg:e.push("vertical:rl")}b+=d+(e.length?" "+e.join(" "):"")+"\n";b+=c.payload+"\n\n"}return _.R.eb(b)};Nz.prototype.probe=function(a,b){return a===_.Lc&&b===_.og};Nz.prototype.create=function(a){return new Lz(a)};Oz.prototype.parseInit=function(a){var b=!1;(new _.qq).M(_.Pe,_.rq).M(_.yg,_.rq).M(_.Ke,_.rq).M(_.Oe,_.rq).M(_.gg,_.rq).ba(_.ig,_.sq).M("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new _.N(_.O,2,2007);};
|
|
30
|
+
Oz.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[],f=[],g=[];(new _.qq).M("moof",_.rq).M("traf",_.rq).ba("subs",function(h){for(var l=_.lq(h.reader),m=0;m<l;++m){h.reader.skip(4);for(var n=_.kq(h.reader),p=0;p<n;++p){var q=1===h.version?_.lq(h.reader):_.kq(h.reader);g.push(q);h.reader.skip(6)}}}).M(_.Je,_.tq(function(h){d=!0;h=c.a.parseMedia(h,b,g);e=e.concat(h.cues);f=f.concat(h.styles)})).parse(a);d||this.g.warn("Couldn't find the mdat box");return{cues:e,styles:f}};_.w(Pz,_.ev);Pz.prototype.install=function(){_.Lv(_.Lc,Kz);_.Lv(_.Jc,Oz);_.Lv(Hy,Oz);_.Lv(Jy,Oz);_.Lv(Iy,Oz);_.wt.push(this.a)};Pz.prototype.uninstall=function(){_.Nv(_.Lc);_.Nv(_.Jc);_.Nv(Hy);_.Nv(Jy);_.Nv(Iy);_.yt(this.a)};Pz.prototype.id=function(){return"subtitles-ttml"};_.K("clpp.ttml.TtmlComponent",Pz);};
|
|
31
31
|
if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
|
|
32
32
|
else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
|
|
33
33
|
else{_=this.clpp._;(f.call(g,this));}
|
package/cjs/cl.verimatrix.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
(function(){var g={}; var _ = _ || {}
|
|
2
|
-
var f=function(window){var
|
|
3
|
-
this.
|
|
4
|
-
_.R.empty(this.l)?this.g.warn(_.Pa):_.R.empty(this.j)?this.g.warn(_.Oa):this.bb(_.
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
var f=function(window){var vy="VerimatrixVCAS",wy="clpp.verimatrix.Vcas",xy="clpp.verimatrix.VcasComponent",Dy=function(a){_.bq.call(this,vy);var b={};b[yy]=yy;b[zy]=zy;var c=a.authenticator,d=void 0===a.licenseRequestVuidLocation?Ay:a.licenseRequestVuidLocation;b=void 0===a.httpHeaderNames?b:a.httpHeaderNames;var e=a.widevineLicenseUrl,f=a.playReadyLicenseUrl,g=a.fairPlayLicenseUrl,h=a.fairPlayCertificateUrl,l=a.fairPlaySiteId,m=void 0===a.fairPlayAssetIdStrategy?By:a.fairPlayAssetIdStrategy;this.A=a.deviceId;this.a=c;
|
|
3
|
+
this.D=d;this.B=b;this.w=Cy(this,e);this.o=Cy(this,f);this.l=Cy(this,g);this.j=h;this.H=l;this.G=m;this.g=new _.L(wy);_.R.empty(this.w)?this.g.warn(_.Xb):this.bb(_.Gd,{licenseUrl:this.w,videoRobustness:[_.Db,void 0],audioRobustness:[_.Cb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.h.bind(this)}});_.R.empty(this.o)?this.g.warn(_.rb):this.bb(_.Ed,{licenseUrl:this.o,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.h.bind(this)}});
|
|
4
|
+
_.R.empty(this.l)?this.g.warn(_.Pa):_.R.empty(this.j)?this.g.warn(_.Oa):this.bb(_.Cd,{licenseUrl:this.l,certificateUrl:this.j,modifiers:{licenseRequest:this.K.bind(this),licenseResponse:this.L.bind(this),extractContentId:this.I.bind(this)}})},Cy=function(a,b){if(a.D===Ay){var c=Object.assign({},{deviceId:_.Mm(_.R.Fd(a.A))},a.a&&{authenticator:_.Mm(_.R.Fd(a.a))});return b+_.zn(c)}return b},Ey=function(){this.g=new _.L(xy)};_.w(Dy,_.bq);
|
|
5
|
+
Dy.prototype.h=function(a,b){if(this.D===Fy){var c=this.B[zy],d={};d[this.B[yy]]=this.A;this.a&&(d[c]=this.a);Object.keys(d).forEach(function(e){b.headers[e]=d[e]})}};Dy.prototype.I=function(a,b){var c=_.zq(b);switch(this.G){case Gy:c=_.zn({r:c,Mp:this.H},!0)}return c};Dy.prototype.K=function(a,b){this.h(a,b);_.Cq(b)};Dy.prototype.L=function(a,b){_.Dq(b)};_.K(wy,Dy);Dy.prototype.constructor=Dy.prototype.constructor;Dy.NAME=vy;var Ay="query-string",Fy="http-header";
|
|
6
|
+
Dy.LicenseRequestVuidLocation={QUERY_STRING:Ay,HTTP_HEADER:Fy};var yy="DeviceId",zy="Authenticator";Dy.LicenseRequestHttpHeader={DEVICE_ID_HEADER:yy,AUTHENTICATOR_HEADER:zy};var By="keyid",Gy="contentid-siteid";Dy.FairPlayAssetIdStrategy={KEYID:By,CONTENTID_SITEID:Gy};_.w(Ey,_.ev);Ey.prototype.uninstall=function(){delete _.Xn.VerimatrixVCAS};Ey.prototype.beforeLoad=function(a){a=a.getConfiguration();if(a.drm&&a.drm.env===vy){a=a.drm.customData;if(!a)throw new _.N(_.O,7,7100,_.Hd);a=new Dy(a);this.g.info("Registering the Verimatrix VCAS Ultra environment");_.Yn(a)}};Ey.prototype.id=function(){return"verimatrix-vcas"};_.K(xy,Ey);};
|
|
7
7
|
if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
|
|
8
8
|
else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
|
|
9
9
|
else{_=this.clpp._;(f.call(g,this));}
|
package/cjs/cl.vimond.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
(function(){var g={}; var _ = _ || {}
|
|
2
|
-
var f=function(window){var
|
|
3
|
-
b){a.m.trigger(new _.Q(_.
|
|
4
|
-
|
|
5
|
-
_.r.
|
|
6
|
-
_.r.
|
|
7
|
-
b.B=e;return _.x(h,b
|
|
8
|
-
_.r
|
|
9
|
-
b[0]||"";a.client.playerState=b[1]||"";a.progress.vod&&(a.progress.vod.position=this.a.getPosition());if(b=a.progress.live){c=this.a;var d=c.m.getPresentationStartTime()||0;c=Math.floor(d+c.m.getPosition());c=(new Date(1E3*c)).toISOString();b.position=c;d=this.a;c=d.m.getPosition();d=d.m.getSeekRange().end;b.onLiveEdge=30>Math.abs(d-c);typeof b.liveResumePossible!==_.
|
|
10
|
-
b.method=_.qb;b.contentType="application/json";b.headers.Authorization="Bearer "+this.h;b.body=_.R.
|
|
11
|
-
_.r.onContentWillLoad=function(a){var b=a.getConfiguration();(this.a=!_.M.
|
|
12
|
-
c=b.failIfUnreachable;typeof c!==_.
|
|
13
|
-
_.r.
|
|
2
|
+
var f=function(window){var ly="Registering listeners",my="clpp.vimond.VimondPlugin",ny=function(a,b,c,d,e){this.G=a;this.H=b;this.I=c;this.m=d;this.D=e;this.a=new _.si;this.l=!0;this.h=this.j=this.A=!1;this.B=null;this.f=new _.ej(this.$h.bind(this));this.g=new _.L("clpp.vimond.VimondDispatcher");this.o=this.w=0;this.m&&this.a&&(this.g.debug(ly),this.a.on(this.m,_.eg,this.Bl.bind(this)),this.a.on(this.m,_.vg,this.Cl.bind(this)),this.a.on(this.m,_.gc,this.zl.bind(this)),this.a.on(this.m,_.hc,this.Al.bind(this)))},oy=function(a,
|
|
3
|
+
b){a.m.trigger(new _.Q(_.Sg,{detail:b}))},py=function(a,b,c){b&&(a.A=!0,a.f.stop());a.m.onError(new _.N(b?_.O:1,9,9201,c))},qy=function(a,b,c,d,e){this.l=a;this.o=c;this.h=b;this.a=d;this.j=e;this.g=new _.L("clpp.vimond.VimondService");this.f=0},ry=function(a){this.m=a;this.a=new _.si;this.g=new _.L("clpp.vimond.VimondAdapter");this.f=this.h=!1;this.m&&this.a&&(this.g.debug(ly),this.a.on(this.m,_.Mf,this.o.bind(this)),this.a.on(this.m,_.gc,this.j.bind(this)),this.a.on(this.m,_.hc,this.l.bind(this)))},
|
|
4
|
+
sy=function(a,b){var c=a.m.getState();if(1===b)return["str-start",_.tf];if(a.h)return[_.ie,_.df];if(5===c)return[_.ie,null];if(c===_.Ko)return[_.ke,_.df];var d=_.df;if(2===c||3===c||a.f)d=_.tf;return["period",d]},ty=function(){this.a=!1;this.g=new _.L(my);this.j=this.h=this.f=null},uy=function(){};_.r=ny.prototype;_.r.Cl=function(){this.h||(this.h=1<Math.abs(this.w-this.m.getPosition()));this.w=this.m.getPosition()};_.r.zl=function(){this.g.debug("Ad break started");this.j=!0};
|
|
5
|
+
_.r.Al=function(){this.g.debug("Ad break stopped");this.j=!1};
|
|
6
|
+
_.r.Bl=function(a){var b=this,c,d,e,f,g;return _.I(function(h){if(1==h.a){c=a.detail;d=_.nu;e=c.currentState;f=c.previousState;b.g.debug("State changed, prev: "+f+" curr: "+e);if(b.A||b.j)return h["return"]();if(e===b.B&&!b.h)return b.g.debug("Ignore transition"),h["return"]();if(b.l&&e!==d.PLAYING)return h["return"]();if(b.h&&[d.PAUSED,d.BUFFERING].includes(e))return b.g.debug("Seeking"),h["return"]();b.h&&e===d.PLAYING&&(b.g.debug("Seeked"),b.h=!1);g=[d.PLAYING,d.PAUSED,d.ERROR,d.ENDED];if(!g.includes(e))return h.C(0);
|
|
7
|
+
b.B=e;return _.x(h,b.$h(),3)}e===d.ENDED&&b.f.stop();_.z(h)})};
|
|
8
|
+
_.r.$h=function(){var a=this,b,c,d,e,f,g;return _.I(function(h){if(1==h.a){var l=Math.floor(Date.now()/1E3);0<a.o&&a.g.debug("Last event was "+(l-a.o)+" seconds ago");a.o=l;a.f.stop();a.f.ha(a.l?10:a.G);a.l=!1;_.F(h,2);return _.x(h,a.D.fireEvent(),4)}if(2!=h.a)return b=h.f,oy(a,b),_.G(h,0);d=c=_.H(h);e=d.code;f=d.data;g=[1002,1003];g.includes(e)?(a.g.debug("Unreachable service"),oy(a,f),py(a,a.H,f)):1001===e?(a.g.debug("Generic service error"),oy(a,f),py(a,a.I,f)):a.g.error(c.toString());_.z(h)})};qy.prototype.fireEvent=function(){this.f++;var a=_.M.ra(this.o);a.client.buildName=_.xa;a.client.buildVersion=_.ia;var b=a.client,c=this.a.m.getDrmInfo();b.drm=c?c.keySystem:"";a.client.pageUrl=document.location.href;a.client.streamUrl=this.a.m.getLoadedSource().url;a.client.userAgent=navigator.userAgent;a.client.videoFormat=this.a.m.getLoadedSource().type||"";b=a.client;c=this.a.m.getLoadedSource();c=((new _.xn(c.url)).scheme||"").replace(":","");b.videoProtocol=c;b=sy(this.a,this.f);a.client.playerEvent=
|
|
9
|
+
b[0]||"";a.client.playerState=b[1]||"";a.progress.vod&&(a.progress.vod.position=this.a.getPosition());if(b=a.progress.live){c=this.a;var d=c.m.getPresentationStartTime()||0;c=Math.floor(d+c.m.getPosition());c=(new Date(1E3*c)).toISOString();b.position=c;d=this.a;c=d.m.getPosition();d=d.m.getSeekRange().end;b.onLiveEdge=30>Math.abs(d-c);typeof b.liveResumePossible!==_.Yc&&(b.liveResumePossible=!0)}a.progress.eventNumber=this.f;a.timestamp=(new Date).toISOString();this.g.debug("Fire an event");b=_.Xk(this.l);
|
|
10
|
+
b.method=_.qb;b.contentType="application/json";b.headers.Authorization="Bearer "+this.h;b.body=_.R.Fd(JSON.stringify(a));return this.j.fetch(b).T};qy.prototype.eh=function(a){this.h=a};ry.prototype.getPosition=function(){return Math.floor(this.m.getPosition())};ry.prototype.o=function(){this.h=!0};ry.prototype.j=function(){this.f=!0};ry.prototype.l=function(){this.f=!1};_.w(ty,_.ew);_.r=ty.prototype;_.r.onPlayerCreated=function(){};
|
|
11
|
+
_.r.onContentWillLoad=function(a){var b=a.getConfiguration();(this.a=!_.M.P(b.vimond)&&typeof b.vimond===_.Te)?a.namespace()===_.rd&&(this.a=!1,this.g.info("Vimond does not report when casting.")):this.g.debug("Vimond plugin is loaded but not configured. Will do nothing.");if(this.a){b=a.getConfiguration().vimond;for(var c=_.v(["authToken","playerEventRequest"]),d=c.next();!d.done;d=c.next())if(d=d.value,!b[d]){this.g.warn(d+" key is missing");a.onError(new _.N(1,9,9200));return}this.g.debug("Configuration is valid");
|
|
12
|
+
c=b.failIfUnreachable;typeof c!==_.Yc&&(c=!0);d=b.failOnError;typeof d!==_.Yc&&(d=!0);this.f=new ry(a);this.h=new qy(b.playerEventRequest.uri,b.authToken,b.playerEventRequest.body,this.f,a.getNetworkEngine());this.j=new ny(b.playerEventRequest.eventInterval,c,d,a,this.h)}};_.r.onPlayerWillRelease=function(){if(this.a){if(this.f){var a=this.f;a.g.debug(_.Pb);_.vi(a.a)}this.j&&(a=this.j,a.g.debug(_.Pb),_.vi(a.a),a.f.stop());this.j=this.h=this.f=null}};_.r.onPlayerWillDestroy=function(){};_.r.id=function(){return"vimond"};
|
|
13
|
+
_.r.eh=function(a){this.a&&this.h&&this.h.eh(a)};_.K(my,ty);ty.prototype.updateAuthToken=ty.prototype.eh;ty.Id="vimond";uy.prototype.create=function(){return new ty};_.dp(new uy);};
|
|
14
14
|
if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
|
|
15
15
|
else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
|
|
16
16
|
else{_=this.clpp._;(f.call(g,this));}
|