1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
(function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
  typeof define === 'function' && define.amd ? define(factory) :
  (factory());}(this, function () {'use strict';var f="127.0.0.1",h=18529;f=null==window.RpcHost?f:window.RpcHost;h=null==window.RpcPort?h:window.RpcPort;var k=!1;l("toggleLog",function(){k=!k});function m(){if(k){for(var a=[],b=0;b<arguments.length;b++)a.push(n(arguments[b]));console.log(a.join(" "))}}l("log",m);function n(a){if(window.JSON)return JSON.stringify(a);if("string"===typeof a||a instanceof Function)return'"'+a+'"';if(!(a instanceof Object))return a+"";if(Object.keys){var b="{";Object.keys(a).forEach(function(c){b+='"'+c+'":'+n(a[c])+","});","==b[b.length-1]&&(b=b.substr(0,b.length-1));return b+"}"}return a.toString()}
function p(){var a=window.location.protocol;0!=a.indexOf("http")&&(alert("This site may not work properly unless served from a web server!"),console.error("Unsupported protocol:",a,"\nThis site may not work properly unless served from a web server!"));return"https:"!=a?"ws":"wss"}l("getWSProto",p);
function aa(){var a=navigator.userAgent,b=a.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];if(/trident/i.test(b[1])){var c=/\brv[ :]+(\d+)/g.exec(a)||[];return["IE",c[1]]}if("Chrome"===b[1]&&(c=a.match(/\b(OPR|Edge)\/(\d+)/)))return c.slice(1);b=b[2]?[b[1],b[2]]:[navigator.appName,navigator.appVersion,"-?"];(c=a.match(/version\/(\d+)/i))&&b.splice(1,1,c[1]);"MSIE"==b[0].toUpperCase()&&(b[0]="IE");"IE"==b[0]&&(c=a.match(/trident\/(\d+)/i))&&(b[2]=Number(c[1])+4);return b}
var r=!1;function t(){var a=aa();r="IE"==a[0]&&10==a[1];return{IE:3,Chrome:3,Edge:3,Firefox:3}[a[0]]}var ba=this?this:window;function l(a,b){a=a.split(".");var c=ba||window;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};var ca=window.EVT_NO_SVC=100,da=window.EVT_SVC_UP=101,ea=window.EVT_SVC_DOWN=102,fa=window.EVT_WS_EXCEPTION=103,ha=window.EVT_FORCE_OFFLINE=104;function u(a,b){var c=window.onRpcEvent;c&&c(a,b)}function v(a,b,c){this.code=a;this.message=b;this.data=c}l("RpcErr",v);v.prototype.toString=function(){return JSON.stringify({code:this.code,message:this.message,data:this.data})};function w(a,b,c,d){a?(++y||++y,a=y):a=0;this.id=a;this.method=b;this.R=c;this.rev=null==d?0:d}
w.prototype.toString=function(){return JSON.stringify({jsonrpc:"2.0",id:this.id,method:this.method,params:this.R,rev:this.rev})};var y=0;function z(a,b,c){this.id=a;this.result=b;this.error=c}z.prototype.l=function(){return!!this.error&&0!=this.error.code};z.prototype.iserr=z.prototype.l;z.prototype.toString=function(){var a={jsonrpc:"2.0",id:this.id};this.l()?a.error=this.error:a.result=this.result;return JSON.stringify(a)};
function A(a,b){var c=this;this.id=0;this.b={};this.s={};this.m=a;this.c=[];this.h=null;this.j=0;c.connect(b);c.ha=window.setInterval(function(){c.a.readyState!=WebSocket.OPEN&&c.a.readyState!=WebSocket.CONNECTING&&c.connect()},1E3);c.fa=window.setInterval(function(){var a=Date.now()/1E3,b=[];Object.keys(c.b).forEach(function(d){var g=c.b[d];if(30<a-g.time){var e=new z(d);e.error=new v(-32001,"ERR_PEER_TIMEOUT");g.M(e);b.push(d);m("[WARN] Remove timeout call: "+d+" : "+g.method)}});b.forEach(function(a){delete c.b[a]})},
1E4)}function B(a){var b=C;b.h=a;b.a.readyState==WebSocket.OPEN&&a&&setTimeout(function(){a(!0)})}
A.prototype.connect=function(a){var b=this,c=this.a;a&&b.c.push(a);if(null==c||c.readyState!=WebSocket.CONNECTING){if(null==c||b.a.readyState!=WebSocket.OPEN){m("Connecting to "+b.m);try{c="undefined"!=typeof MozWebSocket?new MozWebSocket(b.m):new WebSocket(b.m)}catch(d){console.log("WebSocket connection error: ",d.name+": "+d.message),u(fa)}b.a=c}c&&(c.onopen=function(){u(da);0<b.j&&10>b.j&&m("reload is needed");b.j=10;b.u=!1;b.w=!1;m("ws: onopen: number of cbs: "+b.c.length);for(var a in b.c)b.c[Number(a)]();
b.c=[];null!=b.h&&b.h(!0)},c.onmessage=function(a){m("ws: onmessage: "+a.data);a:{a=a.data;var c={};try{c=JSON.parse(a)}catch(R){m("handleMsg: Failed to parse message: "+R+": "+a);break a}if(void 0!=c.method){if("2.0"==c.jsonrpc&&void 0!=c.method){var d=new w(!1,c.method,c.params,c.rev);d.id=c.id;var q=d}else q=null;null==q?m("handleMsg: Invalid req: "+a):(c=new z(q.id),null==(d=b.s[q.method])?(c.error=new v(-32601,"ERR_METHOD_NOT_FOUND"),m("handleMsg: Method not found: "+a)):null==d.S||d.S(q.rev)?
(a=JSON.parse(q.R),d.Y(q,a,c)):(c.error=new v(-32E3,"ERR_INVALID_METHOD_REV"),m("handleMsg: Invalid method revision: "+a)),null!=q.id&&0!=q.id&&b.send(c.toString()))}else c="2.0"!=c.jsonrpc||void 0==c.result&&void 0==c.error?null:new z(c.id,c.result,c.error),null==c?m("handleMsg: Bad response: "+a):(c.l()&&m("handleMsg: Server responds with an error: ",a),d=b.b[c.id],null==d?m("handleMsg: Call is not found: "+a):(delete b.b[c.id],d.M(c)))}},c.onclose=function(){b.u||(m("ws: onclose"),null!=b.h&&b.h(!1),
b.w||(u(ea),--b.j,m("Service stopped")))},c.onerror=function(a){m("ws: onerror: "+JSON.stringify(a));b.u=!0;u(ca);--b.j;m("Service is not available")})}};A.prototype.close=function(){window.clearInterval(this.ha);window.clearInterval(this.fa);this.na&&window.clearInterval(this.na);this.w=!0;this.a&&(this.a.close(),this.a=null)};A.prototype.send=function(a){var b=this;if(b.a.readyState==WebSocket.OPEN)try{b.a.send(a)}catch(c){m("Failed to send: "+a)}else this.connect(function(){b.a.send(a)})};
A.prototype.call=function(a,b,c,d){a=new w(!!d,a,b,c);b=a.toString();this.send(b);m("call: "+b);d&&(this.b[a.id]={M:d,method:a.method,time:Date.now()/1E3})};function ia(a){return function(b){return b==a}}function D(a,b,c){c=null==c?0:c;C.s[a]={name:a,Y:b,rev:c,S:ia(c)}}l("regEvent",D);var C=new A(p()+"://"+f+":"+h+"/rpc");function E(a,b,c,d){"object"==typeof b&&(b=JSON.stringify(b));C.call(a,b,d,c)}l("call",E);l("regRpcConnListener",function(a){B(a)});D("heartbeat",function(a,b,c){c.result="OK";m("recv heartbeat")});
D("jsonrpc::offline",function(a,b){C.close();console.log("You're offline. ",JSON.stringify(b));u(ha,b);C.P&&C.P(b)});l("regRpcForceOfflineListener",function(a){C.P=a});function F(a){var b;var c="";var d=a.length;for(b=0;b<d;b++){var g=a.charCodeAt(b);1<=g&&127>=g?c+=a.charAt(b):(2047<g?(c+=String.fromCharCode(224|g>>12&15),c+=String.fromCharCode(128|g>>6&63)):c+=String.fromCharCode(192|g>>6&31),c+=String.fromCharCode(128|g>>0&63))}return c}
function G(a){var b;var c="";var d=a.length;for(b=0;b<d;){var g=a.charCodeAt(b++);switch(g>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c+=a.charAt(b-1);break;case 12:case 13:var e=a.charCodeAt(b++);c+=String.fromCharCode((g&31)<<6|e&63);break;case 14:e=a.charCodeAt(b++);var q=a.charCodeAt(b++);c+=String.fromCharCode((g&15)<<12|(e&63)<<6|(q&63)<<0)}}return c}
var H=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];
function I(a){var b;var c=a.length;var d=0;for(b="";d<c;){var g=a.charCodeAt(d++)&255;if(d==c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&3)<<4);b+="==";break}var e=a.charCodeAt(d++);if(d==c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&3)<<4|(e&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
15)<<2);b+="=";break}var q=a.charCodeAt(d++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&3)<<4|(e&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2|(q&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(q&63)}return b}
function J(a){var b;var c=a.length;var d=0;for(b="";d<c;){do var g=H[a.charCodeAt(d++)&255];while(d<c&&-1==g);if(-1==g)break;do var e=H[a.charCodeAt(d++)&255];while(d<c&&-1==e);if(-1==e)break;b+=String.fromCharCode(g<<2|(e&48)>>4);do{g=a.charCodeAt(d++)&255;if(61==g)return b;g=H[g]}while(d<c&&-1==g);if(-1==g)break;b+=String.fromCharCode((e&15)<<4|(g&60)>>2);do{e=a.charCodeAt(d++)&255;if(61==e)return b;e=H[e]}while(d<c&&-1==e);if(-1==e)break;b+=String.fromCharCode((g&3)<<6|e)}return b};window.doLogin=ja;window.doLoginOut=ka;window.doCreateChatroom=la;window.doAddChatroomMember=ma;window.doUpdateChatroom=na;window.doDeleteChatroomMember=oa;window.doLoad=pa;window.doPresenceSubscribe=qa;window.doPresenceUnsubscribe=ra;window.doChannelEnter=sa;window.doChannelEnterMonitor=ta;window.doChannelExit=ua;window.doTalkRequest=va;window.doTalkRequestWithUserlist=wa;window.doTalkRelease=xa;window.doSessionTempMatch=ya;window.doSessionTempCall=za;window.doSessionCallInvite=Aa;
window.doAcceptCall=Ba;window.doRejectCall=Ca;window.doLeaveCall=Da;window.doIncomingBusy=Ea;window.doRecordPlayStart=Fa;window.doRecordPlayStop=Ga;window.doSessionMessageSend=Ha;window.doSessionPicMessageSend=Ia;window.doDeleteChatroom=Ja;window.doUpdateGroupMemberPriority=Ka;window.doStartRecord=La;window.doStopRecord=Ma;window.mouseDownStartRecord=Na;window.mouseUpStopRecord=Oa;window.onButtonRecord=Pa;window.isServiceLock=Qa;window.doSecretImageDownload=Ra;window.doSecretImageDownloadAsync=Sa;
window.doServiceResourceReportCaptureLocal=Ta;window.doServiceResourceReportCaptureLocalBuffer=Ua;window.doGetVersion=Va;window.doRestartSvc=Wa;window.doSetCrashReportUrl=Xa;window.doSetLogLvl=Ya;window.doVersionCheck=Za;function Va(a){E("getVersion",null,function(b){b.l()&&m("getVersion: failed:",b.error);b=b.result;a&&a(b)})}function Wa(){E("restartSvc")}function Xa(a){E("setCrashReportUrl",{url:a})}function Ya(a){E("setLogLvl",{lvl:a})}
function Za(a){E("serviceCheckVersion",{oldVersion:"12.3.2.0"},function(b){var c=1;b.l()&&(m("checkVersion: failed:",b.error),c=-1);c=0==b.result?0:c;a&&a(c)})}function ja(a,b,c){E("serviceLogin",{userid:I(F(b)),password:I(F(c)),serverIp:I(F(a)),serviceKey:I(F("CTChat"))})}function ka(){E("serviceLogout")}function la(a){E("serviceChatroomCreate",{roomInfo:I(F(a))})}function ma(a){E("serviceChatroomAddMember",{roomInfo:I(F(a))})}function na(a){E("serviceChatroomUpdate",{roomInfo:I(F(a))})}
function oa(a){E("serviceChatroomDeleteMember",{roomInfo:I(F(a))})}function pa(){E("serviceGroupListGet")}function qa(a,b){E("serviceSessionPresenceSubscribe",{isCustom:a,json:I(F(b))})}function ra(){E("serviceSessionUnsubscribe")}function sa(a,b){E("serviceSessionEnterChat",{roomid:I(F(a))},function(a){a.l()&&(m("serviceSessionEnterChat: Failed:",a.error),a.result=-1);b&&b(a.result)})}
function ta(a,b){E("serviceSessionEnterChatMonitor",{roomid:I(F(a))},function(a){a.l()&&(m("serviceSessionEnterChatMonitor: Failed:",a.error),a.result=-1);b&&b(a.result)})}function ua(a){E("serviceSessionExitChat",{roomid:I(F(a))})}function va(a){E("serviceMediaTalkRequest",{sessionIndex:a})}function wa(a,b){var c=I(F("null"));null!=b&&(c=I(F(b)));E("serviceMediaTalkRequestWithUserlist",{sessionIndex:a,userList:c})}function xa(a){E("serviceMediaTalkRelease",{sessionIndex:a})}
function ya(a,b){try{var c=I(F("null")),d=I(F("null"));null!=b&&(c=I(F(b+"")));null!=a&&(d=I(F(a)));E("serviceSessionMatch",{userids:d,sid:c})}catch(g){}}
function za(a,b,c,d){try{var g=I(F("null")),e=I(F("null"));null!=b&&(g=I(F(b+"")));null!=a&&(e=I(F(a)));1==c?E("serviceSessionCallVideo",{userids:e,sid:g},function(a){a.l()&&(m("serviceSessionCallVideo: Failed:",a.error),a.result=-1);d&&d(a.result)}):E("serviceSessionCall",{userids:e,sid:g},function(a){a.l()&&(m("serviceSessionCall: Failed:",a.error),a.result=-1);d&&d(a.result)})}catch(q){}}function Aa(a,b){try{E("serviceSessionCallJoin",{sessionIndex:a,userids:I(F(b))})}catch(c){}}
function Ba(a){E("serviceSessionAcceptCall",{sessionIndex:a})}function Ca(a){console.log(typeof a);E("serviceSessionRejectCall",{sessionIndex:a})}function Da(a){console.log(typeof a);E("serviceSessionLeaveCall",{sessionIndex:a})}function Ea(a){E("serviceSessionBusy",{sessionid:a})}function Fa(a,b,c,d){a=I(F(a+""));b=I(F(b+""));d=I(F(d+""));E("serviceRecordPlayStop");E("serviceRecordPlayStart",{code:a,resid:b,secret:c,secret_key:d})}function Ga(){E("serviceRecordPlayStop")}
function Ha(a,b,c,d,g,e,q){try{d=d.replace(/</g,"&lt;"),d=d.replace(/>/g,"&gt;")}catch(R){}E("serviceMessageSend",{messagetype:a,sid:I(F(b+"")),ipocids:I(F(c+"")),contenttext:I(F(d+"")),contentres:I(F(g+"")),contentres1:I(F(q+"")),allowOfflineSend:e})}function Ia(a,b,c,d,g){try{d=d.replace(/</g,"&lt;"),d=d.replace(/>/g,"&gt;")}catch(e){}E("servicePicMessageSend",{messagetype:a,sid:I(F(b+"")),ipocids:I(F(c+"")),picpath:I(F(d+"")),allowOfflineSend:g})}
function Ua(a,b,c,d,g,e,q){E("serviceResourceReportCaptureLocalBuffer",{ownerId:I(F(a+"")),resType:b,resTypeExt:I(F(c+"")),picData:d,content:I(F(g+"")),picMark:I(F(e+"")),taskId:I(F(q+""))})}function Ta(a,b,c,d,g,e,q){E("serviceResourceReportCaptureLocal",{ownerId:I(F(a+"")),resType:b,resTypeExt:I(F(c+"")),picPath:I(F(d+"")),content:I(F(g+"")),picMark:I(F(e+"")),taskId:I(F(q+""))})}function Ja(a){E("serviceChatroomDelete",{roomId:I(F(a))})}
function Ka(a,b,c,d){E("serviceChatroomModifyMember",{ipocid:I(F(b+"")),roomid:I(F(a)),memberType:c,memberTalkDuration:d})}function La(){E("serviceRecordStart")}function Ma(a){E("serviceRecordStop",{isCancel:a})}function Na(){mouseDownOrUpRecord(3);E("serviceRecordStart")}function Oa(){mouseDownOrUpRecord(3);E("serviceRecordStop",{isCancel:0})}
function Pa(a){var b=$("#inputDownloadURL").val();b==""+str_select_store_path+""?Toast(""+str_select_save_path+"",2):E("serviceRecDataLoad",{resid:I(F(a+"")),path:I(F(b+"\\")),isEncrypt:0})}function Qa(a,b){E("serviceSessionLock",{sessionid:a,isLock:b})}function Ra(a,b,c,d,g){E("serviceSecretImageDownloadSync",{code:I(F(a)),url:I(F(b)),secret:c,secret_key:I(F(d))},function(a){a.l()&&m("serviceSecretImageDownloadSync: Failed:",a.error);g&&g(G(J(a.result)))})}
function Sa(a,b,c,d){a=I(F(a));b=I(F(b));d=I(F(d));try{E("serviceSecretImageDownload",{code:a,url:b,secret:c,secret_key:d})}catch(g){}}D("eventLogin",function(a,b){onLogin(b.result,b.secret)});D("eventLogout",function(a,b){onLogout(b.ok)});D("eventChannelSessionAlertClose",function(a,b){eventChannelSessionAlertClose(b.result)});D("eventChannelSessionAlertSent",function(a,b){eventChannelSessionAlertSent(b.result,b.sid)});
D("eventChannelSessionAlertStart",function(a,b){eventChannelSessionAlertStart(b.channelId,b.callerId,b.callerName)});D("eventChatroomCreate",function(a,b){a=b.isOk;b=b.roomId;try{onChatroomCreate(a,b)}catch(c){K("[eventChatroomCreate ] : isOk= "+a+" roomId ="+b+"  E:"+c)}});D("eventChatroomDelete",function(a,b){a=b.isOk;try{onChatroomDelete(a,null)}catch(c){K("[eventChatroomDelete ] :isOk="+a+"  E:"+c)}});
D("eventChatroomEnter",function(a,b){a=b.replyOk;b=b.sessionIndex;try{onChatRoomEnter(a,b)}catch(c){K("[eventChatroomEnter ] : sessionIndex= "+b+" replyOk="+a+"  E:"+c)}});D("eventChatroomExit",function(a,b){a=b.sessionIndex;try{onChatRoomExit(a)}catch(c){K("[eventChatroomExit ] : sessionIndex= "+a+"  E:"+c)}});D("eventChatroomMemberAdd",function(a,b){a=b.isOk;try{onChatroomAddMember(a)}catch(c){K("[eventChatroomAddMember ] : isOk= "+a+"  E:"+c)}});
D("eventChatroomMemberDelete",function(a,b){a=b.isOK;try{onChatroomMemberDelete(a)}catch(c){K("[onChatroomMemberDelete ] : isOk= "+a+"  E:"+c)}});D("eventChatroomMemberModify",function(a,b){a=b.isOK;try{onMemberPrioritySave(a)}catch(c){K("[eventChannelMemberModify ] :isOk="+a+"  E:"+c)}});D("eventChatroomPresence",function(a,b){$a(b.json)});D("eventChatroomPresenceAdd",function(a,b){ab(b.json)});D("eventChatroomPresenceDel",function(a,b){bb(b.json)});D("eventChatroomQueue",function(a,b){cb(b.jsonStr)});
D("eventChatroomUpdate",function(a,b){a=b.isOk;try{onChatroomUpdate(a)}catch(c){K("[onChatroomMemberDelete ] : isOk= "+a+"  E:"+c)}});D("eventDialogMemberGet",function(a,b){db(b.json)});D("eventDialogMemberUpdate",function(a,b){eb(b.json)});D("eventDialogMemberUpdateNotify",function(a,b){fb(b.json)});D("eventDialogPresence",function(a,b){gb(b.json)});D("eventHeartbeat",function(a,b){a=b.result;try{onHeartbeat(a)}catch(c){K("[eventHeartBeat ] : result= "+a+"  E:"+c)}});D("eventInqueueConfirm",function(){});
D("eventMediaInqueueConfirm",function(a,b){eventMediaInqueueConfirm(b.sessionIndex)});D("eventMediaOutqueueConfirm",function(a,b){eventMediaOutqueueConfirm(b.sessionIndex)});D("eventMediaStateIdle",function(a,b){a=b.sessionIndex;try{onMediaStateIdle(a,b.reason)}catch(c){K("[eventMediaStateIdle ] : sessionIndex= "+a+"  E:"+c)}});
D("eventMediaStateListen",function(a,b){a=b.sessionIndex;b=b.speaker;try{b=G(J(b)),onMediaStateListern(a,b)}catch(c){K("[eventMediaStateListern ] : sessionIndex= "+a+"speaker="+b+"  E:"+c)}});D("eventMediaStateTalk",function(a,b){a=b.sessionIndex;try{onMediaStateTalk(a)}catch(c){K("[eventMediaStateTalk ] : sessionIndex= "+a+"  E:"+c)}});
D("eventMediaVoice",function(a,b){a=b.sessionIndex;b=b.speaker;try{currentTabSession&&currentTabSession||$("#current-speaker"+a).ra('<div style="width:105px;white-space: nowrap; overflow:hidden; text-overflow:ellipsis;">'+getUserDisplayName(b)+'</div><div style="margin-top:-27px;margin-left:-134px;"><img src="images/chat_dialog.png"/></div><div style="margin-left:105px;margin-top:-32px;width:50px;">'+str_speaking+"</div>")}catch(c){K("[eventMediaVoice ] :sessionIndex="+a+"speaker="+b+"  E:"+c)}});
D("eventMessageRecv",function(a,b){hb(b.result,b.json)});D("eventMessageSent",function(a,b){ib(b.result,b.json)});D("eventOutQueueConfirm",function(){});D("eventPushBroadcast",function(){try{newBroadcast(),onDialogClose()}catch(a){K("[eventPushBroadcast ] :json="+jsons+"  E:"+a)}});D("eventPushContent",function(a,b){jb(b.json)});D("eventPushLocation",function(a,b){kb(b.json)});D("eventPushReport",function(a,b){lb(b.json)});D("eventRecDataLoaded",function(a,b){recordDownloadCheck(b.ret)});
D("eventRecRecordStart",function(a,b){a=b.wParam;try{eventRecRecordStart(a)}catch(c){K("[OnJsEventRecRecordStart ] :wParam="+a+"  E:"+c)}});D("eventRecRecordStop",function(a,b){a=b.wParam;try{eventRecRecordStop(a,G(J(b.base64Resid)))}catch(c){K("[OnJsEventRecRecordStop ] :wParam="+a+"  E:"+c)}});D("eventRecordPlayStart",function(a,b){a=b.code;b=b.resid;try{a=G(J(a)),onRecordPlayStart(a,G(J(b)))}catch(c){K("[eventRecordPlayStart ] : code= "+a+"resid= "+b+"  E:"+c)}});
D("eventRecordPlayStop",function(a,b){a=b.code;b=b.resid;try{a=G(J(a)),onRecordPlayStop(a,G(J(b)))}catch(c){K("[eventRecordPlayStop ] : code= "+a+"resid= "+b+"  E:"+c)}});D("eventSecretImageDownload",function(a,b){mb(b.info)});D("eventSessionEstablish",function(a,b){try{onSessionEstablish(b.sessionIndex,G(J(b.sid)))}catch(c){}});
D("eventSessionIncomingAlert",function(a,b){a=b.sessionIndex;var c=b.user;b=b.sid;try{onSessionIncomingAlert(a,G(J(c)),G(J(b)))}catch(d){K("[eventSessionIncomingAlert ] : sessionIndex= "+a+"user="+c+"sid="+b+"  E:"+d)}});D("eventSessionOutgoingRinging",function(a,b){a=b.sessionIndex;b=b.sid;try{onSessionOutgoingRinging(a,G(J(b)))}catch(c){K("[eventSessionOutgoingRinging ] : sessionIndex= "+a+"sid="+b+"  E:"+c)}});
D("eventSessionRelease",function(a,b){a=b.sessionIndex;b=b.releaseReason;try{onSessionRelease(a,b)}catch(c){K("[eventSessionRelease ] : sessionIndex= "+a+"releaseReason"+b+"  E:"+c)}});D("eventUserPresence",function(a,b){nb(b.json)});D("eventVideoShare",function(a,b){ob(b.json)});D("eventVideoCaptureFinish",function(a,b){a=b.ok;try{onVideoReportCaptureLocalFinish(a)}catch(c){K("[onEventVideoCaptureFinish ] : ok= "+a+"  E:"+c)}});D("eventRestart",function(){var a=window.eventSvcRestart;a&&a()});
function cb(a){try{var b=G(J(a));onChatroomQueue(eval("("+b+")"))}catch(c){K("[eventChatroomQueue ] : parseJson= "+b+"  E:"+c)}}function nb(a){try{var b=G(J(a));onContactPresence(eval("("+b+")"))}catch(c){K("[eventContactPresenceAir ] : parseJson= "+b+"  E:"+c)}}function lb(a){try{var b=G(J(a));onUserMessage(eval("("+b+")"))}catch(c){K("[eventPushReport ] : json= "+b+"  E:"+c)}}
function kb(a){try{var b=G(J(a));onUserLocaltionChanged(eval("("+b+")"))}catch(c){K("[eventUserLocaltionChanged ] : json= "+b+"  E:"+c)}}function hb(a,b){try{if(null!=b&&""!=b){var c=G(J(b));if(null!=c){var d=eval("("+c+")");onMessageRecv(a,d)}}}catch(g){K("[eventMessageRecv ] : json= "+b+"  E:"+g)}}function ib(a,b){try{var c=G(J(b));var d=eval("("+c+")");4==d.state&&onMessageSent(0,d)}catch(g){K("[eventMessageSent ] : result= "+a+"json="+c+"  E:"+g)}}
function jb(a){try{var b=G(J(a));b=eval("("+b+")");switch(b.t){case 210:pushWarningFence(b);break;case 216:pb(b);break;case 218:qb(b);break;case 129:rb(b);break;case 300:try{onPushUserNameChanged(b)}catch(c){K("[onPushUserNameChanged] :json="+b+"  E:"+c)}break;case 301:try{onPushOrgNameChanged(b)}catch(c){K("[onPushOrgNameChanged] :json="+b+"  E:"+c)}break;case 302:try{onPushUserRoleChanged(b)}catch(c){K("[onPushUserRoleChanged] :json="+b+"  E:"+c)}break;case 303:try{onPushOrgStructChanged(b)}catch(c){K("[onPushOrgStructChanged] :json="+
b+"  E:"+c)}}}catch(c){K("[eventPushContent ] :json="+b+"  E:"+c)}}function pb(a){try{onVideoCaptureGet(a)}catch(b){K("[videoCaptureGet ] :json="+a+"  E:"+b)}}function qb(a){try{onVideoLocalCaptureGet(a)}catch(b){K("[videoLocalCaptureGet ] :json="+a+"  E:"+b)}}function rb(a){try{onVideoStorePush(a)}catch(b){K("[videoStorePush ] :json="+a+"  E:"+b)}}function gb(a){try{var b=G(J(a));onSessionDialogPresence(eval("("+b+")"))}catch(c){K("[eventSessionDialogPresence ] :json="+b+"  E:"+c)}}
function db(a){try{var b=G(J(a));onSessionDialogMemberChange(eval("("+b+")"))}catch(c){K("[eventSessionDialogMemberGet ] :json="+b+"  E:"+c)}}function eb(a){try{var b=G(J(a));onSessionDialogMemberChange(eval("("+b+")"))}catch(c){K("[eventSessionDialogMemberChange ] :json="+b+"  E:"+c)}}function fb(a){try{onSessionDialogMemberChange(eval("("+G(J(a))+")"))}catch(b){K("[eventSessionDialogMemberNotify ] :json="+J(a)+"  E:"+b)}}
function $a(a){try{var b=G(J(a));onSessionChannelPresence(eval("("+b+")"))}catch(c){K("[eventSessionChannelPresence ] :json="+b+"  E:"+c)}}function ab(a){try{var b=G(J(a));onSessionChannelUserEnter(eval("("+b+")"))}catch(c){K("[eventSessionChannelUserEnter ] :json="+b+"  E:"+c)}}function bb(a){try{var b=G(J(a));onSessionChannelUserExit(eval("("+b+")"))}catch(c){K("[eventSessionChannelUserExit ] :json="+b+"  E:"+c)}}
function ob(a){try{var b=G(J(a));L(eval("("+b+")"))}catch(c){K("[eventVideoShare ] :json="+b+"  E:"+c)}}function mb(a){try{var b=G(J(a));b=eval("("+b+")");setResPath(b.code,b.file_path);document.getElementById(b.code).src=b.file_path}catch(c){K("[eventSecretImageDownload ] :  E:"+c)}}function K(a){console.log("setWebError:"+a)};function M(a,b,c){this.j="string"==typeof a?document.getElementById(a):a;this.b=b;this.u=c;this.c=!1;this.a=this.h=null}M.prototype.stop=function(){this.c&&(this.c=!1,"open"==this.a.readyState&&this.a.endOfStream(),this.h&&this.h.close(),this.buffer=this.a=this.h=null,this.m&&clearInterval(this.m))};
M.prototype.start=function(){if(!this.c){this.c=!0;var a=this.buffer,b=[],c=0,d=this,g=this.j,e=this.a=new MediaSource;g.addEventListener("loadeddata",function(){2<=g.readyState&&g.play()});g.addEventListener("loadedmetadata",function(){});g.addEventListener("error",function(){var a=g.error;console.log("video.error: err.code:",a.code,"; type:",typeof a,"; message:",a.message)});e.addEventListener("sourceopen",function(){a=this.buffer=e.addSourceBuffer(d.b);a.addEventListener("update",function(){0<
b.length&&!a.updating&&a.appendBuffer(b.shift())});a.addEventListener("updateend",function(){!a.updating&&1<=a.buffered.length&&30<g.currentTime-a.buffered.start(0)&&a.remove(a.buffered.start(0),g.currentTime-10);g.paused||2>=g.readyState?c++:c=0;var b=d.j,e=b.buffered;if(0!=e.length){if(b.readyState<=HTMLMediaElement.HAVE_CURRENT_DATA)for(var q=b.currentTime,x=0;x<e.length;x++){var U=e.start(x),V=e.end(x);if(U<=q&&q<=V){1<e.length-x?(b.currentTime=e.start(x+1),m(b.id,"Advance playback time to next segment:",
x+1,"of",e.length)):1<V-q&&(b.currentTime+=.2);break}else if(U>q){b.currentTime=e.start(x);m(b.id,"Advance playback time to next segment:",x,"of",e.length);break}}e=e.end(e.length-1);q=e-b.currentTime;0>q&&(b.currentTime=e-1,q=e-b.currentTime,m(b.id,"currentTime is out of range. fix it"));d.s==b.currentTime&&1<q&&(b.currentTime+=.2,m(b.id,"video freezes. step forward"));d.s=b.currentTime;5<q&&2>b.playbackRate?(b.playbackRate=2,m(b.id,"Fastforward: lag="+q.toFixed(1)+"; playbackRate="+b.playbackRate)):
2<q&&1.5>b.playbackRate?(b.playbackRate=1.5,m(b.id,"Fastforward: lag="+q.toFixed(1)+"; playbackRate="+b.playbackRate)):1<q&&1.2>b.playbackRate?(b.playbackRate=1.2,m(b.id,"Fastforward: lag="+q.toFixed(1)+"; playbackRate="+b.playbackRate)):1>=q&&1!=b.playbackRate&&(b.playbackRate=1,m(b.id,"Stop Fastforward: lag="+q.toFixed(1)+"; playbackRate="+b.playbackRate))}},!1)},!1);var q=d.h=new WebSocket(d.u);q.binaryType="arraybuffer";q.addEventListener("message",function(c){c=c.data;"string"==typeof c?(c=JSON.parse(c),
1==c.type&&(d.b=c["MIME-Codecs"],console.log("Codecs:",d.b,"; supported:",MediaSource.isTypeSupported(d.b)),g.src=window.URL.createObjectURL(e))):!a||a.updating?b.push(c):a.appendBuffer(c)},!1)}};var O=new N(36);l("videoSessionList",O);var P="player.swf",Q=t(),S=0,T=!0;Date.ia=function(a){return a+28800};l("Date.sec",Date.ia);l("setPlayerPath",function(a){P=a});l("setRtmpPlayer",function(a){S=a});l("enableFullScreen",function(a){T=a});l("onVideoStalled",function(a,b){var c=O.K(a);c&&("stall"==b?c.U():(c=c.f,c.pause(),c.resume()));m(b,"detected for",a)});function W(a){a=null==a?t():a;E("setPlayerType",{type:a});Q=a;3==Q&&D("eventAVResync",function(a,c){m("eventAVResync",c)})}
l("setPlayerType",W);B(function(a){a&&(O.T(window.onNewVideoHandler,window.onVideoStopHandler,function(a){alert(a.ssid+" too many videos")}),W())});l("playVideo",function(a,b,c,d,g,e){E("playVideo",{url:a,ipocid:b?b:"",opts:c?c:"",cls:d?d:0,sid:g?g:0,ssid:e?e:0})});function X(a,b){this.g=a;a.videoSession=this;this.time=new Date;this.i=b;this.paused=!1}X.prototype.Z=function(){return this.g};X.prototype.getInf=X.prototype.Z;X.prototype.ca=function(){return this.f};X.prototype.getPlayer=X.prototype.ca;
X.prototype.startTime=function(){return this.time};X.prototype.startTime=X.prototype.startTime;
function sb(a,b){a.f=b;b.videoSession=a;b.src=a.g.url;b.autoplay=!0;b.id="av_"+a.g.ssid;a.o(void 0);0==a.i?setTimeout(function(){try{b.VideoPlayUrl(b.src),b.Mute(b.muted)}catch(c){alert("\u64ad\u653e\u5668\u52a0\u8f7d\u5931\u8d25\u3002\n\n\u8bf7\u5c06\u5f53\u524d\u7f51\u7ad9\u52a0\u5165\u5230\u201c\u53d7\u4fe1\u4efb\u7684\u7ad9\u70b9\u201d\u4e2d\uff0c\u5e76\u5c06\u201c\u8be5\u533a\u57df\u7684\u5b89\u5168\u7ea7\u522b\u201d\u8bbe\u7f6e\u4e3a\u201c\u4f4e\u201d\uff0c\u7136\u540e\u91cd\u542f\u6d4f\u89c8\u5668\u3002")}}):2==
a.i?(a.a=new M(b,"",p()+"://127.0.0.1:"+h+"/av/"+a.g.ssid),a.a.start()):1==a.i?a.a=window.Streamedian.sa(b,{ta:p()+"://127.0.0.1:"+h+"/rtsp"}):3==a.i&&1==S&&a.o()}X.prototype.o=function(a){var b=this.i,c=this.f;c.muted=null==a?!0:a;if(!c.muting){c.muting=!0;var d=function(a,b,c){var e=!b.D;try{0==a&&b.GetMute!=b.muted?b.Mute(b.muted):3==a&&b.getProperty("muted")!=b.muted&&b.setProperty("muted",b.muted)}catch(ub){e=!0}e&&c&&--c?setTimeout(function(){d(a,b,c)},20):b.muting=!1};d(b,c,500)}};
X.prototype.mute=X.prototype.o;X.prototype.F=function(){var a=this.f;return 3==this.i&&a.snapshot?a.snapshot():null};X.prototype.snapshot=X.prototype.F;X.prototype.v=function(a){if(T){var b=this.i,c=this.f;c.N=null==a?!0:a;if(!c.B){c.B=!0;var d=function(a,b,c){var e=!1;3==a&&(b.setProperty&&b.setProperty("enableDblClick",b.N),e=null==b.getProperty||b.getProperty("enableDblClick")!=b.N);b.B=e&&0<--c;b.B&&setTimeout(function(){d(a,b,c)},20)};d(b,c,500)}}};X.prototype.enableFullScreen=X.prototype.v;
X.prototype.ea=function(){return this.paused};X.prototype.isPaused=X.prototype.ea;X.prototype.pause=function(){var a=this.f;this.paused||(a.pause&&a.pause(),E("pauseVideo",{ssid:this.g.ssid}),this.paused=!0)};X.prototype.pause=X.prototype.pause;X.prototype.resume=function(){var a=this.f;this.paused&&(a.resume&&a.resume(),E("resumeVideo",{ssid:this.g.ssid}),this.paused=!1)};X.prototype.resume=X.prototype.resume;X.prototype.rotate=function(a){var b=this.f;b.rotate&&b.rotate(null==a?a:90)};
X.prototype.rotate=X.prototype.rotate;X.prototype.ma=function(){E("syncVideo",{ssid:this.g.ssid})};X.prototype.syncSrc=X.prototype.ma;X.prototype.U=function(){var a=this.f;3==this.i&&a.sync&&a.sync()};X.prototype.syncPlayer=X.prototype.U;X.prototype.end=function(){E("stopVideo",{ssid:this.g.ssid})};X.prototype.end=X.prototype.end;
X.prototype.stop=function(){try{this.f&&(0==this.i&&this.f.VideoStop?this.f.VideoStop():this.f.pause&&this.f.pause(),this.f.src=null),this.a&&(this.a.stop&&this.a.stop(),this.a.V&&setTimeout(function(a){try{a.V()}catch(b){m(b)}},1E3,this.a)),this.f.stop&&this.f.stop()}catch(a){}};function N(a){this.j=a;this.a=[];this.h=[];this.c=[];this.b=null}N.prototype.aa=function(){return this.j};N.prototype.getLimit=N.prototype.aa;N.prototype.ja=function(a){this.j=a};N.prototype.setLimit=N.prototype.ja;
N.prototype.O=function(){return this.size()>=this.j};N.prototype.full=N.prototype.O;N.prototype.size=function(){return this.a.length};N.prototype.size=N.prototype.size;N.prototype.C=function(a){if(!a)return-1;var b=this.a.indexOf(a);-1!=b&&this.a.splice(b,1);a.stop();return b};N.prototype.hangup=N.prototype.C;N.prototype.X=function(a){for(var b=0;b<this.size();b++)if(this.a[b].g.url==a)return this.a[b];return null};N.prototype.findByUrl=N.prototype.X;
N.prototype.A=function(a){for(var b=0;b<this.size();b++)if(this.a[b].g.ssid==a)return this.a[b];return null};N.prototype.findBySsid=N.prototype.A;N.prototype.K=function(a){for(var b=0;b<this.size();b++)if(this.a[b].f.id==a)return this.a[b];return null};N.prototype.findByPlayerId=N.prototype.K;N.prototype.L=function(a){for(var b=0;b<this.c.length;b++)if(this.c[b].ssid==a)return this.c[b];return null};N.prototype.findBySsidInWait=N.prototype.L;N.prototype.W=function(a){return this.A(a)||this.L(a)};
N.prototype.existSsid=N.prototype.W;N.prototype.da=function(){return this.b};N.prototype.getWatching=N.prototype.da;N.prototype.ba=function(){return this.h};N.prototype.getPinningSids=N.prototype.ba;N.prototype.move=function(a,b){var c=this.a.indexOf(a);-1!=c&&(this.a.splice(c,1),c=this.a.indexOf(b),c=-1==c?this.size():c,this.a.splice(c,0,a))};N.prototype.move=N.prototype.move;N.prototype.ga=function(a){-1==this.h.indexOf(a.g.sid)&&this.h.push(a.g.sid)};N.prototype.pin=N.prototype.ga;
N.prototype.oa=function(a){a=this.h.indexOf(a.g.sid);-1!=a&&this.h.splice(a,1)};N.prototype.unpin=N.prototype.oa;N.prototype.I=function(a){var b=this.a.indexOf(this.b),c=this.a.indexOf(a);-1!=b&&-1!=c?(this.a[b]=a,this.a[c]=this.b):-1==c&&(m("Video to be watched is not in list: "+(a?a.g.url:a)),a=null);this.b&&(this.b.o(),this.b.v(!1));a&&(a.o(!1),a.v());return this.b=a};N.prototype.watchMe=N.prototype.I;
N.prototype.pa=function(){if(!this.b)return null;this.b.o();this.b.v(!1);if(1!=this.b.g.cls){var a=this.C(this.b);a=0>a||a>=this.size()?0:a}else a=Y(this);this.b=null;0<=a&&a<this.size()&&(this.b=this.a[a]);this.b&&(this.b.o(!1),this.b.v());return this.b};N.prototype.unwatchMe=N.prototype.pa;function Y(a){var b=a.a.indexOf(a.b);b++;b>=a.size()&&(b=0);b>=a.size()&&(b=-1);return b}
N.prototype.la=function(){var a=[],b=0,c=this;this.a.forEach(function(d){d!=c.b&&(-1==c.h.indexOf(d.g.sid)?a.push(d):a.splice(b++,0,d))});return a};N.prototype.showList=N.prototype.la;N.prototype.qa=function(){return this.c};N.prototype.waitList=N.prototype.qa;N.prototype.H=function(a){"number"===typeof a.J?this.c.splice(a.J,0,a):this.c.push(a)};N.prototype.wait=N.prototype.H;
N.prototype.G=function(a){var b=this.c.length;if(null!=a)for(var c=0;c<this.c.length;c++){if(this.c[c].ssid==a){b=c;break}}else b=0;return b<this.c.length?(a=this.c.splice(b,1)[0],a.J=Number(b),a):null};N.prototype.unwait=N.prototype.G;N.prototype.T=function(a,b,c){this.s=a;this.w=b;this.u=c};N.prototype.setEvtListeners=N.prototype.T;N.prototype.ka=function(a){this.m=a};N.prototype.setSnapshotDir=N.prototype.ka;
N.prototype.F=function(a){a=a?a:this.b;if(3==a.i)return{data:a.f.snapshot()};if(0!=a.i)return alert("\u5f53\u524d\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u6293\u62cd"),null;if(!this.m||""==this.m)return null;var b=a.f;if(!b)return null;b.VideoSnapshotPath(this.m+a.g.ssid+"-");return{path:b.VideoSnapshot()}};N.prototype.snapshot=N.prototype.F;l("loadVideoSources",function(){E("getVideoSources",null,function(a){a.l()?m("getVideoSources: failed: "+a.error):JSON.parse(a.result).forEach(function(a){L(a)})})});
function tb(a){var b=Q;if(0==b){var c=document.createElement("object");try{c.classid="clsid:E52088B2-5185-4BF6-84E2-F75C4887C8BD"}catch(q){}}else if(3==b){window.videojs||(c=function(a,b,c){var d=document.getElementById(a);if(!d.D){d.D=!0;var e=function(){d.detectStall?(d.detectStall("onVideoStalled",10),m("detectStall for",a)):setTimeout(e,500)};e()}"timeChange"!=arguments[1]&&m("onFlashEvent",JSON.stringify(arguments))},window.videojs={Flash:{onEvent:c,onError:function(){m("onFlashError",JSON.stringify(arguments))},
onReady:function(){m("onFlashReady",JSON.stringify(arguments))}}},window.onJSBridge=c);c=a.lastIndexOf("/");var d=a.substring(0,c),g=a.substring(c+1);c=document.createElement("object");c.classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000";c.type="application/x-shockwave-flash";c.data=P;var e=document.createElement("param");e.name="allowNetworking";e.value="all";c.appendChild(e);e=document.createElement("param");e.name="allowScriptAccess";e.value="always";c.appendChild(e);e=document.createElement("param");
e.name="allowFullScreen";e.value="true";c.appendChild(e);e=document.createElement("param");e.name="flashvars";e.value="autoplay=true&muted=true&rtmpConnection="+d+"&rtmpStream="+g;1==S&&(e.value="javascriptCallbackFunction=onJSBridge&autoPlay=true&muted=true&streamType=live&src="+a,c.data="player-1.swf");c.appendChild(e);e=document.createElement("param");e.name="wmode";e.value="transparent";c.appendChild(e);r&&(a=document.createElement("div"),a.innerHTML=c.outerHTML,c=a.firstChild)}else c=document.createElement("video");
c.D=3!=b;return c}function L(a){if(a.valid)O.H(a),O.s?O.s(a):(refreshVideoView(),Z()),m("Media is ready:",a.ssid,a.url);else{var b;if(b=O.A(a.ssid)){if(b==O.b){a=O;var c=Y(a);a=-1!=c?a.a[c]:null;b==a&&(a=null);O.I(a)}O.C(b);b=b.g}else b=O.G(a.ssid);m("video share is stopped: "+(b?b.url:""));O.w?O.w(b):(refreshVideoView(),Z())}}
l("pickupVideo",function(a){var b=O.G(a);if(!b)return null;a=new X(b,Q);var c=O;c.O()?c=!1:(c.a.unshift(a),c=!0);if(!c)return O.H(b),O.u?O.u(b):alert("Please hang up a video session to accept the new one"),null;b=tb(b.url);sb(a,b);O.b||O.I(a);return a});l("onShowVideoView",function(){O.a.forEach(function(a){var b=a.f;3==a.i&&b.getProperty.paused!=a.paused&&(a.paused?b.pause():b.resume())})});
function Z(){O.a.forEach(function(a){var b=a.f;if(0==a.i||3==a.i)a.o(b.muted);else if(b.paused)try{b.play().catch(function(a){m("Failed to play",b.id,a.message)})}catch(c){}})}l("postRefreshVideoView",Z);
}));