@castlabs/prestoplay 6.23.1 → 6.24.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 +14 -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 +113 -113
- package/cjs/cl.conviva.js +32 -32
- package/cjs/cl.core.js +608 -591
- package/cjs/cl.crypto.js +9 -9
- package/cjs/cl.dash.js +87 -86
- package/cjs/cl.externs.js +94 -30
- package/cjs/cl.freewheel.js +25 -24
- package/cjs/cl.hls.js +73 -71
- package/cjs/cl.hlssmpte.js +6 -6
- package/cjs/cl.htmlcue.js +30 -30
- package/cjs/cl.ima.js +23 -23
- package/cjs/cl.mse.js +344 -339
- package/cjs/cl.muxdata.js +15 -15
- package/cjs/cl.onboard.js +3 -3
- package/cjs/cl.persistent.js +14 -13
- package/cjs/cl.playlist.js +6 -6
- package/cjs/cl.sessions.js +16 -16
- package/cjs/cl.simid.js +15 -15
- 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 +37 -37
- package/cl.adobe.js +3 -3
- package/cl.airplay.js +3 -3
- package/cl.broadpeak.js +5 -5
- package/cl.cast.js +88 -88
- package/cl.conviva.js +27 -27
- package/cl.core.js +492 -478
- package/cl.crypto.js +9 -9
- package/cl.dash.js +81 -80
- package/cl.externs.js +94 -30
- package/cl.freewheel.js +19 -19
- package/cl.hls.js +75 -74
- package/cl.hlssmpte.js +5 -5
- package/cl.htmlcue.js +26 -26
- package/cl.ima.js +17 -17
- package/cl.mse.js +307 -305
- 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 +13 -13
- package/cl.smooth.js +59 -59
- 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 -28
- package/package.json +1 -1
- package/typings.d.ts +44 -10
package/cjs/cl.tizen.js
CHANGED
|
@@ -1,76 +1,76 @@
|
|
|
1
1
|
(function(){var g={}; var _ = _ || {}
|
|
2
|
-
var f=function(window){var
|
|
3
|
-
c,d;return _.I(function(e){if(1==e.a){b=a.a===_.
|
|
4
|
-
keyIds:[],periodId:null},_.
|
|
5
|
-
"Initialize",""),webapis.avplay.setDrm(b.
|
|
6
|
-
_.
|
|
7
|
-
6,6007,{message:"Error while fetching license!",url:H.data.url,status:H.data.status||NaN,response:H.data.response||"",headers:H.data.headers||{}},H);a.D.onError(G);_.B(D)})},
|
|
8
|
-
{detail:{bufferedTimeMS:-1,reason:a.h}}))):a.j===_.
|
|
9
|
-
b)}
|
|
10
|
-
|
|
11
|
-
c=null;a=_.w(a.a.periods);for(var d=a.next();!d.done;d=a.next())d=d.value,d.startTime<=b&&(c=d);return c},
|
|
12
|
-
a[d].kind||_.
|
|
13
|
-
var c=
|
|
14
|
-
|
|
15
|
-
0<f.length&&(c=f[0]));a.g.debug("Setting audio track with preferred language:",e);a.
|
|
16
|
-
function(a,b,c){var d=_.
|
|
17
|
-
c.language=_.
|
|
18
|
-
_.
|
|
19
|
-
c.length;e++){var f=
|
|
20
|
-
b){c=a[d].renditions[e];break}return c},
|
|
21
|
-
0;this.o=!0;this.f=!1;this.a=null;this.A=1;this.w=!1;this.j={}},
|
|
22
|
-
{currentTime:b}))},onevent:a.
|
|
23
|
-
|
|
24
|
-
_.y(d,Promise.race([
|
|
25
|
-
_.C(p,2);g=a.l[d].url;h=a.l[d].type;h!==_.
|
|
26
|
-
_.y(p,
|
|
27
|
-
|
|
28
|
-
null;return e===
|
|
29
|
-
h+" track. Trying again...AVPlay state: "+(a.getState()+", buffering: ")+a.w,n),!1===m&&(a.j[h]={type:h,index:l,
|
|
30
|
-
d)}},
|
|
31
|
-
|
|
32
|
-
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,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())},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
var
|
|
36
|
-
_.t.
|
|
37
|
-
_.t.
|
|
38
|
-
_.t.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 _.y(m,
|
|
39
|
-
_.C(m,3);e=b;return _.y(m,b.j.start(a.url,d),5);case 5:e.a=m.f;_.
|
|
40
|
-
b.g.debug("Could not setup media source..."),b.h=null,b.f=null,b.j=null,b.a=null,_.B(m)}})};_.t.
|
|
41
|
-
_.t.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)}_.B(b)})};_.t.setTextVisibility=function(a){this.g.debug("Set text visibility",a);this.h&&this.h.getTextDisplayer().setTextVisibility(a)};_.t.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;_.B(b)})};
|
|
42
|
-
_.t.destroy=function(){var a=this;return _.I(function(b){switch(b.a){case 1:if(!a.j){b.F(2);break}return _.y(b,a.j.stop(),3);case 3:a.j=null;case 2:if(!a.f){b.F(4);break}return _.y(b,a.f.destroy(),5);case 5:a.f=null,a.w=!0;case 4:if(!a.h){b.F(0);break}return _.y(b,a.h.destroy(),7);case 7:a.h=null,_.B(b)}})};_.x(
|
|
43
|
-
_.t.initialize=function(a){var b=this;this.m=a;this.a=this.m.a;this.m.on(_.
|
|
44
|
-
_.t.load=function(){if(this.a&&!(0<Object.keys(this.f).length)){this.j=this.m.h;this.m.off(_.
|
|
45
|
-
_.t.
|
|
46
|
-
_.t.
|
|
47
|
-
_.t.
|
|
48
|
-
_.t.addTextTrack=function(){};_.t.wa=function(){return this.a.o};
|
|
49
|
-
|
|
50
|
-
_.t.
|
|
51
|
-
_.t.play=function(){function a(){return new Promise(function(d,e){function f(){d();clearTimeout(g)}var g=null;b.one(
|
|
52
|
-
Promise.resolve():Promise.reject("Player is in invalid state")};_.t.pause=function(){try{webapis.avplay.pause()}catch(a){Promise.reject(a)}return this.getState()===
|
|
53
|
-
_.t.setPlaybackRate=function(a){var b=this.getState();if(b===
|
|
54
|
-
_.t.load=function(a,b){var c=this,d;return _.I(function(e){switch(e.a){case 1:return c.g.debug("configure()",b||""),_.C(e,2),_.y(e,
|
|
55
|
-
_.t.seek=function(a){var b=this,c=1E3*a;return new Promise(function(d,e){b.B=!0;b.m.trigger(new _.L(_.
|
|
56
|
-
_.t.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.
|
|
57
|
-
_.t.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
|
|
58
|
-
_.t.isLive=function(){if(this.f&&this.a)return this.a.isLive;try{return"1"===webapis.avplay.getStreamingProperty("IS_LIVE")}catch(a){this.
|
|
59
|
-
var
|
|
60
|
-
_.t.
|
|
61
|
-
_.t.
|
|
62
|
-
_.t.init=function(a,b){this.configuration=this.B=b;this.w=a;this.a.on(
|
|
63
|
-
var e=[_.
|
|
64
|
-
_.t.seekWith=function(){return Promise.reject(_.
|
|
65
|
-
_.t.destroy=function(){var a=this;return _.I(function(b){switch(b.a){case 1:return _.y(b,a.release(),2);case 2:a.a.off(
|
|
66
|
-
_.t.setDrmCustomDataModifier=function(){};_.t.setCdnErrorCallback=function(){};_.t.detach=function(){};_.t.setPlaybackRate=function(a){this.a.setPlaybackRate(a)};_.t.getPosition=function(){return this.getMediaPosition()};_.t.getMediaPosition=function(){return 0<(this.configuration.startTime||0)&&!this.A?0:this.f.getState()===_.
|
|
67
|
-
_.t.getPresentationStartTime=function(){return null};_.t.getSeekRange=function(){return{start:0,end:0}};_.t.getVolume=function(){var a=this.a.getVolume();return typeof a===_.k?a/100:null};_.t.setVolume=function(a){this.a.setVolume(a)};_.t.getDuration=function(){return this.getMediaDuration()};_.t.getMediaDuration=function(){return this.a.getDuration()};_.t.getBufferInfo=function(){this.g.warn(_.
|
|
2
|
+
var f=function(window){var PQ="An unknown error occurred while trying to get volume",QQ="Cannot get loading rendition due to platform limitations",RQ="PARAM_START_POSITION",SQ="SecurityError",TQ="The require privilege is: http://tizen.org/privilege/tv.audio",UQ="|STARTBITRATE\x3d",VQ=function(a,b,c){function d(e){c.call(a,e);a.removeEventListener(b,d)}a.addEventListener(b,d)},WQ=function(a,b){this.h=a;this.o=null;this.a=_.ef;this.l=null;this.j=!1;this.f=new Map;this.D=b;this.g=new _.K("clpp.tizen.DrmEngine")},ZQ=function(a){var b,
|
|
3
|
+
c,d;return _.I(function(e){if(1==e.a){b=a.a===_.Xd||a.a===_.Vd;if(!b)throw new _.O(_.P,6,6001,"The key system "+a.a+" is not supported by the player or the platform");c=a.f.get(a.a);if(!c.ue)throw new _.O(_.P,6,6012,"No license server given for "+a.a);_.C(e,2);return a.a===_.Xd?_.y(e,XQ(a),5):_.y(e,YQ(a,c),5)}if(2!=e.a)return a.o={keySystem:a.a,licenseServerUri:c.ue,distinctiveIdentifierRequired:!1,persistentStateRequired:c.Hg,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],
|
|
4
|
+
keyIds:[],periodId:null},_.Hh(e,0);d=_.E(e);a.g.error("Error while configuring CDM for "+a.a,d);throw new _.O(_.P,6,6005,{message:JSON.stringify(d)});})},YQ=function(a,b){var c,d,e,f;return _.I(function(g){c=$Q;d=aR;e={};e[d.Hj]=!b.Hg;e[d.Jj]=b.ue;""!==b.customData&&(e[d.Fj]=b.customData);f=JSON.stringify(e);a.g.debug("PlayReady properties: ",f);try{webapis.avplay.setDrm(c.PLAYREADY,"SetProperties",f)}catch(h){throw h;}_.B(g)})},XQ=function(a){var b;return _.I(function(c){b=$Q;try{webapis.avplay.setDrm(b.Pe,
|
|
5
|
+
"Initialize",""),webapis.avplay.setDrm(b.Pe,"widevine_app_session",a.l.id),webapis.avplay.setDrm(b.Pe,"widevine_data_type",a.l.type)}catch(d){throw d;}_.B(c)})},bR=function(a,b){var c,d,e,f,g,h,l,m,n,p,q,u,v,z,A,H,G;_.I(function(D){if(1==D.a){c=$Q;d=a.f.get(a.a);a.g.debug("DRM Challenge data: ",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.ue;l=_.wk([h],_.sk());l.type=3;l.body=f.buffer;l.method=
|
|
6
|
+
_.Ib;_.C(D,2);return _.y(D,a.D.Eb.fetch(l).T,4)}if(2!=D.a){m=D.f;if(a.j){n=_.Xj(m.data);p=n.byteLength;q="";for(u=0;u<p;u++)q+=String.fromCharCode(n[u]);v=btoa(q);z=b.session_id+RQ+(v+RQ);a.g.debug("Widevine license params",z);try{webapis.avplay.setDrm(c.Pe,"widevine_license_data",z)}catch(F){a.g.error("License response rejected by CDM"),A=new _.O(_.P,6,6008,{browserError:JSON.stringify(F)}),a.D.onError(A)}}return _.Hh(D,0)}H=_.E(D);a.g.error("License request failed.",JSON.stringify(H));G=new _.O(_.P,
|
|
7
|
+
6,6007,{message:"Error while fetching license!",url:H.data.url,status:H.data.status||NaN,response:H.data.response||"",headers:H.data.headers||{}},H);a.D.onError(G);_.B(D)})},cR=function(a){this.m=a;this.a=this.m.a;this.f=_.Gq;this.j=_.Hq;this.w=(new Date).getTime();this.l=!1;this.o=-1;this.h=2;this.g=new _.K("clpp.tizen.StateManager")},eR=function(a,b){if(a.f!==b)if(a.f===_.Rq&&b!==_.Gq)a.g.debug(_.BD+dR(b));else{var c=(new Date).getTime();a.j=a.f;a.f=b;a.f===_.Lq?(a.o=(new Date).getTime(),a.m.trigger(new _.L(_.od,
|
|
8
|
+
{detail:{bufferedTimeMS:-1,reason:a.h}}))):a.j===_.Lq&&a.m.trigger(new _.L(_.nd,{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 _.L(_.qg,{detail:d}));a.g.debug("State changed:",dR(a.j),"-\x3e",dR(a.f))}},dR=function(a){return Object.keys(_.Pq)[a]},hR=function(a){if(a.l){var b=a.a.getState(),c=a.f;switch(b){case fR:c=_.Uq;break;case gR:c=_.Tq;break;default:a.m.isEnded()?c=_.Nq:a.g.debug("Inconsistent AVPlay playback state:",
|
|
9
|
+
b)}eR(a,c)}},iR=function(){this.o=this.A=this.f=this.h=this.B=this.m=this.j=this.a=null;this.C=!1;this.w=!0;this.l=null;this.g=new _.K("clpp.tizen.TextStreamer")},jR=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},kR=function(a){var b,c;return _.I(function(d){if(1==d.a)return b=a.m.getConfiguration(),c=null,_.y(d,_.dv(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)})},
|
|
10
|
+
lR=function(a){var b=document.createElement(_.r),c=new _.tH,d=new _.WE,e=a.m.getTextDisplayer();return new _.vH(b,c,e,d,a.m.getConfiguration())},mR=function(a){var b={configuration:{},Qb:function(){return a.m.getPosition()},X:a.h,Eb:a.m.getNetworkEngine(),od:null,yg:a.tl.bind(a),xg:a.sl.bind(a),onError:a.ul.bind(a),Wi:function(){},onEvent:function(){},aj:a.vl.bind(a),vf:function(){},ee:function(){return new _.XH},Wf:function(){return!1},Zd:null};return new _.RI(a.a,b)},nR=function(a){var b=a.m.getPosition(),
|
|
11
|
+
c=null;a=_.w(a.a.periods);for(var d=a.next();!d.done;d=a.next())d=d.value,d.startTime<=b&&(c=d);return c},oR=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=c[d].textStreams;break}a=b}else a=[];b=[];for(d=c=0;d<a.length;d++){var e=new _.Xk(String(c++),_.Zk);e.mimeType=a[d].mimeType;e.language=a[d].language;e.roles=a[d].roles;
|
|
12
|
+
e.kind=a[d].kind||_.jE;var f=new _.gl(String(a[d].id),e);f.bandwidth=a[d].bandwidth||null;e.renditions.push(f);b.push(e)}return b},pR=function(a){if(a.h&&!a.h.getTextDisplayer().isTextVisible())return null;if(a.f){var b=_.UI(a.f,_.Q),c=null;if(b){a=oR(a);for(var d=0;d<a.length;d++)if(a[d].renditions[0].id===String(b.id)){c=a[d].renditions[0];break}}return c}return null},qR=function(a,b){a.g.debug("Set active track",b);if(b&&(a.o=b.language,a.A=b.roles[0]||"",a.C=b.kind===_.Be,a.a&&a.f)){a.setTextVisibility(!0);
|
|
13
|
+
var c=nR(a),d=b.renditions[0];(c=c.textStreams.find(function(e){return String(e.id)===d.id}))?(a.w?(a.g.debug("Switching period defer text selection"),a.l=c):(_.fJ(a.f,c,!0,0),a.m.trigger(new _.L(_.Bg))),a.o=c.language):a.g.error(_.zD,d.id)}},rR=function(){this.j=this.a=this.m=null;this.f={};this.g=new _.K("clpp.tizen.TrackManager");this.w=this.o=this.l=null;this.A=!1;this.h=1},sR=function(a,b){a.m.trigger(new _.L(_.$g,{details:{width:b.width,height:b.height,bandwidth:b.bandwidth,track:b.track,abrSelection:a.a.o}}))},
|
|
14
|
+
tR=function(a){var b=a.na();b&&a.m.trigger(new _.L(_.ld,{detail:{width:b.width,height:b.height,bandwidth:b.bandwidth,rendition:b}}))},uR=function(a){var b=a.m.getConfiguration(),c=_.Ui(b.preferredAudioLanguage||[]),d=a.f[_.U]||[];if(d.length){var e=null;c.some(function(g){e=_.IE(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)}),
|
|
15
|
+
0<f.length&&(c=f[0]));a.g.debug("Setting audio track with preferred language:",e);a.Ka(c)}else a.g.debug("Preferred language(s) not available")}else a.g.debug("Could not set preferred audio language")},yR=function(a,b){if(b){var c=b.track.type.toUpperCase();vR(a.a,c,Number(b.id)).then(function(){c===wR&&(a.l=b,a.m.trigger(new _.L(_.jd)));c===xR&&(a.o=b,a.m.trigger(new _.L(_.Bg)))})["catch"](function(){a.g.error("Could not select "+c+" track.")})}else a.g.debug("Must provide valid rendition")},zR=
|
|
16
|
+
function(a,b,c){var d=_.Oj(b.language||_.Lg);c.language=_.Yk(d);c.originalLanguage=d;c.channelsCount=b.channels?Number(b.channels):null;c.mimeType=_.gd;a=new _.gl(String(a),c);a.track=c;a.codec=b.fourCC||null;a.bandwidth=b.bit_rate||null;return a},AR=function(a,b,c){c.mimeType=_.Yg;a=new _.gl(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},BR=function(a,b,c){b=_.Oj(b.track_lang||_.Lg);c.mimeType="text/ttml";
|
|
17
|
+
c.language=_.Yk(b);c.originalLanguage=b;c.kind=_.jE;return new _.gl(String(a),c)},CR=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},FR=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===DR}),f=b.filter(function(n){return n.type===wR}),g=[],h=0;h<f.length;h++){var l=CR(a,f[h].extra_info);if(l){var m=
|
|
18
|
+
_.Oj(l.language||_.Lg);m=_.Yk(m);m=c(g,m);m||(m=new _.Xk(String(a.h++),_.U),g.push(m));m.renditions.push(zR(f[h].index,l,m))}else a.g.warn("Skipping audio stream with no extra info")}f=new _.Xk(String(a.h++),_.$k);for(h=0;h<e.length;h++)(l=CR(a,e[h].extra_info))?f.renditions.push(AR(e[h].index,l,f)):a.g.warn("Skipping video stream with no extra info");e=[];e=a.j?oR(a.j):ER(a,b);d[_.$k]=[f];d[_.U]=g;d[_.Zk]=e;return d},ER=function(a,b){for(var c=b.filter(function(h){return h.type===xR}),d=[],e=0;e<
|
|
19
|
+
c.length;e++){var f=CR(a,c[e].extra_info);if(f){var g=new _.Xk(String(a.h++),_.Zk);g.renditions.push(BR(c[e].index,f,g));d.push(g)}else a.g.warn("Skipping text stream with no extra info")}return d},GR=function(a,b){for(var c=a.f[_.$k]||[],d=[],e=0;e<c.length;e++)for(var f=0;f<c[e].renditions.length;f++)_.N.qa(c[e].renditions[f],b,Object.keys(b))&&d.push(c[e].renditions[f]);return d[0]||null},HR=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===
|
|
20
|
+
b){c=a[d].renditions[e];break}return c},JR=function(a,b){if(b===_.Zk&&a.j)return pR(a.j);var c=IR(a.a)||[];if(0===c.length)return null;c=c.filter(function(e){return e.type===b.toUpperCase()})[0];var d=null;b===_.$k&&(d=CR(a,c.extra_info),d=GR(a,{width:d.Width,height:d.Height}));b===_.U&&(c?(d=HR(a,c,_.U),a.l=d):d=a.l);b===_.Zk&&(c?(d=HR(a,c,_.Zk),a.o=d):d=a.o);return d},KR=function(a){_.Hm.call(this);this.m=a;this.h=null;this.g=new _.K("clpp.tizen.Middleware");this.C=1;this.B=!1;this.l=null;this.G=
|
|
21
|
+
0;this.o=!0;this.f=!1;this.a=null;this.A=1;this.w=!1;this.j={}},LR=function(a){return _.I(function(b){tizen.systeminfo.getPropertyValue("DISPLAY",function(c){a.A=c.resolutionWidth/1920;a.g.debug("Display resolution ratio: ",a.A)},function(c){a.g.debug("Could not load DISPLAY property");throw c;});_.B(b)})},NR=function(a){try{webapis.avplay.setListener({onbufferingstart:a.nl.bind(a),onbufferingprogress:a.ml.bind(a),onbufferingcomplete:a.ll.bind(a),onstreamcompleted:a.ql.bind(a),oncurrentplaytime:function(b){a.trigger(new _.L(MR,
|
|
22
|
+
{currentTime:b}))},onevent:a.pl.bind(a),onsubtitlechange:a.rl.bind(a),ondrmevent:a.ol.bind(a),onerror:a.Ud.bind(a)})}catch(b){a.g.error(b)}},OR=function(a){var b=!!a.m.getTrackManager().Za();try{webapis.avplay.setSilentSubtitle(!b)}catch(c){a.g.debug("Could not set AVPlay subtitle config",c)}},PR=function(a,b){try{var c=b.estimatedBandwidth||0,d=b.currentBandwidth||0;a.g.debug({estimatedBandwidth:c,mp:d});0!==c&&0!==d&&c>=1.15*d&&webapis.avplay.setStreamingProperty("ADAPTIVE_INFO",UQ+d)}catch(e){a.g.debug(e)}},
|
|
23
|
+
QR=function(a,b){try{webapis.avplay.setStreamingProperty("ADAPTIVE_INFO","|BITRATES\x3d"+b+UQ+b)}catch(c){throw a.g.debug("Could not set fixed bandwidth",c),c;}},TR=function(a){return{position:a.getPosition(),state:a.m.getState(),th:a.getState(),playbackRate:a.getPlaybackRate(),isLive:a.isLive(),duration:a.getDuration(),isMuted:RR(a),volume:a.getVolume(),Jo:SR(a),Hl:IR(a)}},VR=function(a){var b,c;return _.I(function(d){if(1==d.a)return _.y(d,UR(),2);if(3!=d.a)return b=new Promise(function(e){(new _.li(e)).fa(5)}),
|
|
24
|
+
_.y(d,Promise.race([LR(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"),d["return"](Promise.reject("SDK Timeout"));_.B(d)})},bS=function(a,b,c){var d,e,f,g,h,l,m,n;return _.I(function(p){switch(p.a){case 1:a.l=_.Yq(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 _.L(WR)),f=c.currentPosition);
|
|
25
|
+
_.C(p,2);g=a.l[d].url;h=a.l[d].type;h!==_.Wc||g.includes(".mpd")||(l=new URL(g),l.searchParams.append("cl-ext",".mpd"),g=l.toString());webapis.avplay.open(g);e.nextBandwidth?(QR(a,e.nextBandwidth),a.o=!1):(a.o||PR(a,e),a.o=!0);NR(a);if(!b.drm||!b.drm.env){a.g.debug("No DRM configuration was provided. Assuming clear content");p.F(4);break}m={onError:function(q){return a.m.onError(q)},Eb:a.m.getNetworkEngine()};a.h=new WQ(b.drm,m);return _.y(p,a.h.init(),4);case 4:return a.f||a.trigger(new _.L(YR)),
|
|
26
|
+
_.y(p,ZR(a),6);case 6:a.f||a.trigger(new _.L($R));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&&a.setVolume(b.volume),b.muted&&aS(a,b.muted),b.autoplay&&a.m.play()["catch"](function(q){a.g.debug("Autoplay failed",q)}));_.Hh(p,0);break;case 2:throw n=_.E(p),a.g.debug("Error while attempting to load source."),n;}})},ZR=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!");
|
|
27
|
+
OR(a);c()},function(e){a.g.debug("prepareAsync failed",e);d(e)})}catch(e){a.g.debug("Failed to prepare media player for playback"),d(e)}}))})},cS=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=TR(a);a.f=!0;webapis.avplay.stop();webapis.avplay.close();return a.load(a.m.getConfiguration(),d).then(function(){var e=a.a.th;a.f=!1;a.a=
|
|
28
|
+
null;return e===gR?a.pause():a.play()})}catch(e){return Promise.reject(e)}},SR=function(a){return a.f&&a.a?a.a.Jo:webapis.avplay.getTotalTrackInfo()},IR=function(a){return a.f&&a.a?a.a.Hl:webapis.avplay.getCurrentStreamInfo()},vR=function(a,b,c){b=b.toUpperCase();b===xR&&dS(a,!0);var d=a.j[b];d&&(d.Df.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 "+
|
|
29
|
+
h+" track. Trying again...AVPlay state: "+(a.getState()+", buffering: ")+a.w,n),!1===m&&(a.j[h]={type:h,index:l,ph:0,Df:new _.li(function(){return g(h,c,!0)})}),(l=a.j[h])&&3>l.ph?(!a.w&&++l.ph,l.Df.fa(a.w?.5:.25)):(a.g.debug("Could not set track after multiple attempts.Giving up..."),l&&l.Df.stop(),a.j[h]=null,f())}}g(b,c)})},dS=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",
|
|
30
|
+
d)}},aS=function(a,b){try{tizen.tvaudiocontrol.setMute(b)}catch(c){switch(c.name){case SQ:a.g.warn("The application does not have the privilege to set mute.",TQ);break;default:a.g.warn(PQ,c)}}},RR=function(a){var b=null;try{b=tizen.tvaudiocontrol.isMute()}catch(c){switch(c.name){case SQ:a.g.warn("The application doesn't have the privilege to get the mute state.",TQ);break;default:a.g.warn(PQ,c)}}return!!b},UR=function(){return new Promise(function(a,b){if(window.webapis)a();else{var c=document.createElement("script");
|
|
31
|
+
VQ(c,_.Re,function(d){return a(d)});VQ(c,_.ze,function(d){return b(d)});c.src="$WEBAPIS/webapis/webapis.js";document.querySelector("head").appendChild(c)}})},eS=function(){_.Hm.call(this);this.a=new KR(this);this.f=new cR(this);this.configuration=this.B=_.Om();this.w=null;this.g=new _.K("clpp.tizen.Player");this.j=null;this.l=new rR;this.C=new _.Rk;this.o=this.h=null;this.A=!1},fS=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*
|
|
32
|
+
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,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())},gS=function(){},hS=function(){};
|
|
33
|
+
WQ.prototype.init=function(){var a=this,b,c,d,e,f,g;return _.I(function(h){if(1==h.a){b=_.hn[a.h.env]||null;if(!b)throw a.g.debug(_.Da,_.Nb+a.h.env+_.aa),new _.O(_.P,6,6015,_.Ea+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=_.kn(b,a.h.customData);(e=d[_.Vd])&&a.f.set(_.Vd,{ue:e.licenseUrl||"",customData:c,Hg:!1});(f=d[_.Xd])&&a.f.set(_.Xd,{ue:f.licenseUrl||"",customData:c,
|
|
34
|
+
Hg:!1});if(0===a.f.size)throw new _.O(_.P,6,6E3);if((g=a.h.preferredDrmSystem)&&a.f.get(g))a.a=g;else if(a.f.get(_.Vd))a.a=_.Vd;else if(a.f.get(_.Xd))a.a=_.Xd;else throw new _.O(_.P,6,6001,"Configuration for the target system is missing.");return _.y(h,ZQ(a),2)}a.j=!0;_.B(h)})};WQ.prototype.release=function(){var a=this;return _.I(function(b){a.j=!1;a.o=null;a.a=_.ef;a.l=null;a.f=new Map;_.B(b)})};WQ.prototype.getDrmInfo=function(){return this.o};
|
|
35
|
+
var aR={Hj:"DeleteLicenseAfterUse",Jj:"LicenseServer",Xo:"GetChallenge",Yo:"HttpHeader",$o:"UserAgent",Uo:"Cookie",Fj:"CustomData"};_.t=cR.prototype;_.t.initialize=function(){this.a.on(WR,this.Qh,this);this.a.on(iS,this.Ph,this);this.a.on(jS,this.Oh,this);this.a.on(YR,this.cj,this);this.a.on($R,this.bj,this);this.a.on(kS,this.Rh,this)};_.t.release=function(){eR(this,_.Gq);this.l=!1;this.o=-1;this.h=2};_.t.destroy=function(){this.release();this.a.off(WR,this.Qh);this.a.off(iS,this.Ph);this.a.off(jS,this.Oh);this.a.off(YR,this.cj);this.a.off($R,this.bj);this.a.off(kS,this.Rh);this.m=this.a=null};
|
|
36
|
+
_.t.Qh=function(){this.g.debug("Buffering start. Player state: ",this.a.getState());this.h=this.a.B?1:2;eR(this,_.Lq)};_.t.Ph=function(a){this.g.debug("Buffering progress: "+a.percent+" %. Player state: ",dR(this.f))};_.t.Oh=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()===lS;if(!a&&b){eR(this,_.Tq);return}}if(a=this.f!==_.Sq)a=this.a.getState(),a=a===fR||a===gR;a&&hR(this)};
|
|
37
|
+
_.t.cj=function(){this.g.debug("Preparing starts. AVPlay State: ",this.a.getState());this.a.getState()===mS?eR(this,_.Sq):this.g.error("AVPlay prepares while state is not IDLE")};_.t.bj=function(){this.g.debug("Preparing ends: AVPlay state:",this.a.getState())};_.t.Rh=function(){eR(this,_.Nq)};_.t.getState=function(){return this.f};_.t=iR.prototype;_.t.initialize=function(a){this.m=a};
|
|
38
|
+
_.t.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 _.y(m,kR(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(){},
|
|
39
|
+
onEvent:function(){},onError:function(){}};_.C(m,3);e=b;return _.y(m,b.j.start(a.url,d),5);case 5:e.a=m.f;_.Hh(m,4);break;case 3:return f=_.E(m),b.g.warn(f),_.C(m,6),g=b,_.y(m,b.j.start(a.url.replace("https://","http://"),d),8);case 8:g.a=m.f;_.Hh(m,4);break;case 6:h=_.E(m),b.g.error(h),b.a=null;case 4:if(!b.a||!jR(b.a)){m.F(0);break}b.h=lR(b);_.C(m,10);return _.y(m,b.h.open(),12);case 12:b.f=mR(b);l=b.m.getConfiguration();b.f.h=l.streaming;b.o=l.preferredTextLanguage;b.A=l.preferredTextRole;b.C=
|
|
40
|
+
l.preferForcedSubtitles;_.Hh(m,0);break;case 10:_.E(m),b.g.debug("Could not setup media source..."),b.h=null,b.f=null,b.j=null,b.a=null,_.B(m)}})};_.t.tl=function(a){this.g.debug(_.bE,a);this.w=!0;var b=_.WH(a.textStreams,this.o||"",this.A||"",this.C)[0]||null;this.l&&(a.textStreams.includes(this.l)&&(b=this.l),this.l=null);return{video:null,audio:null,text:b,fb:null}};_.t.sl=function(){this.g.debug("canSwitch_");this.w=!1;this.l&&(_.fJ(this.f,this.l,!0,0),this.l=null)};_.t.ul=function(){this.g.debug("onError_")};
|
|
41
|
+
_.t.vl=function(){this.j&&this.j.update&&this.j.update()};_.t.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)}_.B(b)})};_.t.setTextVisibility=function(a){this.g.debug("Set text visibility",a);this.h&&this.h.getTextDisplayer().setTextVisibility(a)};_.t.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;_.B(b)})};
|
|
42
|
+
_.t.destroy=function(){var a=this;return _.I(function(b){switch(b.a){case 1:if(!a.j){b.F(2);break}return _.y(b,a.j.stop(),3);case 3:a.j=null;case 2:if(!a.f){b.F(4);break}return _.y(b,a.f.destroy(),5);case 5:a.f=null,a.w=!0;case 4:if(!a.h){b.F(0);break}return _.y(b,a.h.destroy(),7);case 7:a.h=null,_.B(b)}})};_.x(rR,_.Bl);_.t=rR.prototype;_.t.Ti=function(a){var b=a.eventid;a=a.data;switch(b){case nS:0<Object.keys(this.f).length||(this.g.debug("Loading track manager!"),this.load());b=webapis.avplay.getCurrentStreamInfo();0<b.length&&(b=+CR(this,b[0].extra_info).Bit_rate,b=GR(this,{bandwidth:b}))&&(this.w=b,sR(this,b));break;case oS:tR(this);break;default:this.g.debug("Event type: "+b+" data: "+a)}};_.t.Cg=function(a){a.detail.currentState===_.Uq&&this.m.off(_.qg,this.Cg)};
|
|
43
|
+
_.t.initialize=function(a){var b=this;this.m=a;this.a=this.m.a;this.m.on(_.qg,function(c){b.A||(c=c.detail,c.currentState===_.Uq&&(b.g.debug("Current state",c.currentState),b.A=!0,uR(b)))});this.a.on(pS,this.Ti,this)};_.t.release=function(){this.f={};this.j=this.w=this.o=this.l=null;this.A=!1;this.h=1};
|
|
44
|
+
_.t.load=function(){if(this.a&&!(0<Object.keys(this.f).length)){this.j=this.m.h;this.m.off(_.qg,this.Cg);this.m.on(_.qg,this.Cg,this);try{var a=SR(this.a);this.f=FR(this,a);var b=this.f[_.U]||[];b.length&&(this.l=b[0].renditions[0]||null);tR(this)}catch(c){this.g.debug("Could not load track manager")}}};_.t.destroy=function(){this.a.off(pS,this.Ti);this.a=this.m=null};_.t.getVideoTracks=function(){return this.f[_.$k]||[]};_.t.getAudioTracks=function(){return this.f[_.U]||[]};
|
|
45
|
+
_.t.ma=function(){return this.f[_.Zk]||[]};_.t.na=function(){return JR(this,_.$k)};_.t.Va=function(){return JR(this,_.U)};_.t.Za=function(){return JR(this,_.Zk)};_.t.Bb=function(){return this.w};_.t.Nb=function(){this.g.info(QQ);return null};_.t.Ob=function(){this.g.info(QQ);return null};_.t.Na=function(){var a=this.na();return a?a.track:null};_.t.ra=function(){var a=this.Va();return a?a.track:null};_.t.Ba=function(){var a=this.Za();return a?a.track:null};
|
|
46
|
+
_.t.Jb=function(a){var b=this;null===a?(a=this.na(),cS(this.a,a.bandwidth,null).then(function(){tR(b)})):0<a.renditions.length&&this.ub(a.renditions[0])};_.t.Ka=function(a){a?yR(this,a.renditions[0]):this.g.warn("Cannot disable audio tracks on this platform.","Consider muting audio instead...")};_.t.$a=function(a){a?(a=a.renditions[0],this.j?qR(this.j,a.track):yR(this,a)):(this.g.debug("Disabling text tracks"),this.o=null,dS(this.a,!1),this.m.trigger(new _.L(_.Bg)))};
|
|
47
|
+
_.t.ub=function(a){var b=this,c=this.na();this.a.o||a.width!==c.width||a.height!==c.height||a.bandwidth!==c.bandwidth?(this.w=a,sR(this,a),cS(this.a,c.bandwidth,a.bandwidth).then(function(){tR(b)})["catch"](function(d){var e=new _.O(_.P,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...")};_.t.Hb=function(a){yR(this,a)};_.t.Ib=function(a){this.j?qR(this.j,a.track):yR(this,a)};
|
|
48
|
+
_.t.addTextTrack=function(){};_.t.wa=function(){return this.a.o};rR.prototype.isAbrEnabled=rR.prototype.wa;rR.prototype.addTextTrack=rR.prototype.addTextTrack;rR.prototype.setTextRendition=rR.prototype.Ib;rR.prototype.setAudioRendition=rR.prototype.Hb;rR.prototype.setVideoRendition=rR.prototype.ub;rR.prototype.setTextTrack=rR.prototype.$a;rR.prototype.setAudioTrack=rR.prototype.Ka;rR.prototype.setVideoTrack=rR.prototype.Jb;rR.prototype.getTextTrack=rR.prototype.Ba;rR.prototype.getAudioTrack=rR.prototype.ra;
|
|
49
|
+
rR.prototype.getVideoTrack=rR.prototype.Na;rR.prototype.getLoadingTextRendition=rR.prototype.Ob;rR.prototype.getLoadingAudioRendition=rR.prototype.Nb;rR.prototype.getLoadingVideoRendition=rR.prototype.Bb;rR.prototype.getTextRendition=rR.prototype.Za;rR.prototype.getAudioRendition=rR.prototype.Va;rR.prototype.getVideoRendition=rR.prototype.na;rR.prototype.getTextTracks=rR.prototype.ma;rR.prototype.getAudioTracks=rR.prototype.getAudioTracks;rR.prototype.getVideoTracks=rR.prototype.getVideoTracks;_.x(KR,_.Hm);_.t=KR.prototype;_.t.nl=function(){this.w=!0;this.f||this.trigger(new _.L(WR))};_.t.ml=function(a){this.w=!0;this.trigger(new _.L(iS,{percent:a}))};_.t.ll=function(){this.w=!1;this.trigger(new _.L(jS))};_.t.ql=function(){this.trigger(new _.L(kS))};_.t.pl=function(a,b){this.trigger(new _.L(pS,{eventid:a,data:b}))};_.t.rl=function(a,b,c,d,e){this.trigger(new _.L(qS,{duration:a,text:b,subtitleType:c,attriCount:d,attributes:e}))};
|
|
50
|
+
_.t.ol=function(a,b){this.trigger(new _.L(rS,{drmType:a,drmData:b}));if(this.h){var c=this.h;if(c.j)if(c.a===_.Xd&&"Challenge"===b.name)bR(c,b);else if("DrmError"===b.name){c.g.debug("DrmError event",b);var d=new _.O(_.P,6,6005,{message:JSON.stringify(b)});c.D.onError(d)}}};_.t.Ud=function(a){this.trigger(new _.L(sS,{eventType:a}))};
|
|
51
|
+
_.t.play=function(){function a(){return new Promise(function(d,e){function f(){d();clearTimeout(g)}var g=null;b.one(MR,f,b);g=setTimeout(function(){b.off(MR,f);e("Timeout")},3E4)})}var b=this,c=this.getState();if(c===mS)return(new Promise(function(d,e){webapis.avplay.prepareAsync(function(){OR(b);d(webapis.avplay.play())},function(f){b.trigger(new _.L(sS));e(f)})})).then(function(){return a()});if(c===gR||c===lS)try{return webapis.avplay.play(),a()}catch(d){return Promise.reject(d)}return c===fR?
|
|
52
|
+
Promise.resolve():Promise.reject("Player is in invalid state")};_.t.pause=function(){try{webapis.avplay.pause()}catch(a){Promise.reject(a)}return this.getState()===gR?Promise.resolve():Promise.reject()};
|
|
53
|
+
_.t.setPlaybackRate=function(a){var b=this.getState();if(b===lS||b===fR||b===gR){try{webapis.avplay.setSpeed(a),this.C=a}catch(c){return this.g.debug("Error while trying to set playback rate",c),this.setPlaybackRate(this.C)}return!0}this.g.debug("Cannot set playback rate; AVPlay is in inconsistent state: "+b);return!1};_.t.getPlaybackRate=function(){return this.C};
|
|
54
|
+
_.t.load=function(a,b){var c=this,d;return _.I(function(e){switch(e.a){case 1:return c.g.debug("configure()",b||""),_.C(e,2),_.y(e,VR(c),4);case 4:return _.y(e,bS(c,a,b),5);case 5:_.Hh(e,0);break;case 2:throw d=_.E(e),new _.O(_.P,7,7003,null,d);}})};_.t.getState=function(){if(this.f&&this.a)return this.a.th;try{return webapis.avplay.getState()}catch(a){this.Ud(JSON.stringify(a))}};
|
|
55
|
+
_.t.seek=function(a){var b=this,c=1E3*a;return new Promise(function(d,e){b.B=!0;b.m.trigger(new _.L(_.Sg));webapis.avplay.seekTo(c,function(){b.B=!1;b.m.trigger(new _.L(_.Rg));d()},function(){b.B=!1;e()})})};_.t.getPosition=function(){if(this.f&&this.a)return this.a.position;try{return webapis.avplay.getCurrentTime()/1E3}catch(a){this.Ud(JSON.stringify(a))}};_.t.getDuration=function(){if(this.f&&this.a)return this.a.duration;try{return webapis.avplay.getDuration()/1E3}catch(a){this.Ud(JSON.stringify(a))}};
|
|
56
|
+
_.t.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.Df.stop()}a.j={};a.C=1;a.B=!1;a.l=null;a.a=null;return b()}catch(f){return c(f)}})};_.t.getVolume=function(){var a=null;try{a=tizen.tvaudiocontrol.getVolume()}catch(b){switch(b.name){case SQ:this.g.debug("The application does not have the privilege to get the volume.",TQ);break;default:this.g.debug(PQ,b)}}return a};
|
|
57
|
+
_.t.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 SQ:this.g.warn("The application does not have the privilege to set the volume.",TQ);break;default:this.g.warn("An unknown error occurred while trying to set volume",b)}}};
|
|
58
|
+
_.t.isLive=function(){if(this.f&&this.a)return this.a.isLive;try{return"1"===webapis.avplay.getStreamingProperty("IS_LIVE")}catch(a){this.Ud(JSON.stringify(a))}};_.t.stop=function(){try{webapis.avplay.stop()}catch(a){this.g.debug(a)}};_.t.getDrmInfo=function(){this.h&&this.h.getDrmInfo();return null};_.t.setSourceIndex=function(a){this.G=a};_.t.getSourceIndex=function(){return this.G};_.t.getLoadedSource=function(){return this.l&&this.l[this.getSourceIndex()]};
|
|
59
|
+
var mS="IDLE",lS="READY",fR="PLAYING",gR="PAUSED",DR=_.ic,wR=_.ja,xR="TEXT",oS="PLAYER_MSG_RESOLUTION_CHANGED",nS="PLAYER_MSG_BITRATE_CHANGE",$Q={PLAYREADY:"PLAYREADY",Vo:"EME_PLAYREADY",ap:"VERIMATRIX",Pe:"WIDEVINE_CDM",Wo:"EME_WIDEVINE_CDM",cp:"WIDEVINE_CLASSIC"};_.x(eS,_.Hm);_.t=eS.prototype;_.t.Mh=function(){var a=this;this.g.debug("On Stream completed. Current time: ",this.getPosition());this.trigger(new _.L(_.ye));this.configuration.loop?this.seek(this.configuration.startTime||0)["catch"](function(){a.g.debug("Could not loop playback")}):this.a.stop()};_.t.Jh=function(a){this.trigger(new _.L(_.Gg,{currentTime:a.currentTime/1E3}))};
|
|
60
|
+
_.t.Nh=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=_.T.Wg(d))&&this.o.append([new _.fj(b,c,d)],[])};_.t.Kh=function(a){this.g.debug("DRM event: "+a.drmType+", data: "+a.drmData)};_.t.Vi=function(){this.A||(this.g.debug("Initial buffering completed..."),this.A=!0)};
|
|
61
|
+
_.t.Lh=function(a){this.g.debug("Error: TYPE: "+a.eventType);eR(this.f,_.Rq);a=new _.O(_.P,7,7200,{tizenerror:a.eventType});this.a.release();this.trigger(new _.L(_.ze,{detail:a}))};
|
|
62
|
+
_.t.init=function(a,b){this.configuration=this.B=b;this.w=a;this.a.on(kS,this.Mh,this);this.a.on(MR,this.Jh,this);this.a.on(qS,this.Nh,this);this.a.on(rS,this.Kh,this);this.a.on(sS,this.Lh,this);this.a.on(jS,this.Vi,this);this.f.initialize();this.l.initialize(this);this.g.debug("Initializing player surface");this.w.hideMediaElement();var c=tS;tS+=1;this.j=_.sr(_.ff,{id:"__clpp_tizen_player_"+c,type:"application/avplayer"});this.w.addElementToContainer(this.j,!0);var d=this.w.getMedia();if(d){c=this.j;
|
|
63
|
+
var e=[_.kh,_.Ee,"position",_.Ke,"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=_.w(e);for(e=g.next();!e.done;e=g.next())e=e.value,f[e]=d[e];_.ur(c,f);fS(this)}};_.t.getSurface=function(){return this.w};_.t.getConfiguration=function(){return this.configuration};_.t.getTimeline=function(){return null};_.t.setupPlaylist=function(){return Promise.reject(_.Eb)};_.t.appendLoad=function(){return Promise.reject(_.Eb)};
|
|
64
|
+
_.t.seekWith=function(){return Promise.reject(_.Eb)};_.t.setSeekInterceptor=function(){};_.t.setPlaybackSessionId=function(){};_.t.getBandwidthEstimate=function(){return null};
|
|
65
|
+
_.t.destroy=function(){var a=this;return _.I(function(b){switch(b.a){case 1:return _.y(b,a.release(),2);case 2:a.a.off(kS,a.Mh);a.a.off(MR,a.Jh);a.a.off(qS,a.Nh);a.a.off(rS,a.Kh);a.a.off(sS,a.Lh);a.a.off(jS,a.Vi);if(!a.h){b.F(3);break}return _.y(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,_.B(b)}})};_.t.namespace=function(){return uS};_.t.getPlaybackRate=function(){return this.a.getPlaybackRate()};
|
|
66
|
+
_.t.setDrmCustomDataModifier=function(){};_.t.setCdnErrorCallback=function(){};_.t.detach=function(){};_.t.setPlaybackRate=function(a){this.a.setPlaybackRate(a)};_.t.getPosition=function(){return this.getMediaPosition()};_.t.getMediaPosition=function(){return 0<(this.configuration.startTime||0)&&!this.A?0:this.f.getState()===_.Nq?this.getDuration():this.a.getPosition()||0};_.t.seek=function(a){return typeof a===_.k&&0<=a?(this.isLive()||(a=Math.min(a,this.getDuration())),this.a.seek(a)):Promise.reject()};
|
|
67
|
+
_.t.getPresentationStartTime=function(){return null};_.t.getSeekRange=function(){return{start:0,end:0}};_.t.getVolume=function(){var a=this.a.getVolume();return typeof a===_.k?a/100:null};_.t.setVolume=function(a){this.a.setVolume(a)};_.t.getDuration=function(){return this.getMediaDuration()};_.t.getMediaDuration=function(){return this.a.getDuration()};_.t.getBufferInfo=function(){this.g.warn(_.va);return new _.Gm};_.t.getTrackManager=function(){return this.l};_.t.unload=function(){var a=this;return this.a.release().then(function(){a.l.release()})};
|
|
68
68
|
_.t.release=function(){var a=this;return _.I(function(b){switch(b.a){case 1:if(!a.h){b.F(2);break}return _.y(b,a.h.release(),2);case 2:if(!a.o){b.F(4);break}return _.y(b,a.o.destroy(),5);case 5:a.o=null;case 4:return _.y(b,a.a.release(),6);case 6:a.l.release(),a.f.release(),a.A=!1,_.B(b)}})};
|
|
69
|
-
_.t.load=function(a){var b=this,c,d,e,f,g;return _.I(function(h){switch(h.a){case 1:b.configuration=_.
|
|
70
|
-
_.E(h),b.onError(g),g;case 7:b.l.load(),_.B(h)}})};_.t.play=function(){var a=this;this.trigger(new _.L(_.
|
|
71
|
-
_.t.getDrmInfo=function(){return this.a.getDrmInfo()};_.t.isEnded=function(){return this.f.getState()===_.
|
|
72
|
-
_.t.getSourceIndex=function(){return this.a.getSourceIndex()};_.t.getLoadedSource=function(){return this.a.getLoadedSource()};_.t.canPlay=function(a,b){return(new
|
|
73
|
-
|
|
69
|
+
_.t.load=function(a){var b=this,c,d,e,f,g;return _.I(function(h){switch(h.a){case 1:b.configuration=_.Qm(b.B,a);c=_.xq(b.configuration,[_.Ge,"native"]);b.o=c.create(b);d=_.Yq(b.configuration)[0];e=!!b.configuration.tizen&&b.configuration.tizen.sideStreamText;if(!e){h.F(2);break}b.h=new iR;b.h.initialize(b);_.C(h,3);return _.y(h,b.h.load(d),5);case 5:b.h.start();_.Hh(h,2);break;case 3:f=_.E(h),b.g.error(f);case 2:return _.C(h,6),_.y(h,b.a.load(b.configuration),8);case 8:_.Hh(h,7);break;case 6:throw g=
|
|
70
|
+
_.E(h),b.onError(g),g;case 7:b.l.load(),_.B(h)}})};_.t.play=function(){var a=this;this.trigger(new _.L(_.vf));fS(this);return this.a.play().then(function(){hR(a.f)})};_.t.pause=function(){var a=this;return this.a.pause().then(function(){hR(a.f)})};_.t.getState=function(){return this.f.getState()};_.t.getPeriods=function(){return[]};_.t.onError=function(a){var b=new _.L(_.ze,{detail:a});a.severity===_.P&&(eR(this.f,_.Rq),this.a.release());this.trigger(b);b.defaultPrevented&&(b.a=!0)};
|
|
71
|
+
_.t.getDrmInfo=function(){return this.a.getDrmInfo()};_.t.isEnded=function(){return this.f.getState()===_.Nq};_.t.isPaused=function(){return this.a.getState()===gR};_.t.isMuted=function(){return RR(this.a)};_.t.setMuted=function(a){aS(this.a,a)};_.t.getNetworkEngine=function(){return this.C};_.t.setNetworkEngine=function(a){this.C=a};_.t.setCmsdManager=function(){};_.t.isLive=function(){return this.a.isLive()};_.t.getStats=function(){return null};_.t.setSourceIndex=function(a){this.a.setSourceIndex(a)};
|
|
72
|
+
_.t.getSourceIndex=function(){return this.a.getSourceIndex()};_.t.getLoadedSource=function(){return this.a.getLoadedSource()};_.t.canPlay=function(a,b){return(new gS).canPlay(a,b)};_.t.getTimelineCues=function(){return[]};_.t.getCueTimeline=function(){return null};_.t.getTextDisplayer=function(){return this.o};_.t.resetAbr=function(){};var uS="clpp.tizen",tS=0;gS.prototype.a=function(){return uS};
|
|
73
|
+
gS.prototype.canPlay=function(a){a=a.type;var b=!!window.webapis;if((a===_.Wc||a===_.tm||a===_.ad)&&b){if(_.Mk(2))return 2;if(_.Mk(3)||_.Mk(4)||_.Mk(5)||_.Mk(6))return _.Wh("Use of clpp.tizen.TizenComponent is not recommended for Tizen version \x3e\x3d 3."),1}return 0};gS.prototype.f=function(a){return a===_.qa};gS.prototype.create=function(){return new eS};_.x(hS,_.Fu);hS.prototype.f=function(){_.gi(new gS)};hS.prototype.a=function(){var a=uS;a&&_.di[a]&&(delete _.di[a],_.fi.info("Removed Player factory: '"+a+"'"))};hS.prototype.id=function(){return"tizen"};_.J("clpp.tizen.TizenComponent",hS);var WR="onbufferingstart",iS="onbufferingprogress",jS="onbufferingcomplete",kS="onstreamcompleted",MR="oncurrentplaytime",pS="onevent",qS="onsubtitlechange",rS="ondrmevent",sS="onerror",YR="preparingstart",$R="preparingend";};
|
|
74
74
|
if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
|
|
75
75
|
else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
|
|
76
76
|
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};_.x(
|
|
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 Ny='application/mp4; codecs\x3d"stpp.ttml"',Oy='application/mp4; codecs\x3d"stpp.ttml.im1i"',Py='application/mp4; codecs\x3d"stpp.ttml.im1t"',Qy="backgroundColor",Ry="direction",Sy="displayAlign",Ty="region",Uy="sans-serif",Vy="textAlign",Wy="textDecoration",Xy="writingMode",Yy=function(a,b,c){this.h=a;this.f=b;this.a=c},Zy=function(a,b,c){Yy.call(this,a,[],c);this.j=b||""},$y=function(a,b,c){Yy.call(this,a,b,c)},az=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
|
+
iz=function(a,b){var c=null;if(bz.test(a)){c=bz.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 cz.test(a)?c=dz(cz,a):ez.test(a)?c=dz(ez,a):fz.test(a)?(c=fz.exec(a),c=Number(c[1])/b.frameRate):gz.test(a)?(c=gz.exec(a),c=Number(c[1])/b.a):hz.test(a)&&(c=dz(hz,a));return c},dz=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)},jz=function(a){return a.split(":").pop()},kz=function(a){return a.replace(/(\d*\.?\d+)c/g,"$1em")},mz=function(a,b){for(;lz.test(a);){var c=lz.exec(a)[0];a=a.replace(c,parseInt(c,10)/b+"em")}return a},nz=function(a){return a?a.replace(/(\d*\.?\d+)%/g,function(b,c){return c/100+"em"}):""},oz=function(a,b,c,d,e,f,g){Yy.call(this,a,f,g);this.w=b;this.A=c;this.o=d;this.l=e;this.j=[]},pz=function(a,b,c){a=az(a,b,Vy);if(!a&&c&&(a=az(c,b,Vy),!a&&"rltb"===az(c,b,Xy)))return _.cg;switch(a){case _.wd:return _.aj;
|
|
5
|
+
case _.cg:case _.xe:return _.cg;default:return _.Ke}},qz=function(a,b,c){if(_.T.pf(a.w))return document.createTextNode(_.T.Wg(a.w||""));if(a.A)return _.sr("br");for(var d=_.sr("span"),e=_.w(a.f),f=e.next();!f.done;f=e.next())_.tr(d,f.value);a=_.w(a.j);for(e=a.next();!e.done;e=a.next())d.appendChild(qz(c.get(e.value),b,c));return d},rz=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]))},sz=function(a,b,c){Yy.call(this,a,b,c)},vz=function(a,b,c,d){var e=tz.exec(a);a=uz.exec(a);return typeof b===_.k&&0<b&&a?100*Number(a[c])/b:e?Number(e[c]):a?Number(a[c]):d},wz=function(a,b){return typeof b===_.k&&0<b?_.gj:uz.test(a)?0:_.gj},xz=function(a,b){Yy.call(this,"root-container",[],b);this.j=a},yz=function(a,b,c){return typeof a===_.k?a:typeof b===_.k?b:c},zz=function(a,b){var c=a.getAttribute("extent");return(c=uz.exec(c))?Number(c[b]):null},Bz=
|
|
7
|
+
function(a){a=a.getAttribute("cellResolution");return(a=Az.exec(a))?Number(a[2]):null},Cz=function(a,b,c){Yy.call(this,a,b,c)},Dz=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=[]},Fz=function(a){return Ez.some(function(b){return b in a.attributes})},Gz=function(a,b){if(0===b.length)return[];for(var c=[],d=_.w(b),e=d.next();!e.done;e=d.next())e=e.value,a.a.has(e)&&c.push.apply(c,_.th(Gz(a,a.a.get(e).f)).concat([e]));return c},Iz=
|
|
8
|
+
function(){return"inline-"+Hz++},Jz=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})},Kz=function(a){this.a=a.firstChild;this.f=new Set},Lz=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},Mz=function(a){return jz(a.h.nodeName)},Nz=function(){this.a=new Map},Pz=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
|
+
_.th(l.l).concat();-1===[_.da,"span","br"].indexOf(b.nodeName)&&(c=l.a,d=l.j,f=_.th(l.f).concat(),g={},Oz.forEach(function(n){n in l.attributes&&(g[n]=l.attributes[n])}))}if(b.nodeType===b.ELEMENT_NODE){b.hasAttribute(Ty)&&(c=b.getAttribute(Ty));b.hasAttribute(_.vg)&&f.push.apply(f,_.th(b.getAttribute(_.vg).split(" ")));d=Array.from(b.attributes).map(function(n){return n.name});d=_.w(d);for(h=d.next();!h.done;h=d.next()){h=h.value;var m=jz(h);g[m]=b.getAttribute(h)}d=g.backgroundImage}c=new Lz(b,
|
|
10
|
+
c,d,e,f,g);a.a.set(b,c);return c},Qz=function(a){this.a=a;this.f=new DOMParser},Rz=function(a){this.f=a},Sz=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")},Tz=function(){},Uz=function(a){this.a=new Qz(a);this.g=new _.K("clpp.ttml.Mp4TtmlParser")},Vz=function(){this.j=new Tz};Yy.prototype.getId=function(){return this.h};
|
|
11
|
+
Yy.prototype.hasAttribute=function(a){return a in this.a};Yy.prototype.getAttribute=function(a){return this.a[a]};_.x(Zy,Yy);_.x($y,Yy);var bz=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,cz=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,ez=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,fz=/^(\d*(?:\.\d*)?)f$/,gz=/^(\d*(?:\.\d*)?)t$/,hz=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,tz=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,uz=/^(\d+)px (\d+)px$/,Az=/^(\d+) (\d+)$/,lz=/(\d+)px/,Wz=/^(\d+px|\d+em|\d*\.?\d+c)$/,Ez=[Qy,"color",Ry,Sy,"fontFamily","fontSize","fontStyle","fontWeight",
|
|
12
|
+
"lineHeight","opacity","padding",Vy,Wy,"textOutline",Xy,"zIndex"],Oz=["begin",_.xe];_.x(oz,$y);
|
|
13
|
+
oz.prototype.build=function(a,b,c,d,e,f,g){var h=iz(this.a.begin,b);b=iz(this.a.end,b);if(null===h||null===b)return null;h+=c;b+=c;c=_.sr(_.fe);for(var l=_.w(this.j),m=l.next();!m.done;m=l.next())c.appendChild(qz(g.get(m.value),e,g));g=new _.fj(h,b,c.innerHTML.trim(),_.Jg);g.cssClassList=_.th(this.f).concat();g.textAlign=pz(this,e,null);g.writingMode=_.bj;g.line=-1;g.lineInterpretation=_.cj;g.lineAlign=_.dj;g.containerRows=yz(null,Bz(a),15);if(this.o&&(f=f.get(this.o))){g.region=f.build(a,e);g.textAlign=
|
|
14
|
+
pz(this,e,f);a:switch(az(f,e,Xy)){case "tb":case "tblr":a=_.Vg;break a;case "tbrl":a=_.Wg;break a;default:a=_.bj}g.writingMode=a;a:switch(az(f,e,Sy)){case _.wd:a=50;break a;case "after":a=-1;break a;default:a=0}g.line=a;a:switch(az(f,e,Sy)){case _.wd:a=1;break a;default:a=_.cj}g.lineInterpretation=a;a:switch(az(f,e,Sy)){case _.wd:e=_.wd;break a;default:e=_.dj}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};_.x(sz,$y);
|
|
16
|
+
sz.prototype.build=function(a,b){var c=new _.ij;c.id=this.getId();var d=yz(a.j.containerWidth,zz(a,1),720),e=yz(a.j.containerHeight,zz(a,2),480);a:switch(az(this,b,Sy)){case "after":var f="flex-start";break a;case _.wd:f=_.wd;break a;default:f="flex-end"}c.displayAlign=f;a:switch(az(this,b,Xy)){case "tb":case "tblr":f="row-reverse";break a;case "tbrl":f="row";break a;default:f=_.Pd}c.writingMode=f;f=this.getAttribute("extent")||az(this,b,"extent");c.width=vz(f,d,1,100);c.widthUnits=wz(f,d);c.height=
|
|
17
|
+
vz(f,e,2,100);c.heightUnits=wz(f,e);f=this.getAttribute("origin")||az(this,b,"origin");c.viewportAnchorX=vz(f,d,1,0);c.viewportAnchorY=vz(f,e,2,0);c.viewportAnchorUnits=wz(f,d);c.cssClassList=_.th(this.f).concat();return c};_.x(xz,Yy);_.x(Cz,Yy);
|
|
18
|
+
Cz.prototype.build=function(a){var b=null;var c=Bz(a);c&&(b=yz(a.j.containerHeight,zz(a,2),480)/c);b=yz(a.j.fontSizeRadix,b,16);a=[];c="::ttml ."+this.h+", ::ttml ."+this.h+" * {";for(var d=_.w(Xz.entries()),e=d.next();!e.done;e=d.next()){var f=_.w(e.value);e=f.next().value;f=f.next().value;e in this.a&&(c+=f+":"+kz(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&&!Wz.test(g)&&Wz.test(h)&&Wz.test(l)?(e=g,f=h):2===d.length&&!Wz.test(g)&&Wz.test(h)?(e=g,f=h):2===d.length&&Wz.test(g)&&Wz.test(h)&&(f=g);if(""!==f){f=kz(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=nz(this.a.textShadow),d=kz(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",Uy).replace("proportionalSerif",Uy).replace("sansSerif",Uy).replace("default",Uy)+";":"");a:{if(Wy in this.a){d=[];e=_.w(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:"+kz(this.a.padding)+";":"";c=c+d+e;"lineHeight"in this.a?(d="",e=this.a.lineHeight,e=kz(e),e=mz(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=kz(d);d=mz(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 Xz=new Map([[Qy,"background-color"],["color","color"],[Ry,Ry],["fontStyle","font-style"],["fontWeight","font-weight"],["opacity","opacity"],["zIndex","z-index"]]);var Hz=0;Kz.prototype.le=function(){return!!this.a};Kz.prototype.next=function(){if(!this.a)return null;var a=this.a;do this.f.add(a),a.nodeType!==Node.TEXT_NODE&&!Yz.has(jz(a.nodeName))||Zz.has(jz(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&&!Yz.has(jz(a.nodeName))));var b=this.a;this.a=a;return b};
|
|
23
|
+
var Yz=new Set(["tt","head","layout",_.Ze,_.He,Ty,"styling",_.vg,"body",_.fe,"p","span","br"]),Zz=new Set([_.vg,_.He]);Lz.prototype.getId=function(){return this.attributes.id};Qz.prototype.parseInit=function(){};
|
|
24
|
+
Qz.prototype.parseMedia=function(a,b,c){c&&c.length||(c=[a.byteLength]);var d=_.N.nb(this.a.ttml||{}),e=_.Xj(a,0,c[0]);e=_.T.da(e);if(""===e)return{cues:[],styles:[]};var f=null;try{f=this.f.parseFromString(e,_.Ag)}catch(n){throw new _.O(_.P,2,2005,"Failed to parse TTML.");}d=new Dz(d);e=new Nz;f=new Kz(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=_.Xj(a,b,h);l=_.hk(l);var m="urn:mpeg:14496-30:subs:"+g;d.h.set(m,new Zy(m,l,{imageType:"PNG",encoding:"Base64"}));
|
|
25
|
+
b+=h}for(;f.le();)a=f.next(),a=Pz(e,a),"tt"===Mz(a)&&(d.l=new xz(d.B,Object.assign({},a.attributes))),"tt"===Mz(a)&&(d.w=new rz(a.attributes.frameRate,a.attributes.subFrameRate,a.attributes.frameRateMultiplier,a.attributes.tickRate)),Mz(a)!==_.He||a.attributes.begin||a.attributes.end||(c="#"+a.getId(),d.h.set(c,new Zy(c,a.h.textContent,a.attributes))),Mz(a)===_.He&&a.attributes.begin&&a.attributes.end?(c="#"+Iz(),b=new Zy(c,a.h.textContent,a.attributes),d.h.set(c,b),c=b):c=null,c&&(a.j=c.getId()),
|
|
26
|
+
Mz(a)===_.vg&&(c=a.getId()||Iz(),b=new Cz(c,a.f,Object.assign({},a.attributes)),d.a.set(c,b),a.a&&d.j.get(a.a).f.push(c)),Mz(a)!==_.vg&&Fz(a)?(c=Iz(),b=new Cz(c,[],Object.assign({},a.attributes)),d.a.set(c,b),c=b):c=null,c&&a.f.push(c.getId()),Mz(a)!==_.fe||!a.attributes.extent&&!a.attributes.origin?c=null:(c=Iz(),b=new sz(c,Gz(d,a.f),Object.assign({},a.attributes)),d.j.set(c,b),c=b),c&&(a.a=c.getId()),Mz(a)!==Ty?c=null:(c=a.getId(),b=new sz(c,Gz(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(Mz(a))||0===c.length?c=null:(g=c[c.length-1],d.f.has(g)?(c=Iz(),b=new oz(c,a.h.nodeName===_.da?a.h.textContent:null,"br"===Mz(a),a.a,a.j,Gz(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"===Mz(a)||a.j?(c=Iz(),b=new oz(c,null,!1,a.a,a.j,Gz(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=Jz(d);f=[];a=_.w(d.a.values());for(c=a.next();!c.done;c=a.next())f.push.apply(f,
|
|
28
|
+
_.th(c.value.build(d.l)));return{cues:e,styles:f}};Rz.prototype.a=function(a){a=(new Qz(this.f)).parseMedia(a,{periodStart:0,segmentStart:null,segmentEnd:0}).cues;var b="WEBVTT\n\n";a=_.w(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Sz(c.startTime)+" --\x3e "+Sz(c.endTime),e=[];switch(c.textAlign){case _.Ke:e.push("align:left");break;case _.cg:e.push("align:right");break;case _.aj:e.push("align:middle");break;case _.Ke:e.push("align:start");break;case _.cg:e.push("align:end")}switch(c.writingMode){case _.Vg:e.push("vertical:lr");break;
|
|
29
|
+
case _.Wg:e.push("vertical:rl")}b+=d+(e.length?" "+e.join(" "):"")+"\n";b+=c.payload+"\n\n"}return _.T.ib(b)};Tz.prototype.probe=function(a,b){return a===_.$c&&b===_.zg};Tz.prototype.create=function(a){return new Rz(a)};Uz.prototype.parseInit=function(a){var b=!1;(new _.Cn).N(_.bf,_.Dn).N(_.Ig,_.Dn).N(_.Xe,_.Dn).N(_.af,_.Dn).N(_.sg,_.Dn).aa(_.ug,_.En).N("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new _.O(_.P,2,2007);};
|
|
30
|
+
Uz.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[],f=[],g=[];(new _.Cn).N("moof",_.Dn).N("traf",_.Dn).aa("subs",function(h){for(var l=_.xn(h.reader),m=0;m<l;++m){h.reader.skip(4);for(var n=_.wn(h.reader),p=0;p<n;++p){var q=1===h.version?_.xn(h.reader):_.wn(h.reader);g.push(q);h.reader.skip(6)}}}).N(_.We,_.Fn(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}};_.x(Vz,_.Fu);Vz.prototype.f=function(){_.Dv(_.$c,Qz);_.Dv(_.Yc,Uz);_.Dv(Ny,Uz);_.Dv(Py,Uz);_.Dv(Oy,Uz);_.yl.push(this.j)};Vz.prototype.a=function(){_.Fv(_.$c);_.Fv(_.Yc);_.Fv(Ny);_.Fv(Py);_.Fv(Oy);_.Al(this.j)};Vz.prototype.id=function(){return"subtitles-ttml"};_.J("clpp.ttml.TtmlComponent",Vz);};
|
|
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.C=d;this.B=b;this.w=
|
|
4
|
-
_.T.empty(this.l)?this.g.warn(_.
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
var f=function(window){var By="VerimatrixVCAS",Cy="clpp.verimatrix.Vcas",Dy="clpp.verimatrix.VcasComponent",Jy=function(a){_.on.call(this,By);var b={};b[Ey]=Ey;b[Fy]=Fy;var c=a.authenticator,d=void 0===a.licenseRequestVuidLocation?Gy: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?Hy:a.fairPlayAssetIdStrategy;this.A=a.deviceId;this.a=c;
|
|
3
|
+
this.C=d;this.B=b;this.w=Iy(this,e);this.o=Iy(this,f);this.l=Iy(this,g);this.j=h;this.H=l;this.G=m;this.g=new _.K(Cy);_.T.empty(this.w)?this.g.warn(_.mc):this.gb(_.Xd,{licenseUrl:this.w,videoRobustness:[_.Ub,void 0],audioRobustness:[_.Tb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.h.bind(this)}});_.T.empty(this.o)?this.g.warn(_.Jb):this.gb(_.Vd,{licenseUrl:this.o,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.h.bind(this)}});
|
|
4
|
+
_.T.empty(this.l)?this.g.warn(_.eb):_.T.empty(this.j)?this.g.warn(_.db):this.gb(_.Sd,{licenseUrl:this.l,certificateUrl:this.j,modifiers:{licenseRequest:this.K.bind(this),licenseResponse:this.L.bind(this),extractContentId:this.I.bind(this)}})},Iy=function(a,b){if(a.C===Gy){var c=Object.assign({},{deviceId:_.ik(_.T.Dd(a.A))},a.a&&{authenticator:_.ik(_.T.Dd(a.a))});return b+_.jl(c)}return b},Ky=function(){this.g=new _.K(Dy)};_.x(Jy,_.on);
|
|
5
|
+
Jy.prototype.h=function(a,b){if(this.C===Ly){var c=this.B[Fy],d={};d[this.B[Ey]]=this.A;this.a&&(d[c]=this.a);Object.keys(d).forEach(function(e){b.headers[e]=d[e]})}};Jy.prototype.I=function(a,b){var c=_.Mn(b);switch(this.G){case My:c=_.jl({r:c,Bp:this.H},!0)}return c};Jy.prototype.K=function(a,b){this.h(a,b);_.Pn(b)};Jy.prototype.L=function(a,b){_.Qn(b)};_.J(Cy,Jy);Jy.prototype.constructor=Jy.prototype.constructor;Jy.NAME=By;var Gy="query-string",Ly="http-header";
|
|
6
|
+
Jy.LicenseRequestVuidLocation={QUERY_STRING:Gy,HTTP_HEADER:Ly};var Ey="DeviceId",Fy="Authenticator";Jy.LicenseRequestHttpHeader={DEVICE_ID_HEADER:Ey,AUTHENTICATOR_HEADER:Fy};var Hy="keyid",My="contentid-siteid";Jy.FairPlayAssetIdStrategy={KEYID:Hy,CONTENTID_SITEID:My};_.x(Ky,_.Fu);Ky.prototype.a=function(){delete _.hn.VerimatrixVCAS};Ky.prototype.h=function(a){a=a.getConfiguration();if(a.drm&&a.drm.env===By){a=a.drm.customData;if(!a)throw new _.O(_.P,7,7100,_.Yd);a=new Jy(a);this.g.info("Registering the Verimatrix VCAS Ultra environment");_.jn(a)}};Ky.prototype.id=function(){return"verimatrix-vcas"};_.J(Dy,Ky);};
|
|
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 _.L(_.
|
|
4
|
-
|
|
5
|
-
_.t.
|
|
6
|
-
_.t.
|
|
7
|
-
b.B=e;return _.y(h,b.
|
|
8
|
-
_.t.
|
|
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=_.
|
|
11
|
-
_.t.onContentWillLoad=function(a){var b=a.getConfiguration();(this.a=!_.N.R(b.vimond)&&typeof b.vimond===_.
|
|
12
|
-
c=b.failIfUnreachable;typeof c!==_.
|
|
13
|
-
_.t.
|
|
2
|
+
var f=function(window){var ry="Registering listeners",sy="clpp.vimond.VimondPlugin",ty=function(a,b,c,d,e){this.G=a;this.H=b;this.I=c;this.m=d;this.C=e;this.a=new _.vi;this.l=!0;this.f=this.j=this.A=!1;this.B=null;this.h=new _.li(this.bi.bind(this));this.g=new _.K("clpp.vimond.VimondDispatcher");this.o=this.w=0;this.m&&this.a&&(this.g.debug(ry),this.a.on(this.m,_.qg,this.yl.bind(this)),this.a.on(this.m,_.Gg,this.zl.bind(this)),this.a.on(this.m,_.wc,this.wl.bind(this)),this.a.on(this.m,_.xc,this.xl.bind(this)))},uy=function(a,
|
|
3
|
+
b){a.m.trigger(new _.L(_.ah,{detail:b}))},vy=function(a,b,c){b&&(a.A=!0,a.h.stop());a.m.onError(new _.O(b?_.P:1,9,9201,c))},wy=function(a,b,c,d,e){this.l=a;this.o=c;this.h=b;this.a=d;this.j=e;this.g=new _.K("clpp.vimond.VimondService");this.f=0},xy=function(a){this.m=a;this.a=new _.vi;this.g=new _.K("clpp.vimond.VimondAdapter");this.f=this.h=!1;this.m&&this.a&&(this.g.debug(ry),this.a.on(this.m,_.Zf,this.o.bind(this)),this.a.on(this.m,_.wc,this.j.bind(this)),this.a.on(this.m,_.xc,this.l.bind(this)))},
|
|
4
|
+
yy=function(a,b){var c=a.m.getState();if(1===b)return["str-start",_.Kf];if(a.h)return[_.xe,_.rf];if(c===_.Nq)return[_.xe,null];if(c===_.Rq)return[_.ze,_.rf];var d=_.rf;if(c===_.Lq||c===_.Uq||a.f)d=_.Kf;return["period",d]},zy=function(){this.a=!1;this.g=new _.K(sy);this.j=this.h=this.f=null},Ay=function(){};_.t=ty.prototype;_.t.zl=function(){this.f||(this.f=1<Math.abs(this.w-this.m.getPosition()));this.w=this.m.getPosition()};_.t.wl=function(){this.g.debug("Ad break started");this.j=!0};
|
|
5
|
+
_.t.xl=function(){this.g.debug("Ad break stopped");this.j=!1};
|
|
6
|
+
_.t.yl=function(a){var b=this,c,d,e,f,g;return _.I(function(h){if(1==h.a){c=a.detail;d=_.Pq;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.f)return b.g.debug("Ignore transition"),h["return"]();if(b.l&&e!==d.PLAYING)return h["return"]();if(b.f&&[d.PAUSED,d.BUFFERING].includes(e))return b.g.debug("Seeking"),h["return"]();b.f&&e===d.PLAYING&&(b.g.debug("Seeked"),b.f=!1);g=[d.PLAYING,d.PAUSED,d.ERROR,d.ENDED];if(!g.includes(e))return h.F(0);
|
|
7
|
+
b.B=e;return _.y(h,b.bi(),3)}e===d.ENDED&&b.h.stop();_.B(h)})};
|
|
8
|
+
_.t.bi=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.h.stop();a.h.fa(a.l?10:a.G);a.l=!1;_.C(h,2);return _.y(h,a.C.fireEvent(),4)}if(2!=h.a)return b=h.f,uy(a,b),_.Hh(h,0);d=c=_.E(h);e=d.code;f=d.data;g=[1002,1003];g.includes(e)?(a.g.debug("Unreachable service"),uy(a,f),vy(a,a.H,f)):1001===e?(a.g.debug("Generic service error"),uy(a,f),vy(a,a.I,f)):a.g.error(c.toString());_.B(h)})};wy.prototype.fireEvent=function(){this.f++;var a=_.N.ua(this.o);a.client.buildName=_.wa;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 _.hl(c.url)).scheme||"").replace(":","");b.videoProtocol=c;b=yy(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!==_.md&&(b.liveResumePossible=!0)}a.progress.eventNumber=this.f;a.timestamp=(new Date).toISOString();this.g.debug("Fire an event");b=_.wk(this.l);
|
|
10
|
+
b.method=_.Ib;b.contentType="application/json";b.headers.Authorization="Bearer "+this.h;b.body=_.T.Dd(JSON.stringify(a));return this.j.fetch(b).T};wy.prototype.eh=function(a){this.h=a};xy.prototype.getPosition=function(){return Math.floor(this.m.getPosition())};xy.prototype.o=function(){this.h=!0};xy.prototype.j=function(){this.f=!0};xy.prototype.l=function(){this.f=!1};_.x(zy,_.ew);_.t=zy.prototype;_.t.onPlayerCreated=function(){};
|
|
11
|
+
_.t.onContentWillLoad=function(a){var b=a.getConfiguration();(this.a=!_.N.R(b.vimond)&&typeof b.vimond===_.ff)?a.namespace()===_.Fd&&(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=_.w(["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 _.O(1,9,9200));return}this.g.debug(_.xa);
|
|
12
|
+
c=b.failIfUnreachable;typeof c!==_.md&&(c=!0);d=b.failOnError;typeof d!==_.md&&(d=!0);this.f=new xy(a);this.h=new wy(b.playerEventRequest.uri,b.authToken,b.playerEventRequest.body,this.f,a.getNetworkEngine());this.j=new ty(b.playerEventRequest.eventInterval,c,d,a,this.h)}};_.t.onPlayerWillRelease=function(){if(this.a){if(this.f){var a=this.f;a.g.debug(_.ec);_.yi(a.a)}this.j&&(a=this.j,a.g.debug(_.ec),_.yi(a.a),a.h.stop());this.j=this.h=this.f=null}};_.t.onPlayerWillDestroy=function(){};_.t.id=function(){return"vimond"};
|
|
13
|
+
_.t.eh=function(a){this.a&&this.h&&this.h.eh(a)};_.J(sy,zy);zy.prototype.updateAuthToken=zy.prototype.eh;zy.Id="vimond";Ay.prototype.create=function(){return new zy};_.bu(new Ay);};
|
|
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));}
|