File manager - Edit - /home/web/vm-3fadc827.na4u.ru/www/bitrix/modules/im/install/js/im/v1/call/abstract_call.min.js
Back
(function(){BX.namespace("BX.Call");BX.Call.AbstractCall=function(t){var e=this;this.id=t.id;this.instanceId=t.instanceId;this.parentId=t.parentId||null;this.direction=t.direction;this.ready=false;this.userId=BX.Call.Engine.getInstance().getCurrentUserId();this.initiatorId=t.initiatorId||"";this.users=BX.type.isArray(t.users)?t.users.filter(function(t){return t!=e.userId}):[];this.associatedEntity=BX.type.isPlainObject(t.associatedEntity)?t.associatedEntity:{};this.videoEnabled=t.videoEnabled===true;this.videoHd=t.videoHd===true;this.cameraId=t.cameraId||"";this.microphoneId=t.microphoneId||"";this.muted=t.muted===true;this.localStreams={main:null,screen:null};this.eventListeners={};if(BX.type.isPlainObject(t.events)){this.initEventListeners(t.events)}Object.defineProperty(this,"provider",{get:function(){if(this instanceof BX.Call.PlainCall){return BX.Call.Provider.Plain}else if(this instanceof BX.Call.VoximplantCall){return BX.Call.VoximplantCall}else{return""}}})};BX.Call.AbstractCall.prototype.initEventListeners=function(t){for(var e in t){this.addEventListener(e,t[e])}};BX.Call.AbstractCall.prototype.addEventListener=function(t,e){if(!BX.type.isArray(this.eventListeners[t])){this.eventListeners[t]=[]}if(BX.type.isFunction(e)){this.eventListeners[t].push(e)}};BX.Call.AbstractCall.prototype.removeEventListener=function(t,e){if(BX.type.isArray(this.eventListeners[t])&&this.eventListeners[t].indexOf(e)>=0){var n=this.eventListeners[t].indexOf(e);if(n>=0){this.eventListeners[t].splice(n,1)}}};BX.Call.AbstractCall.prototype.runCallback=function(t,e){if(BX.type.isArray(this.eventListeners[t])&&this.eventListeners[t].length>0){if(!BX.type.isPlainObject(e)){e={}}e.call=this;for(var n=0;n<this.eventListeners[t].length;n++){try{this.eventListeners[t][n].call(this,e)}catch(e){console.error(t+" callback error: ",e);this.log(t+" callback error: ",e)}}}};BX.Call.AbstractCall.prototype.getLocalStream=function(t){return this.localStreams[t]};BX.Call.AbstractCall.prototype.setLocalStream=function(t,e){e=e||"main";this.localStreams[e]=t};BX.Call.AbstractCall.prototype.isVideoEnabled=function(){return this.videoEnabled};BX.Call.AbstractCall.prototype.isAnyoneParticipating=function(){throw new Error("isAnyoneParticipating should be implemented")};BX.Call.AbstractCall.prototype.__onPullEvent=function(t,e){throw new Error("__onPullEvent should be implemented")};BX.Call.AbstractCall.prototype.inviteUsers=function(){throw new Error("inviteUsers is not implemented")};BX.Call.AbstractCall.prototype.cancel=function(){throw new Error("cancel is not implemented")};BX.Call.AbstractCall.prototype.answer=function(){throw new Error("answer is not implemented")};BX.Call.AbstractCall.prototype.decline=function(t,e){throw new Error("decline is not implemented")};BX.Call.AbstractCall.prototype.hangup=function(){throw new Error("hangup is not implemented")};BX.Call.AbstractCall.prototype.log=function(){var t=[this.id];BX.CallEngine.log.apply(BX.CallEngine,t.concat(Array.prototype.slice.call(arguments)))}})(); //# sourceMappingURL=abstract_call.map.js
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.25 |
proxy
|
phpinfo
|
Settings