omnirtc-web 0.1.0-beta.6 → 0.1.0-beta.8
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/dist/es-omnirtc-web.js +177 -156
- package/package.json +1 -1
package/dist/es-omnirtc-web.js
CHANGED
|
@@ -97,7 +97,7 @@ var InvalidTokenError_1 = InvalidTokenError;
|
|
|
97
97
|
lib.InvalidTokenError = InvalidTokenError_1;
|
|
98
98
|
|
|
99
99
|
var StaticConfig = {
|
|
100
|
-
agentVersion: "OmniRTC_Web_V0.1.0-beta.
|
|
100
|
+
agentVersion: "OmniRTC_Web_V0.1.0-beta.8",
|
|
101
101
|
logVersion: 1,
|
|
102
102
|
serviceType: 320,
|
|
103
103
|
logBackendUrl: "https://rtc-logs.magic-school.com/stream.gif"
|
|
@@ -2454,7 +2454,7 @@ var GET_STATS_INTERVEL=0.4;// seconds
|
|
|
2454
2454
|
var HEART_BEAT_TIMEOUT=20;// seconds
|
|
2455
2455
|
var LoggerUploadUrl='https://serverlog.eaydu.com:15100';// 日志上报地址
|
|
2456
2456
|
var iplocationUrl='wss://shenzhen.eaydu.com/iplocation/';// 调度服务地址
|
|
2457
|
-
var SDK_VERSION='V6.1.5-alpha-
|
|
2457
|
+
var SDK_VERSION='V6.1.5-alpha-19';// 版本号
|
|
2458
2458
|
var AUDIO_AVAILABLE=10;// 音频变化幅度常量
|
|
2459
2459
|
var VOLUME_INTERVAL=2000;// 音量变化间隔时间 ms
|
|
2460
2460
|
var CoreTransport=/*#__PURE__*/function(_WebSocketTransport_){_inherits2(CoreTransport,_WebSocketTransport_);var _super3=_createSuper2(CoreTransport);function CoreTransport(url,options){var _this13;_classCallCheck2(this,CoreTransport);_this13=_super3.call(this,url,options);_this13.on('open',function(){_this13._run();});return _this13;}_createClass2(CoreTransport,[{key:"log",value:function log(msg){console.info(new Date().toLocaleString(),msg);}},{key:"_run",value:function _run(){var _this14=this;var onmessage=this._ws.onmessage;var onclose=this._ws.onclose;this._ws.onmessage=function(event){clearTimeout(_this14._hbTimeout);_this14._hbTimeout=setTimeout(function(){if(_this14.closed){return;}// this.close();
|
|
@@ -2463,7 +2463,7 @@ if(event.code===4000){onclose(event);return;}_this14.safeEmit('msg-timeout');};}
|
|
|
2463
2463
|
* @param interval seconds
|
|
2464
2464
|
*/},{key:"startHeartBeat",value:function startHeartBeat(interval){if(this.interval){this.log('startHeartBeat() failed: Already run interval.');return;}if(interval<1){interval=1;}this.interval=interval;this._sendPing();}}]);return CoreTransport;}(WebSocketTransport_1$1);var getNowTimeStamp=function getNowTimeStamp(){var date=arguments.length>0&&arguments[0]!==undefined?arguments[0]:new Date();var formate=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'yyyy-MM-dd HH:mm:ss.S';var o={'M+':date.getMonth()+1,'d+':date.getDate(),'h+':date.getHours()%12==0?12:date.getHours()%12,'H+':date.getHours(),'m+':date.getMinutes(),'s+':date.getSeconds(),'q+':Math.floor((date.getMonth()+3)/3),S:date.getMilliseconds()};var week={'0':'/u65e5','1':'/u4e00','2':'/u4e8c','3':'/u4e09','4':'/u56db','5':'/u4e94','6':'/u516d'};if(/(y+)/.test(formate)){formate=formate.replace(RegExp.$1,(date.getFullYear()+'').substr(4-RegExp.$1.length));}if(/(E+)/.test(formate)){formate=formate.replace(RegExp.$1,(RegExp.$1.length>1?RegExp.$1.length>2?'/u661f/u671f':'/u5468':// @ts-ignore
|
|
2465
2465
|
'')+week[date.getDay()+'']);}for(var k in o){if(new RegExp('('+k+')').test(formate)){formate=formate.replace(RegExp.$1,// @ts-ignore
|
|
2466
|
-
RegExp.$1.length==1?o[k]:('00'+o[k]).substr((''+o[k]).length));}}return formate;};var EventCode;(function(EventCode){EventCode["ENTER_BEGIN"]="enter_begin";EventCode["ENTER_STATE"]="enter_state";EventCode["MEMBER_STATE"]="member_state";EventCode["EXIT_CHANNEL"]="exit_channel";EventCode["STARTSENDVIDEO"]="start_send_video";EventCode["STOPSENDVIDEO"]="stop_send_video";EventCode["STARTSENDAUDIO"]="start_send_audio";EventCode["STOPSENDAUDIO"]="stop_send_audio";EventCode["FIRST_AUDIO_PACK_RECEIVED"]="recv_fst_rmt_audio_frm";EventCode["FIRST_AUDIO_DECODE"]="recv_fst_rmt_audio_dec";EventCode["FIRST_VIDEO_FREAME_DECODE"]="recv_fst_rmt_video_dec";EventCode["FIRST_VIDEO_PACKAGE_RECV"]="recv_fst_rmt_video_frm";EventCode["USERFUNCLOGS"]="user_func_logs";EventCode["USERCALLBACKLOGS"]="user_callback_logs";EventCode["CONNECTION_STATUS_CHANGE"]="conn_gw_status";EventCode["RECONN_GW_FINAL_TIMEOUT"]="reconn_gw_final_timeout";EventCode["OP_VIDEO_CHANNEL"]="op_video_channel";EventCode["OP_AUDIO_CHANNEL"]="op_audio_channel";EventCode["UPSTREAM_VIDEO"]="upstream_video";EventCode["CONN_AUDIO_STATE"]="conn_audio_state";EventCode["CONN_VIDEO_STATE"]="conn_video_state";EventCode["SDK_HEARTBEAT"]="sdk_heartbeat";EventCode["SWITCH_BACKGROUND_STATE"]="switch_background_state";EventCode["USER_ROLE"]="user_role";EventCode["VIDEO_DOWNSTREAM_STUCK"]="video_downstream_stuck";EventCode["CONNECT_TRANSPORT_STATE"]="connect_transport_state";})(EventCode||(EventCode={}));var ExitReason={0:'Quit',1:'ServerTimeOut',2:'ServerTimeOut',3:'Kicked',999:'BecomeAudience'};var BaseInfo=/*#__PURE__*/_createClass2(function BaseInfo(_ref9){var time=_ref9.time,appId=_ref9.appId,uid=_ref9.uid,roomStr=_ref9.roomStr,sid=_ref9.sid,connId=_ref9.connId,userDevInfo=_ref9.userDevInfo,uRole=_ref9.uRole;_classCallCheck2(this,BaseInfo);this.event='';this.uosv='Web';this.sdkPublicVer='CoreRTC_Web_'+'V6.1.5-alpha-
|
|
2466
|
+
RegExp.$1.length==1?o[k]:('00'+o[k]).substr((''+o[k]).length));}}return formate;};var EventCode;(function(EventCode){EventCode["ENTER_BEGIN"]="enter_begin";EventCode["ENTER_STATE"]="enter_state";EventCode["MEMBER_STATE"]="member_state";EventCode["EXIT_CHANNEL"]="exit_channel";EventCode["STARTSENDVIDEO"]="start_send_video";EventCode["STOPSENDVIDEO"]="stop_send_video";EventCode["STARTSENDAUDIO"]="start_send_audio";EventCode["STOPSENDAUDIO"]="stop_send_audio";EventCode["FIRST_AUDIO_PACK_RECEIVED"]="recv_fst_rmt_audio_frm";EventCode["FIRST_AUDIO_DECODE"]="recv_fst_rmt_audio_dec";EventCode["FIRST_VIDEO_FREAME_DECODE"]="recv_fst_rmt_video_dec";EventCode["FIRST_VIDEO_PACKAGE_RECV"]="recv_fst_rmt_video_frm";EventCode["USERFUNCLOGS"]="user_func_logs";EventCode["USERCALLBACKLOGS"]="user_callback_logs";EventCode["CONNECTION_STATUS_CHANGE"]="conn_gw_status";EventCode["RECONN_GW_FINAL_TIMEOUT"]="reconn_gw_final_timeout";EventCode["OP_VIDEO_CHANNEL"]="op_video_channel";EventCode["OP_AUDIO_CHANNEL"]="op_audio_channel";EventCode["UPSTREAM_VIDEO"]="upstream_video";EventCode["CONN_AUDIO_STATE"]="conn_audio_state";EventCode["CONN_VIDEO_STATE"]="conn_video_state";EventCode["SDK_HEARTBEAT"]="sdk_heartbeat";EventCode["SWITCH_BACKGROUND_STATE"]="switch_background_state";EventCode["USER_ROLE"]="user_role";EventCode["VIDEO_DOWNSTREAM_STUCK"]="video_downstream_stuck";EventCode["CONNECT_TRANSPORT_STATE"]="connect_transport_state";})(EventCode||(EventCode={}));var ExitReason={0:'Quit',1:'ServerTimeOut',2:'ServerTimeOut',3:'Kicked',999:'BecomeAudience'};var BaseInfo=/*#__PURE__*/_createClass2(function BaseInfo(_ref9){var time=_ref9.time,appId=_ref9.appId,uid=_ref9.uid,roomStr=_ref9.roomStr,sid=_ref9.sid,connId=_ref9.connId,userDevInfo=_ref9.userDevInfo,uRole=_ref9.uRole;_classCallCheck2(this,BaseInfo);this.event='';this.uosv='Web';this.sdkPublicVer='CoreRTC_Web_'+'V6.1.5-alpha-19';this.sdkSignalVer='5.1.1';this.logVersion='1.3.0';this.time=time||getNowTimeStamp();this.appId=appId;this.uid=uid;this.roomStr=roomStr;this.sid=sid;this.connId=connId;this.uRole=uRole;this.userDevInfo=userDevInfo;});var BasicMetric=/*#__PURE__*/_createClass2(function BasicMetric(){_classCallCheck2(this,BasicMetric);this.event='';var timestamp=new Date();this.ts=timestamp.getTime();this.time=getNowTimeStamp(timestamp);});var EnterBegin=/*#__PURE__*/function(_BasicMetric){_inherits2(EnterBegin,_BasicMetric);var _super4=_createSuper2(EnterBegin);function EnterBegin(){var _this16;_classCallCheck2(this,EnterBegin);_this16=_super4.call(this);_this16.event=EventCode.ENTER_BEGIN;return _this16;}return _createClass2(EnterBegin);}(BasicMetric);var EnterStatsCode;(function(EnterStatsCode){EnterStatsCode[EnterStatsCode["enterSuccess"]=1]="enterSuccess";EnterStatsCode[EnterStatsCode["enterTimeout"]=2]="enterTimeout";EnterStatsCode[EnterStatsCode["enterFail"]=3]="enterFail";})(EnterStatsCode||(EnterStatsCode={}));var EnterState=/*#__PURE__*/function(_BasicMetric2){_inherits2(EnterState,_BasicMetric2);var _super5=_createSuper2(EnterState);function EnterState(){var _this17;_classCallCheck2(this,EnterState);_this17=_super5.call(this);_this17.serGwIp='';_this17.sendIpLocDur=0;_this17.linkIpLocTimes=1;_this17.linkIpLocDur=0;_this17.sendGwDur=1;_this17.linkGwTimes=1;_this17.linkGwDur=0;_this17.sendGwEnterDur=0;_this17.enterStat=EnterStatsCode.enterSuccess;_this17.event=EventCode.ENTER_STATE;_this17.enterLiveTs=Date.now();return _this17;}return _createClass2(EnterState);}(BasicMetric);var ExitChannel=/*#__PURE__*/function(_BasicMetric3){_inherits2(ExitChannel,_BasicMetric3);var _super6=_createSuper2(ExitChannel);function ExitChannel(){var _this18;_classCallCheck2(this,ExitChannel);_this18=_super6.call(this);_this18.event=EventCode.EXIT_CHANNEL;return _this18;}return _createClass2(ExitChannel);}(BasicMetric);var MemberStatEvent;(function(MemberStatEvent){MemberStatEvent[MemberStatEvent["exit"]=0]="exit";MemberStatEvent[MemberStatEvent["join"]=1]="join";})(MemberStatEvent||(MemberStatEvent={}));var MemberState=/*#__PURE__*/function(_BasicMetric4){_inherits2(MemberState,_BasicMetric4);var _super7=_createSuper2(MemberState);function MemberState(memberId,code){var _this19;_classCallCheck2(this,MemberState);_this19=_super7.call(this);_this19.event=EventCode.MEMBER_STATE;_this19.memberId=memberId;_this19.code=code;return _this19;}return _createClass2(MemberState);}(BasicMetric);var SwitchBackgroundState=/*#__PURE__*/function(_BasicMetric5){_inherits2(SwitchBackgroundState,_BasicMetric5);var _super8=_createSuper2(SwitchBackgroundState);function SwitchBackgroundState(isBg){var _this20;_classCallCheck2(this,SwitchBackgroundState);_this20=_super8.call(this);_this20.event=EventCode.SWITCH_BACKGROUND_STATE;_this20.isBg=isBg;return _this20;}return _createClass2(SwitchBackgroundState);}(BasicMetric);var ReconnGwFinalTimeout=/*#__PURE__*/function(_BasicMetric6){_inherits2(ReconnGwFinalTimeout,_BasicMetric6);var _super9=_createSuper2(ReconnGwFinalTimeout);function ReconnGwFinalTimeout(reason){var _this21;_classCallCheck2(this,ReconnGwFinalTimeout);_this21=_super9.call(this);_this21.event=EventCode.RECONN_GW_FINAL_TIMEOUT;_this21.rsn='';_this21.rsn=reason;return _this21;}return _createClass2(ReconnGwFinalTimeout);}(BasicMetric);var OpVideoChannel=/*#__PURE__*/function(_BasicMetric7){_inherits2(OpVideoChannel,_BasicMetric7);var _super10=_createSuper2(OpVideoChannel);function OpVideoChannel(code,ip,port){var _this22;_classCallCheck2(this,OpVideoChannel);_this22=_super10.call(this);_this22.event=EventCode.OP_VIDEO_CHANNEL;_this22.videoIp='';_this22.videoPort=0;_this22.code=code;_this22.videoIp=ip;_this22.videoPort=port;return _this22;}return _createClass2(OpVideoChannel);}(BasicMetric);var OpAudioChannel=/*#__PURE__*/function(_BasicMetric8){_inherits2(OpAudioChannel,_BasicMetric8);var _super11=_createSuper2(OpAudioChannel);function OpAudioChannel(code,ip,port){var _this23;_classCallCheck2(this,OpAudioChannel);_this23=_super11.call(this);_this23.event=EventCode.OP_AUDIO_CHANNEL;_this23.audioIp='';_this23.audioPort=0;_this23.code=code;_this23.audioPort=port;_this23.audioIp=ip;return _this23;}return _createClass2(OpAudioChannel);}(BasicMetric);var UpstreamVideo=/*#__PURE__*/function(_BasicMetric9){_inherits2(UpstreamVideo,_BasicMetric9);var _super12=_createSuper2(UpstreamVideo);function UpstreamVideo(code,mediaId){var _this24;_classCallCheck2(this,UpstreamVideo);_this24=_super12.call(this);_this24.event=EventCode.UPSTREAM_VIDEO;_this24.code=code;_this24.mediaId=mediaId;return _this24;}return _createClass2(UpstreamVideo);}(BasicMetric);var TransportStatusMap;(function(TransportStatusMap){TransportStatusMap[TransportStatusMap["ConnectClosed"]=0]="ConnectClosed";TransportStatusMap[TransportStatusMap["Reconnect"]=1]="Reconnect";TransportStatusMap[TransportStatusMap["Connected"]=2]="Connected";TransportStatusMap[TransportStatusMap["ConnectFail"]=3]="ConnectFail";TransportStatusMap[TransportStatusMap["Closed"]=4]="Closed";})(TransportStatusMap||(TransportStatusMap={}));var TransportState=/*#__PURE__*/function(_BasicMetric10){_inherits2(TransportState,_BasicMetric10);var _super13=_createSuper2(TransportState);function TransportState(recTimes,stat,transportId,ip,port){var _this25;_classCallCheck2(this,TransportState);_this25=_super13.call(this);_this25.event=EventCode.CONNECT_TRANSPORT_STATE;_this25.serIp='';_this25.serPort=0;_this25.transportId='';/**
|
|
2467
2467
|
* 1: tcp
|
|
2468
2468
|
* 3: udp
|
|
2469
2469
|
*/_this25.ioType=3;_this25.transportId=transportId;_this25.recTimes=recTimes;_this25.stat=stat;_this25.serIp=ip;_this25.serPort=port;return _this25;}return _createClass2(TransportState);}(BasicMetric);var StartSendVideo=/*#__PURE__*/function(_BasicMetric11){_inherits2(StartSendVideo,_BasicMetric11);var _super14=_createSuper2(StartSendVideo);function StartSendVideo(metric){var _this26;_classCallCheck2(this,StartSendVideo);_this26=_super14.call(this);_this26.isLocalVideoMuted=0;_this26.isOpenVideo=1;_this26.event=EventCode.STARTSENDVIDEO;_this26.isLocalVideoMuted=metric.isLocalVideoMuted;_this26.isOpenVideo=metric.isOpenVideo;return _this26;}return _createClass2(StartSendVideo);}(BasicMetric);var StartSendAudio=/*#__PURE__*/function(_BasicMetric12){_inherits2(StartSendAudio,_BasicMetric12);var _super15=_createSuper2(StartSendAudio);function StartSendAudio(){var _this27;_classCallCheck2(this,StartSendAudio);_this27=_super15.apply(this,arguments);_this27.event=EventCode.STARTSENDAUDIO;return _this27;}return _createClass2(StartSendAudio);}(BasicMetric);var StopSendVideo=/*#__PURE__*/function(_BasicMetric13){_inherits2(StopSendVideo,_BasicMetric13);var _super16=_createSuper2(StopSendVideo);function StopSendVideo(metric){var _this28;_classCallCheck2(this,StopSendVideo);_this28=_super16.call(this);_this28.event=EventCode.STOPSENDVIDEO;_this28.rsn=metric.rsn;_this28.enterStat_2=metric.enterStat_2;return _this28;}return _createClass2(StopSendVideo);}(BasicMetric);var StopSendAudio=/*#__PURE__*/function(_BasicMetric14){_inherits2(StopSendAudio,_BasicMetric14);var _super17=_createSuper2(StopSendAudio);function StopSendAudio(enterState){var _this29;_classCallCheck2(this,StopSendAudio);_this29=_super17.call(this);_this29.event=EventCode.STOPSENDAUDIO;_this29.enterStat_2=enterState;return _this29;}return _createClass2(StopSendAudio);}(BasicMetric);var FirstAudioDecode=/*#__PURE__*/function(_BasicMetric15){_inherits2(FirstAudioDecode,_BasicMetric15);var _super18=_createSuper2(FirstAudioDecode);function FirstAudioDecode(userId){var _this30;_classCallCheck2(this,FirstAudioDecode);_this30=_super18.call(this);_this30.event=EventCode.FIRST_AUDIO_DECODE;_this30.enterStat_2=1;_this30.remoteUid=userId;return _this30;}return _createClass2(FirstAudioDecode);}(BasicMetric);var USERFUNC=/*#__PURE__*/_createClass2(function USERFUNC(func){var params=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'';_classCallCheck2(this,USERFUNC);this.ts=Date.now();this.func=func;this.params=params;});var USERCALLBACK=/*#__PURE__*/_createClass2(function USERCALLBACK(func){var params=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'';_classCallCheck2(this,USERCALLBACK);this.ts=Date.now();this.func=func;this.params=params;});var USERFUNCTIONLOGS=/*#__PURE__*/function(_BasicMetric16){_inherits2(USERFUNCTIONLOGS,_BasicMetric16);var _super19=_createSuper2(USERFUNCTIONLOGS);function USERFUNCTIONLOGS(funcArr){var _this31;_classCallCheck2(this,USERFUNCTIONLOGS);_this31=_super19.call(this);_this31.event=EventCode.USERFUNCLOGS;_this31.enterStat_2=1;_this31.funcArr=funcArr;return _this31;}return _createClass2(USERFUNCTIONLOGS);}(BasicMetric);var USERCALLBACKTIONLOGS=/*#__PURE__*/function(_BasicMetric17){_inherits2(USERCALLBACKTIONLOGS,_BasicMetric17);var _super20=_createSuper2(USERCALLBACKTIONLOGS);function USERCALLBACKTIONLOGS(funcArr){var _this32;_classCallCheck2(this,USERCALLBACKTIONLOGS);_this32=_super20.call(this);_this32.event=EventCode.USERCALLBACKLOGS;_this32.enterStat_2=1;_this32.funcArr=funcArr;return _this32;}return _createClass2(USERCALLBACKTIONLOGS);}(BasicMetric);var FirstVideoFrameDecode=/*#__PURE__*/function(_BasicMetric18){_inherits2(FirstVideoFrameDecode,_BasicMetric18);var _super21=_createSuper2(FirstVideoFrameDecode);function FirstVideoFrameDecode(metric){var _this33;_classCallCheck2(this,FirstVideoFrameDecode);_this33=_super21.call(this);_this33.event=EventCode.FIRST_VIDEO_FREAME_DECODE;_this33.sendUserDevInfo=metric.sendUserDevInfo;_this33.vWidth=metric.vWidth;_this33.vHeight=metric.vHeight;_this33.totDur=metric.totDur;return _this33;}return _createClass2(FirstVideoFrameDecode);}(BasicMetric);var ConnectStatus;(function(ConnectStatus){ConnectStatus[ConnectStatus["closed"]=0]="closed";ConnectStatus[ConnectStatus["reconnecting"]=1]="reconnecting";ConnectStatus[ConnectStatus["connected"]=2]="connected";ConnectStatus[ConnectStatus["connectFail"]=3]="connectFail";})(ConnectStatus||(ConnectStatus={}));var ConnectStatusChange=/*#__PURE__*/function(_BasicMetric19){_inherits2(ConnectStatusChange,_BasicMetric19);var _super22=_createSuper2(ConnectStatusChange);function ConnectStatusChange(totDur,serGwIp,stat){var _this34;_classCallCheck2(this,ConnectStatusChange);_this34=_super22.call(this);_this34.event=EventCode.CONNECTION_STATUS_CHANGE;_this34.totDur=totDur;_this34.serGwIp=serGwIp;_this34.stat=stat;return _this34;}return _createClass2(ConnectStatusChange);}(BasicMetric);var HEARTBEATREPORT=/*#__PURE__*/function(_BasicMetric20){_inherits2(HEARTBEATREPORT,_BasicMetric20);var _super23=_createSuper2(HEARTBEATREPORT);function HEARTBEATREPORT(reportInfo){var _this35;_classCallCheck2(this,HEARTBEATREPORT);_this35=_super23.call(this);_this35.event=EventCode.SDK_HEARTBEAT;_this35.userDev=reportInfo.userDev;if(reportInfo.videoInfo){_this35.videoInfo=reportInfo.videoInfo;}if(reportInfo.audioInfo){_this35.audioInfo=reportInfo.audioInfo;}return _this35;}return _createClass2(HEARTBEATREPORT);}(BasicMetric);var UserRoleChange=/*#__PURE__*/function(_BasicMetric21){_inherits2(UserRoleChange,_BasicMetric21);var _super24=_createSuper2(UserRoleChange);function UserRoleChange(role){var _this36;_classCallCheck2(this,UserRoleChange);_this36=_super24.call(this);_this36.event=EventCode.USER_ROLE;_this36.newRole=role;return _this36;}return _createClass2(UserRoleChange);}(BasicMetric);var VideoDownStreamStuck=/*#__PURE__*/function(_BasicMetric22){_inherits2(VideoDownStreamStuck,_BasicMetric22);var _super25=_createSuper2(VideoDownStreamStuck);function VideoDownStreamStuck(deviceID,dur){var _this37;_classCallCheck2(this,VideoDownStreamStuck);_this37=_super25.call(this);_this37.event=EventCode.VIDEO_DOWNSTREAM_STUCK;_this37.code=2;_this37.mediaId=deviceID;_this37.dur=dur;return _this37;}return _createClass2(VideoDownStreamStuck);}(BasicMetric);var es5=createCommonjsModule$1(function(module,exports){!function(e,t){module.exports=t();}(commonjsGlobal$1,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports;}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n});},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0});},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==_typeof_1$1(e)&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e){r.d(n,i,function(t){return e[t];}.bind(null,i));}return n;},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"];}:function(){return e;};return r.d(t,"a",t),t;},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t);},r.p="",r(r.s=90);}({17:function _(e,t,r){t.__esModule=!0,t["default"]=void 0;var n=r(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var r=t.match(e);return r&&r.length>0&&r[1]||"";},e.getSecondMatch=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||"";},e.matchAndReturnConst=function(e,t,r){if(e.test(t))return r;},e.getWindowsVersionName=function(e){switch(e){case"NT":return "NT";case"XP":return "XP";case"NT 5.0":return "2000";case"NT 5.1":return "XP";case"NT 5.2":return "2003";case"NT 6.0":return "Vista";case"NT 6.1":return "7";case"NT 6.2":return "8";case"NT 6.3":return "8.1";case"NT 10.0":return "10";default:return;}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0;});if(t.push(0),10===t[0])switch(t[1]){case 5:return "Leopard";case 6:return "Snow Leopard";case 7:return "Lion";case 8:return "Mountain Lion";case 9:return "Mavericks";case 10:return "Yosemite";case 11:return "El Capitan";case 12:return "Sierra";case 13:return "High Sierra";case 14:return "Mojave";case 15:return "Catalina";default:return;}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0;});if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0;},e.getVersionPrecision=function(e){return e.split(".").length;},e.compareVersions=function(t,r,n){void 0===n&&(n=!1);var i=e.getVersionPrecision(t),s=e.getVersionPrecision(r),a=Math.max(i,s),o=0,u=e.map([t,r],function(t){var r=a-e.getVersionPrecision(t),n=t+new Array(r+1).join(".0");return e.map(n.split("."),function(e){return new Array(20-e.length).join("0")+e;}).reverse();});for(n&&(o=a-Math.min(i,s)),a-=1;a>=o;){if(u[0][a]>u[1][a])return 1;if(u[0][a]===u[1][a]){if(a===o)return 0;a-=1;}else if(u[0][a]<u[1][a])return -1;}},e.map=function(e,t){var r,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1){n.push(t(e[r]));}return n;},e.find=function(e,t){var r,n;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(r=0,n=e.length;r<n;r+=1){var i=e[r];if(t(i,r))return i;}},e.assign=function(e){for(var t,r,n=e,i=arguments.length,s=new Array(i>1?i-1:0),a=1;a<i;a++){s[a-1]=arguments[a];}if(Object.assign)return Object.assign.apply(Object,[e].concat(s));var o=function o(){var e=s[t];"object"==_typeof_1$1(e)&&null!==e&&Object.keys(e).forEach(function(t){n[t]=e[t];});};for(t=0,r=s.length;t<r;t+=1){o();}return e;},e.getBrowserAlias=function(e){return n.BROWSER_ALIASES_MAP[e];},e.getBrowserTypeByAlias=function(e){return n.BROWSER_MAP[e]||"";},e;}();t["default"]=i,e.exports=t["default"];},18:function _(e,t,r){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0;t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"};t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"};t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"};t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"};t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};},90:function _(e,t,r){t.__esModule=!0,t["default"]=void 0;var n,i=(n=r(91))&&n.__esModule?n:{"default":n},s=r(18);function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n);}}var o=function(){function e(){}var t,r,n;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i["default"](e,t);},e.parse=function(e){return new i["default"](e).getResult();},t=e,n=[{key:"BROWSER_MAP",get:function get(){return s.BROWSER_MAP;}},{key:"ENGINE_MAP",get:function get(){return s.ENGINE_MAP;}},{key:"OS_MAP",get:function get(){return s.OS_MAP;}},{key:"PLATFORMS_MAP",get:function get(){return s.PLATFORMS_MAP;}}],(r=null)&&a(t.prototype,r),n&&a(t,n),e;}();t["default"]=o,e.exports=t["default"];},91:function _(e,t,r){t.__esModule=!0,t["default"]=void 0;var n=u(r(92)),i=u(r(93)),s=u(r(94)),a=u(r(95)),o=u(r(17));function u(e){return e&&e.__esModule?e:{"default":e};}var d=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse();}var t=e.prototype;return t.getUA=function(){return this._ua;},t.test=function(e){return e.test(this._ua);},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=o["default"].find(n["default"],function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some(function(t){return e.test(t);});throw new Error("Browser's test function is not valid");});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser;},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser();},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||"";},t.getBrowserVersion=function(){return this.getBrowser().version;},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS();},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=o["default"].find(i["default"],function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some(function(t){return e.test(t);});throw new Error("Browser's test function is not valid");});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os;},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||"";},t.getOSVersion=function(){return this.getOS().version;},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform();},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||"";},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=o["default"].find(s["default"],function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some(function(t){return e.test(t);});throw new Error("Browser's test function is not valid");});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform;},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine();},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||"";},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=o["default"].find(a["default"],function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some(function(t){return e.test(t);});throw new Error("Browser's test function is not valid");});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine;},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this;},t.getResult=function(){return o["default"].assign({},this.parsedResult);},t.satisfies=function(e){var t=this,r={},n=0,i={},s=0;if(Object.keys(e).forEach(function(t){var a=e[t];"string"==typeof a?(i[t]=a,s+=1):"object"==_typeof_1$1(a)&&(r[t]=a,n+=1);}),n>0){var a=Object.keys(r),u=o["default"].find(a,function(e){return t.isOS(e);});if(u){var d=this.satisfies(r[u]);if(void 0!==d)return d;}var c=o["default"].find(a,function(e){return t.isPlatform(e);});if(c){var f=this.satisfies(r[c]);if(void 0!==f)return f;}}if(s>0){var l=Object.keys(i),h=o["default"].find(l,function(e){return t.isBrowser(e,!0);});if(void 0!==h)return this.compareVersion(i[h]);}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var r=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),i=o["default"].getBrowserTypeByAlias(n);return t&&i&&(n=i.toLowerCase()),n===r;},t.compareVersion=function(e){var t=[0],r=e,n=!1,i=this.getBrowserVersion();if("string"==typeof i)return ">"===e[0]||"<"===e[0]?(r=e.substr(1),"="===e[1]?(n=!0,r=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?r=e.substr(1):"~"===e[0]&&(n=!0,r=e.substr(1)),t.indexOf(o["default"].compareVersions(i,r,n))>-1;},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase();},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase();},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase();},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e);},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some(function(e){return t.is(e);});},e;}();t["default"]=d,e.exports=t["default"];},92:function _(e,t,r){t.__esModule=!0,t["default"]=void 0;var n,i=(n=r(17))&&n.__esModule?n:{"default":n};var s=/version\/(\d+(\.?_?\d+)+)/i,a=[{test:[/googlebot/i],describe:function describe(e){var t={name:"Googlebot"},r=i["default"].getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i["default"].getFirstMatch(s,e);return r&&(t.version=r),t;}},{test:[/opera/i],describe:function describe(e){var t={name:"Opera"},r=i["default"].getFirstMatch(s,e)||i["default"].getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:[/opr\/|opios/i],describe:function describe(e){var t={name:"Opera"},r=i["default"].getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i["default"].getFirstMatch(s,e);return r&&(t.version=r),t;}},{test:[/SamsungBrowser/i],describe:function describe(e){var t={name:"Samsung Internet for Android"},r=i["default"].getFirstMatch(s,e)||i["default"].getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:[/Whale/i],describe:function describe(e){var t={name:"NAVER Whale Browser"},r=i["default"].getFirstMatch(s,e)||i["default"].getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t;}},{test:[/MZBrowser/i],describe:function describe(e){var t={name:"MZ Browser"},r=i["default"].getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i["default"].getFirstMatch(s,e);return r&&(t.version=r),t;}},{test:[/focus/i],describe:function describe(e){var t={name:"Focus"},r=i["default"].getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i["default"].getFirstMatch(s,e);return r&&(t.version=r),t;}},{test:[/swing/i],describe:function describe(e){var t={name:"Swing"},r=i["default"].getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i["default"].getFirstMatch(s,e);return r&&(t.version=r),t;}},{test:[/coast/i],describe:function describe(e){var t={name:"Opera Coast"},r=i["default"].getFirstMatch(s,e)||i["default"].getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function describe(e){var t={name:"Opera Touch"},r=i["default"].getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i["default"].getFirstMatch(s,e);return r&&(t.version=r),t;}},{test:[/yabrowser/i],describe:function describe(e){var t={name:"Yandex Browser"},r=i["default"].getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i["default"].getFirstMatch(s,e);return r&&(t.version=r),t;}},{test:[/ucbrowser/i],describe:function describe(e){var t={name:"UC Browser"},r=i["default"].getFirstMatch(s,e)||i["default"].getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:[/Maxthon|mxios/i],describe:function describe(e){var t={name:"Maxthon"},r=i["default"].getFirstMatch(s,e)||i["default"].getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:[/epiphany/i],describe:function describe(e){var t={name:"Epiphany"},r=i["default"].getFirstMatch(s,e)||i["default"].getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:[/puffin/i],describe:function describe(e){var t={name:"Puffin"},r=i["default"].getFirstMatch(s,e)||i["default"].getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:[/sleipnir/i],describe:function describe(e){var t={name:"Sleipnir"},r=i["default"].getFirstMatch(s,e)||i["default"].getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:[/k-meleon/i],describe:function describe(e){var t={name:"K-Meleon"},r=i["default"].getFirstMatch(s,e)||i["default"].getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:[/micromessenger/i],describe:function describe(e){var t={name:"WeChat"},r=i["default"].getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i["default"].getFirstMatch(s,e);return r&&(t.version=r),t;}},{test:[/qqbrowser/i],describe:function describe(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},r=i["default"].getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i["default"].getFirstMatch(s,e);return r&&(t.version=r),t;}},{test:[/msie|trident/i],describe:function describe(e){var t={name:"Internet Explorer"},r=i["default"].getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:[/\sedg\//i],describe:function describe(e){var t={name:"Microsoft Edge"},r=i["default"].getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:[/edg([ea]|ios)/i],describe:function describe(e){var t={name:"Microsoft Edge"},r=i["default"].getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:[/vivaldi/i],describe:function describe(e){var t={name:"Vivaldi"},r=i["default"].getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:[/seamonkey/i],describe:function describe(e){var t={name:"SeaMonkey"},r=i["default"].getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:[/sailfish/i],describe:function describe(e){var t={name:"Sailfish"},r=i["default"].getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return r&&(t.version=r),t;}},{test:[/silk/i],describe:function describe(e){var t={name:"Amazon Silk"},r=i["default"].getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:[/phantom/i],describe:function describe(e){var t={name:"PhantomJS"},r=i["default"].getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:[/slimerjs/i],describe:function describe(e){var t={name:"SlimerJS"},r=i["default"].getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function describe(e){var t={name:"BlackBerry"},r=i["default"].getFirstMatch(s,e)||i["default"].getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:[/(web|hpw)[o0]s/i],describe:function describe(e){var t={name:"WebOS Browser"},r=i["default"].getFirstMatch(s,e)||i["default"].getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:[/bada/i],describe:function describe(e){var t={name:"Bada"},r=i["default"].getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:[/tizen/i],describe:function describe(e){var t={name:"Tizen"},r=i["default"].getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i["default"].getFirstMatch(s,e);return r&&(t.version=r),t;}},{test:[/qupzilla/i],describe:function describe(e){var t={name:"QupZilla"},r=i["default"].getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i["default"].getFirstMatch(s,e);return r&&(t.version=r),t;}},{test:[/firefox|iceweasel|fxios/i],describe:function describe(e){var t={name:"Firefox"},r=i["default"].getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:[/electron/i],describe:function describe(e){var t={name:"Electron"},r=i["default"].getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:[/MiuiBrowser/i],describe:function describe(e){var t={name:"Miui"},r=i["default"].getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:[/chromium/i],describe:function describe(e){var t={name:"Chromium"},r=i["default"].getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i["default"].getFirstMatch(s,e);return r&&(t.version=r),t;}},{test:[/chrome|crios|crmo/i],describe:function describe(e){var t={name:"Chrome"},r=i["default"].getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:[/GSA/i],describe:function describe(e){var t={name:"Google Search"},r=i["default"].getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:function test(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r;},describe:function describe(e){var t={name:"Android Browser"},r=i["default"].getFirstMatch(s,e);return r&&(t.version=r),t;}},{test:[/playstation 4/i],describe:function describe(e){var t={name:"PlayStation 4"},r=i["default"].getFirstMatch(s,e);return r&&(t.version=r),t;}},{test:[/safari|applewebkit/i],describe:function describe(e){var t={name:"Safari"},r=i["default"].getFirstMatch(s,e);return r&&(t.version=r),t;}},{test:[/.*/i],describe:function describe(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return {name:i["default"].getFirstMatch(t,e),version:i["default"].getSecondMatch(t,e)};}}];t["default"]=a,e.exports=t["default"];},93:function _(e,t,r){t.__esModule=!0,t["default"]=void 0;var n,i=(n=r(17))&&n.__esModule?n:{"default":n},s=r(18);var a=[{test:[/Roku\/DVP/],describe:function describe(e){var t=i["default"].getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return {name:s.OS_MAP.Roku,version:t};}},{test:[/windows phone/i],describe:function describe(e){var t=i["default"].getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return {name:s.OS_MAP.WindowsPhone,version:t};}},{test:[/windows /i],describe:function describe(e){var t=i["default"].getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),r=i["default"].getWindowsVersionName(t);return {name:s.OS_MAP.Windows,version:t,versionName:r};}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function describe(e){var t={name:s.OS_MAP.iOS},r=i["default"].getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return r&&(t.version=r),t;}},{test:[/macintosh/i],describe:function describe(e){var t=i["default"].getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),r=i["default"].getMacOSVersionName(t),n={name:s.OS_MAP.MacOS,version:t};return r&&(n.versionName=r),n;}},{test:[/(ipod|iphone|ipad)/i],describe:function describe(e){var t=i["default"].getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return {name:s.OS_MAP.iOS,version:t};}},{test:function test(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r;},describe:function describe(e){var t=i["default"].getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),r=i["default"].getAndroidVersionName(t),n={name:s.OS_MAP.Android,version:t};return r&&(n.versionName=r),n;}},{test:[/(web|hpw)[o0]s/i],describe:function describe(e){var t=i["default"].getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),r={name:s.OS_MAP.WebOS};return t&&t.length&&(r.version=t),r;}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function describe(e){var t=i["default"].getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i["default"].getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i["default"].getFirstMatch(/\bbb(\d+)/i,e);return {name:s.OS_MAP.BlackBerry,version:t};}},{test:[/bada/i],describe:function describe(e){var t=i["default"].getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return {name:s.OS_MAP.Bada,version:t};}},{test:[/tizen/i],describe:function describe(e){var t=i["default"].getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return {name:s.OS_MAP.Tizen,version:t};}},{test:[/linux/i],describe:function describe(){return {name:s.OS_MAP.Linux};}},{test:[/CrOS/],describe:function describe(){return {name:s.OS_MAP.ChromeOS};}},{test:[/PlayStation 4/],describe:function describe(e){var t=i["default"].getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return {name:s.OS_MAP.PlayStation4,version:t};}}];t["default"]=a,e.exports=t["default"];},94:function _(e,t,r){t.__esModule=!0,t["default"]=void 0;var n,i=(n=r(17))&&n.__esModule?n:{"default":n},s=r(18);var a=[{test:[/googlebot/i],describe:function describe(){return {type:"bot",vendor:"Google"};}},{test:[/huawei/i],describe:function describe(e){var t=i["default"].getFirstMatch(/(can-l01)/i,e)&&"Nova",r={type:s.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(r.model=t),r;}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function describe(){return {type:s.PLATFORMS_MAP.tablet,vendor:"Nexus"};}},{test:[/ipad/i],describe:function describe(){return {type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"};}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function describe(){return {type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"};}},{test:[/kftt build/i],describe:function describe(){return {type:s.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"};}},{test:[/silk/i],describe:function describe(){return {type:s.PLATFORMS_MAP.tablet,vendor:"Amazon"};}},{test:[/tablet(?! pc)/i],describe:function describe(){return {type:s.PLATFORMS_MAP.tablet};}},{test:function test(e){var t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r;},describe:function describe(e){var t=i["default"].getFirstMatch(/(ipod|iphone)/i,e);return {type:s.PLATFORMS_MAP.mobile,vendor:"Apple",model:t};}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function describe(){return {type:s.PLATFORMS_MAP.mobile,vendor:"Nexus"};}},{test:[/[^-]mobi/i],describe:function describe(){return {type:s.PLATFORMS_MAP.mobile};}},{test:function test(e){return "blackberry"===e.getBrowserName(!0);},describe:function describe(){return {type:s.PLATFORMS_MAP.mobile,vendor:"BlackBerry"};}},{test:function test(e){return "bada"===e.getBrowserName(!0);},describe:function describe(){return {type:s.PLATFORMS_MAP.mobile};}},{test:function test(e){return "windows phone"===e.getBrowserName();},describe:function describe(){return {type:s.PLATFORMS_MAP.mobile,vendor:"Microsoft"};}},{test:function test(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return "android"===e.getOSName(!0)&&t>=3;},describe:function describe(){return {type:s.PLATFORMS_MAP.tablet};}},{test:function test(e){return "android"===e.getOSName(!0);},describe:function describe(){return {type:s.PLATFORMS_MAP.mobile};}},{test:function test(e){return "macos"===e.getOSName(!0);},describe:function describe(){return {type:s.PLATFORMS_MAP.desktop,vendor:"Apple"};}},{test:function test(e){return "windows"===e.getOSName(!0);},describe:function describe(){return {type:s.PLATFORMS_MAP.desktop};}},{test:function test(e){return "linux"===e.getOSName(!0);},describe:function describe(){return {type:s.PLATFORMS_MAP.desktop};}},{test:function test(e){return "playstation 4"===e.getOSName(!0);},describe:function describe(){return {type:s.PLATFORMS_MAP.tv};}},{test:function test(e){return "roku"===e.getOSName(!0);},describe:function describe(){return {type:s.PLATFORMS_MAP.tv};}}];t["default"]=a,e.exports=t["default"];},95:function _(e,t,r){t.__esModule=!0,t["default"]=void 0;var n,i=(n=r(17))&&n.__esModule?n:{"default":n},s=r(18);var a=[{test:function test(e){return "microsoft edge"===e.getBrowserName(!0);},describe:function describe(e){if(/\sedg\//i.test(e))return {name:s.ENGINE_MAP.Blink};var t=i["default"].getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return {name:s.ENGINE_MAP.EdgeHTML,version:t};}},{test:[/trident/i],describe:function describe(e){var t={name:s.ENGINE_MAP.Trident},r=i["default"].getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:function test(e){return e.test(/presto/i);},describe:function describe(e){var t={name:s.ENGINE_MAP.Presto},r=i["default"].getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:function test(e){var t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r;},describe:function describe(e){var t={name:s.ENGINE_MAP.Gecko},r=i["default"].getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}},{test:[/(apple)?webkit\/537\.36/i],describe:function describe(){return {name:s.ENGINE_MAP.Blink};}},{test:[/(apple)?webkit/i],describe:function describe(e){var t={name:s.ENGINE_MAP.WebKit},r=i["default"].getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t;}}];t["default"]=a,e.exports=t["default"];}});});});var bowser=/*@__PURE__*/getDefaultExportFromCjs$1(es5);var APP_NAME$1='mediasoup-client';var Logger$1=/*#__PURE__*/function(){function Logger(prefix){classCallCheck$1(this,Logger);if(prefix){this._debug=browser$1["default"]("".concat(APP_NAME$1,":").concat(prefix));this._warn=browser$1["default"]("".concat(APP_NAME$1,":WARN:").concat(prefix));this._error=browser$1["default"]("".concat(APP_NAME$1,":ERROR:").concat(prefix));}else {this._debug=browser$1["default"](APP_NAME$1);this._warn=browser$1["default"]("".concat(APP_NAME$1,":WARN"));this._error=browser$1["default"]("".concat(APP_NAME$1,":ERROR"));}/* eslint-disable no-console */this._debug.log=console.info.bind(console);this._warn.log=console.warn.bind(console);this._error.log=console.error.bind(console);/* eslint-enable no-console */}createClass$1(Logger,[{key:"debug",get:function get(){return this._debug;}},{key:"warn",get:function get(){return this._warn;}},{key:"error",get:function get(){return this._error;}}]);return Logger;}();var Logger_2=Logger$1;var Logger_1$1=/*#__PURE__*/Object.defineProperty({Logger:Logger_2},'__esModule',{value:true});function _createSuper$3(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct$3();return function _createSuperInternal(){var Super=getPrototypeOf$1(Derived),result;if(hasNativeReflectConstruct){var NewTarget=getPrototypeOf$1(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else {result=Super.apply(this,arguments);}return possibleConstructorReturn$1(this,result);};}function _isNativeReflectConstruct$3(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}var logger$3=new Logger_1$1.Logger('EnhancedEventEmitter');var EnhancedEventEmitter$1=/*#__PURE__*/function(_events_1$EventEmitte){inherits$1(EnhancedEventEmitter,_events_1$EventEmitte);var _super=_createSuper$3(EnhancedEventEmitter);function EnhancedEventEmitter(){var _this;classCallCheck$1(this,EnhancedEventEmitter);_this=_super.call(this);_this.setMaxListeners(Infinity);return _this;}createClass$1(EnhancedEventEmitter,[{key:"safeEmit",value:function safeEmit(event){var numListeners=this.listenerCount(event);try{for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key];}return this.emit.apply(this,[event].concat(args));}catch(error){logger$3.error('safeEmit() | event listener threw an error [event:%s]:%o',event,error);return Boolean(numListeners);}}},{key:"safeEmitAsPromise",value:function(){var _safeEmitAsPromise=asyncToGenerator(/*#__PURE__*/regenerator$1.mark(function _callee(event){var _this2=this;var _len2,args,_key2,_args=arguments;return regenerator$1.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:for(_len2=_args.length,args=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){args[_key2-1]=_args[_key2];}return _context.abrupt("return",new Promise(function(resolve,reject){try{_this2.emit.apply(_this2,[event].concat(args,[resolve,reject]));}catch(error){logger$3.error('safeEmitAsPromise() | event listener threw an error [event:%s]:%o',event,error);reject(error);}}));case 2:case"end":return _context.stop();}}},_callee);}));function safeEmitAsPromise(_x){return _safeEmitAsPromise.apply(this,arguments);}return safeEmitAsPromise;}()}]);return EnhancedEventEmitter;}(events.EventEmitter);var EnhancedEventEmitter_2=EnhancedEventEmitter$1;var EnhancedEventEmitter_1$1=/*#__PURE__*/Object.defineProperty({EnhancedEventEmitter:EnhancedEventEmitter_2},'__esModule',{value:true});function _isNativeFunction(fn){return Function.toString.call(fn).indexOf("[native code]")!==-1;}var isNativeFunction$1=_isNativeFunction;function _isNativeReflectConstruct$4(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}var isNativeReflectConstruct$1=_isNativeReflectConstruct$4;var construct$1=createCommonjsModule$1(function(module){function _construct(Parent,args,Class){if(isNativeReflectConstruct$1()){module.exports=_construct=Reflect.construct;}else {module.exports=_construct=function _construct(Parent,args,Class){var a=[null];a.push.apply(a,args);var Constructor=Function.bind.apply(Parent,a);var instance=new Constructor();if(Class)setPrototypeOf$1(instance,Class.prototype);return instance;};}return _construct.apply(null,arguments);}module.exports=_construct;});var wrapNativeSuper$1=createCommonjsModule$1(function(module){function _wrapNativeSuper(Class){var _cache=typeof Map==="function"?new Map():undefined;module.exports=_wrapNativeSuper=function _wrapNativeSuper(Class){if(Class===null||!isNativeFunction$1(Class))return Class;if(typeof Class!=="function"){throw new TypeError("Super expression must either be null or a function");}if(typeof _cache!=="undefined"){if(_cache.has(Class))return _cache.get(Class);_cache.set(Class,Wrapper);}function Wrapper(){return construct$1(Class,arguments,getPrototypeOf$1(this).constructor);}Wrapper.prototype=Object.create(Class.prototype,{constructor:{value:Wrapper,enumerable:false,writable:true,configurable:true}});return setPrototypeOf$1(Wrapper,Class);};return _wrapNativeSuper(Class);}module.exports=_wrapNativeSuper;});function _createSuper$4(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct$5();return function _createSuperInternal(){var Super=getPrototypeOf$1(Derived),result;if(hasNativeReflectConstruct){var NewTarget=getPrototypeOf$1(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else {result=Super.apply(this,arguments);}return possibleConstructorReturn$1(this,result);};}function _isNativeReflectConstruct$5(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}var UnsupportedError=/*#__PURE__*/function(_Error){inherits$1(UnsupportedError,_Error);var _super=_createSuper$4(UnsupportedError);function UnsupportedError(message){var _this;classCallCheck$1(this,UnsupportedError);_this=_super.call(this,message);_this.name='UnsupportedError';if(Error.hasOwnProperty('captureStackTrace'))// Just in V8.
|
|
@@ -4192,11 +4192,11 @@ handler(e);});};};/**
|
|
|
4192
4192
|
*/var RoleMap;(function(RoleMap){RoleMap[RoleMap["host"]=1]="host";RoleMap[RoleMap["audience"]=2]="audience";})(RoleMap||(RoleMap={}));var SUPPORT_RESOLUTION_LIST={'90p':parseVideoEncoder(160,90),'90p_1':parseVideoEncoder(160,90),'120p':parseVideoEncoder(160,120,15,30,65),'120p_1':parseVideoEncoder(160,120,15,30,65),'120p_3':parseVideoEncoder(120,120,15,30,50),'120p_4':parseVideoEncoder(212,120),'180p':parseVideoEncoder(320,180,15,30,140),'180p_1':parseVideoEncoder(320,180,15,30,140),'180p_3':parseVideoEncoder(180,180,15,30,100),'180p_4':parseVideoEncoder(240,180,15,30,120),'240p':parseVideoEncoder(320,240,15,40,200),'240p_1':parseVideoEncoder(320,240,15,40,200),'240p_3':parseVideoEncoder(240,240,15,40,140),'240p_4':parseVideoEncoder(424,240,15,40,220),'360p':parseVideoEncoder(640,360,15,80,400),'360p_1':parseVideoEncoder(640,360,15,80,400),'360p_3':parseVideoEncoder(360,360,15,80,260),'360p_4':parseVideoEncoder(640,360,30,80,600),'360p_6':parseVideoEncoder(360,360,30,80,400),'360p_7':parseVideoEncoder(480,360,15,80,320),'360p_8':parseVideoEncoder(480,360,30,80,490),'360p_9':parseVideoEncoder(640,360,15,80,800),'360p_10':parseVideoEncoder(640,360,24,80,800),'360p_11':parseVideoEncoder(640,360,24,80,1e3),'480p':parseVideoEncoder(640,480,15,100,500),'480p_1':parseVideoEncoder(640,480,15,100,500),'480p_2':parseVideoEncoder(640,480,30,100,1e3),'480p_3':parseVideoEncoder(480,480,15,100,400),'480p_4':parseVideoEncoder(640,480,30,100,750),'480p_6':parseVideoEncoder(480,480,30,100,600),'480p_8':parseVideoEncoder(848,480,15,100,610),'480p_9':parseVideoEncoder(848,480,30,100,930),'480p_10':parseVideoEncoder(640,480,10,100,400),'720p':parseVideoEncoder(1280,720,15,120,1130),'720p_1':parseVideoEncoder(1280,720,15,120,1130),'720p_2':parseVideoEncoder(1280,720,30,120,2e3),'720p_3':parseVideoEncoder(1280,720,30,120,1710),'720p_5':parseVideoEncoder(960,720,15,120,910),'720p_6':parseVideoEncoder(960,720,30,120,1380),'1080p':parseVideoEncoder(1920,1080,15,120,2080),'1080p_1':parseVideoEncoder(1920,1080,15,120,2080),'1080p_2':parseVideoEncoder(1920,1080,30,120,3e3),'1080p_3':parseVideoEncoder(1920,1080,30,120,3150),'1080p_5':parseVideoEncoder(1920,1080,60,120,4780),'1440p':parseVideoEncoder(2560,1440,30,120,4850),'1440p_1':parseVideoEncoder(2560,1440,30,120,4850),'1440p_2':parseVideoEncoder(2560,1440,60,120,7350),'4k':parseVideoEncoder(3840,2160,30,120,8910),'4k_1':parseVideoEncoder(3840,2160,30,120,8910),'4k_3':parseVideoEncoder(3840,2160,60,120,13500)};/**
|
|
4193
4193
|
* @ignore
|
|
4194
4194
|
*/function parseVideoEncoder(width,height,frameRate,bitrateMin,bitrateMax){return {width:width,height:height,frameRate:frameRate,bitrateMin:bitrateMin,bitrateMax:bitrateMax};}var getDevicesByKind=function getDevicesByKind(kind){return new Promise(function(resolve){mediaDevices.enumerateDevices().then(function(deviceInfo){deviceInfo=deviceInfo.filter(function(device){return device.kind===kind;});resolve(deviceInfo);});});};var getusermedia=function getusermedia(constraints){return __awaiter(void 0,void 0,void 0,/*#__PURE__*/regenerator.mark(function _callee19(){var video,audio,stream;return regenerator.wrap(function _callee19$(_context19){while(1){switch(_context19.prev=_context19.next){case 0:if(!(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia)){_context19.next=2;break;}throw new CoreRTCError(CoreRTCErrorCode.NOT_SUPPORTED,'can not find getUserMedia');case 2:video=constraints.video,audio=constraints.audio;_context19.next=5;return navigator.mediaDevices.getUserMedia({video:video,audio:audio});case 5:stream=_context19.sent;return _context19.abrupt("return",stream);case 7:case"end":return _context19.stop();}}},_callee19);}));};var BrowserInfo=bowser.getParser(window.navigator.userAgent);function getHandlerName(){var name;if(isIOS()&&isWeChat()){if(typeof RTCRtpTransceiver!=='undefined'&&// eslint-disable-next-line no-prototype-builtins
|
|
4195
|
-
RTCRtpTransceiver.prototype.hasOwnProperty('currentDirection')){name='Safari12';}else {name='Safari11';}}return name;}function isFirefox(){return BrowserInfo.getBrowserName(true)==='firefox';}function isSafari(){return BrowserInfo.getBrowserName(true)==='safari';}function isIOS(){return BrowserInfo.getOSName(true)==='ios';}function isMobileSafari(){return isSafari()&&navigator.maxTouchPoints>0;}function isIOS15(){return BrowserInfo.getOSName(true)==='ios'&&parseInt(BrowserInfo.getBrowserVersion())===15;}function isAndroid(){return BrowserInfo.getOSName(true)==='android';}function isChrome(){return BrowserInfo.getBrowserName(true)==='chrome';}function isWeChat(){return BrowserInfo.getBrowserName(true)==='wechat';}function isSafari15(){return BrowserInfo.getBrowserName(true)==='safari'&&parseInt(BrowserInfo.getBrowserVersion())===15;}function getOsVersion(){return BrowserInfo.getOSVersion();}function Sleep(time){return new Promise(function(resolve){window.setTimeout(resolve,time);});}function uuid(){var s=[];var hexDigits='0123456789abcdef';for(var i=0;i<36;i++){s[i]=hexDigits
|
|
4196
|
-
s[19]=hexDigits
|
|
4195
|
+
RTCRtpTransceiver.prototype.hasOwnProperty('currentDirection')){name='Safari12';}else {name='Safari11';}}return name;}function isFirefox(){return BrowserInfo.getBrowserName(true)==='firefox';}function isSafari(){return BrowserInfo.getBrowserName(true)==='safari';}function isIOS(){return BrowserInfo.getOSName(true)==='ios';}function isMobileSafari(){return isSafari()&&navigator.maxTouchPoints>0;}function isIOS15(){return BrowserInfo.getOSName(true)==='ios'&&parseInt(BrowserInfo.getBrowserVersion())===15;}function isAndroid(){return BrowserInfo.getOSName(true)==='android';}function isChrome(){return BrowserInfo.getBrowserName(true)==='chrome';}function isWeChat(){return BrowserInfo.getBrowserName(true)==='wechat';}function isSafari15(){return BrowserInfo.getBrowserName(true)==='safari'&&parseInt(BrowserInfo.getBrowserVersion())===15;}function getOsVersion(){return BrowserInfo.getOSVersion();}function Sleep(time){return new Promise(function(resolve){window.setTimeout(resolve,time);});}function uuid(){var s=[];var hexDigits='0123456789abcdef';for(var i=0;i<36;i++){s[i]=hexDigits[Math.floor(Math.random()*0x10)];}s[14]='4';// bits 12-15 of the time_hi_and_version field to 0010
|
|
4196
|
+
s[19]=hexDigits[s[19]&0x3|0x8];// bits 6-7 of the clock_seq_hi_and_reserved to 01
|
|
4197
4197
|
s[8]=s[13]=s[18]=s[23]='-';return s.join('');}function isInt64(num){return num===_long.fromString(num).toString();}function checkIsBoolean(param){return typeof param==='boolean';}function compareDeviceList(oldList,newList){var ret={pub:_toConsumableArray(newList),unpub:_toConsumableArray(oldList)};var _loop5=function _loop5(i){for(var j=0;j<ret.pub.length;j++){if(oldList[i].id===ret.pub[j].id){if(oldList[i].inuse!==ret.pub[j].inuse){if(ret.pub[j].inuse){// inuse变为true, 删除掉unpub提示
|
|
4198
4198
|
ret.unpub=ret.unpub.filter(function(_ref11){var id=_ref11.id;return id!==oldList[i].id;});}else {ret.pub.splice(j,1);}}else {// inuse没变化,不提示任何
|
|
4199
|
-
ret.pub.splice(j,1);ret.unpub=ret.unpub.filter(function(_ref13){var id=_ref13.id;return id!==oldList[i].id;});}break;}}};for(var i=0;i<oldList.length;i++){_loop5(i);}return ret;}function getSignalGateway(iplocUrl,appId,userId,connectId){var request={eType:1,mProtocolMsg:{sClientVer:'V6.1.5-alpha-
|
|
4199
|
+
ret.pub.splice(j,1);ret.unpub=ret.unpub.filter(function(_ref13){var id=_ref13.id;return id!==oldList[i].id;});}break;}}};for(var i=0;i<oldList.length;i++){_loop5(i);}return ret;}function getSignalGateway(iplocUrl,appId,userId,connectId){var request={eType:1,mProtocolMsg:{sClientVer:'V6.1.5-alpha-19',eUEType:6,sAppID:appId,nUserID:userId,sConnectID:connectId,bReConnect:false}};return new Promise(function(resolve,reject){var startTime=Date.now();var linkIpLocDur=0;var sendIpLocDur=0;var ws=new WebSocket(iplocUrl);ws.onmessage=function(event){var _a,_b,_c,_d;try{var msg=JSON.parse(event.data);if(msg.eResult!==1){throw new Error(event.data);}if(((_b=(_a=msg.mProtocolMsg)===null||_a===void 0?void 0:_a.mGWIpAddrMsgList)===null||_b===void 0?void 0:_b.length)<=0){throw new Error("Invalid msg ".concat(event.data));}var GWIpAddrMsg=msg.mProtocolMsg.mGWIpAddrMsgList[0];var domain=(_c=GWIpAddrMsg===null||GWIpAddrMsg===void 0?void 0:GWIpAddrMsg.sDomain)===null||_c===void 0?void 0:_c.trim();if(!domain||domain===''){throw new Error("Invalid domain ".concat(domain));}ws.close();var enableGzip=false;(_d=msg.mProtocolMsg.mRtcPolicyMsgList)===null||_d===void 0?void 0:_d.forEach(function(list){var _a;try{var ipLocConfig=JSON.parse(list.sRtcPolicyValue);if((_a=ipLocConfig===null||ipLocConfig===void 0?void 0:ipLocConfig.webConfig)===null||_a===void 0?void 0:_a.logGzip){enableGzip=true;}}catch(e){console.warn(' cannot parse iploc config');}});sendIpLocDur=Date.now()-startTime;resolve({domain:domain,ip:GWIpAddrMsg.sIp,port:GWIpAddrMsg.nPort,sendIpLocDur:sendIpLocDur,linkIpLocDur:linkIpLocDur,enableGzip:enableGzip});}catch(e){ws.close();reject("iplocation fail - appId: ".concat(appId,", userId: ").concat(userId,", iplocUrl: ").concat(iplocUrl,", ").concat(e));}};ws.onopen=function(){linkIpLocDur=Date.now()-startTime;startTime=Date.now();ws.send(JSON.stringify(request));};ws.onerror=function(){reject("");};});}// 屏幕共享
|
|
4200
4200
|
function getScreenStream(config){return __awaiter(this,void 0,void 0,/*#__PURE__*/regenerator.mark(function _callee20(){var _video,captureStream;return regenerator.wrap(function _callee20$(_context20){while(1){switch(_context20.prev=_context20.next){case 0:if(!(!navigator.mediaDevices||!navigator.mediaDevices.getDisplayMedia)){_context20.next=2;break;}throw new CoreRTCError(CoreRTCErrorCode.NOT_SUPPORTED,'can not find getDisplayMedia');case 2:_video={width:config.screen.width,height:config.screen.height,frameRate:config.screen.frameRate,displaySurface:'screen'===config.screen.mediaSource?'monitor':config.screen.mediaSource};// @ts-ignore
|
|
4201
4201
|
_context20.next=5;return navigator.mediaDevices.getDisplayMedia({video:_video,audio:config.screenAudio});case 5:captureStream=_context20.sent;return _context20.abrupt("return",captureStream);case 7:case"end":return _context20.stop();}}},_callee20);}));}function resolutionFormatFuc(width,height,frameRate){return {width:{max:width},height:{max:height},frameRate:frameRate};}var resolutionDictionary={'480p':resolutionFormatFuc(640,480,5),'480p_1':resolutionFormatFuc(640,480,5),'480p_2':resolutionFormatFuc(640,480,30),'480p_3':resolutionFormatFuc(640,480,15),'720p':resolutionFormatFuc(1280,720,5),'720p_1':resolutionFormatFuc(1280,720,5),'720p_2':resolutionFormatFuc(1280,720,30),'720p_3':resolutionFormatFuc(1280,720,15),'1080p':resolutionFormatFuc(1920,1080,5),'1080p_1':resolutionFormatFuc(1920,1080,5),'1080p_2':resolutionFormatFuc(1920,1080,30),'1080p_3':resolutionFormatFuc(1920,1080,15)};function screenRecordConfigFormatFuc(config){var screenConfig={};if(typeof config==='string'){screenConfig=Object.assign({},resolutionDictionary[config]);}else {screenConfig=config;}return screenConfig;}var getDisplayMedia=function getDisplayMedia(formatConfig){var withAudio=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'disable';return __awaiter(void 0,void 0,void 0,/*#__PURE__*/regenerator.mark(function _callee21(){var localVideoTrack,localAudioTrack,localStream;return regenerator.wrap(function _callee21$(_context21){while(1){switch(_context21.prev=_context21.next){case 0:_context21.prev=0;_context21.next=3;return getScreenStream({screen:formatConfig,screenAudio:'auto'===withAudio||'enable'===withAudio});case 3:localStream=_context21.sent;localVideoTrack=localStream.getVideoTracks()[0];localAudioTrack=localStream.getAudioTracks()[0];_context21.next=11;break;case 8:_context21.prev=8;_context21.t0=_context21["catch"](0);console.error(_context21.t0);case 11:if(localVideoTrack){_context21.next=13;break;}throw new CoreRTCError(CoreRTCErrorCode.UNEXPECTED_ERROR,'can not find track in media stream');case 13:return _context21.abrupt("return",[localVideoTrack,localAudioTrack]);case 14:case"end":return _context21.stop();}}},_callee21,null,[[0,8]]);}));};function processAudioConfig(config){var audioMediaTrackConstraints={};config.AEC&&(audioMediaTrackConstraints.echoCancellation=config.AEC);config.AGC&&(audioMediaTrackConstraints.autoGainControl=config.AGC);config.ANS&&(audioMediaTrackConstraints.noiseSuppression=config.ANS);config.microphoneId&&(audioMediaTrackConstraints.deviceId=config.microphoneId);if(!config.encoderConfig){return {audioMediaTrackConstraints:audioMediaTrackConstraints};}var audioEncoderConfig=processAudioEncoderConfig(config===null||config===void 0?void 0:config.encoderConfig);return {audioMediaTrackConstraints:audioMediaTrackConstraints,audioEncoderConfig:audioEncoderConfig};}var audioPresetEnum={speech_low_quality:audioSample(16000,false,18),speech_standard:audioSample(32000,false,18),music_standard:audioSample(48000,false,18),standard_stereo:audioSample(48000,true,56),high_quality:audioSample(48000,false,128),high_quality_stereo:audioSample(48000,true,192)};function audioSample(sampleRate,stereo,bitrate){return {sampleRate:sampleRate,stereo:stereo?2:1,bitrate:bitrate};}var processAudioEncoderConfig=function processAudioEncoderConfig(encoderConfig){if(typeof encoderConfig==='string'){return audioPresetEnum[encoderConfig];}return {stereo:encoderConfig.stereo,sampleRate:encoderConfig.sampleRate,sampleSize:encoderConfig.sampleSize,bitrate:encoderConfig.bitrate};};function processVideoConfig(videoInitConfig){var _a,_b,_c;var videoMediaTrackConstraints={};var videoEncoderConfig={bitrateMin:100,bitrateMax:500};if(videoInitConfig.facingMode){videoMediaTrackConstraints.facingMode={exact:videoInitConfig.facingMode};}if(videoInitConfig.cameraId){videoMediaTrackConstraints.deviceId=videoInitConfig.cameraId;}if(typeof videoInitConfig.encoderConfig==='string'){var encoderConfig=SUPPORT_RESOLUTION_LIST[videoInitConfig.encoderConfig];Object.assign(videoMediaTrackConstraints,videoEncoderConfig);videoMediaTrackConstraints.width=encoderConfig.width;videoMediaTrackConstraints.height=encoderConfig.height;videoMediaTrackConstraints.frameRate=encoderConfig.frameRate;if(encoderConfig.bitrateMax){videoEncoderConfig.bitrateMax=encoderConfig.bitrateMax;}if(encoderConfig.bitrateMin){videoEncoderConfig.bitrateMin=encoderConfig.bitrateMin;}}else if(_typeof2(videoInitConfig.encoderConfig)==='object'){var customConfig=videoInitConfig.encoderConfig;videoMediaTrackConstraints.width=customConfig.width;videoMediaTrackConstraints.height=customConfig.height;videoMediaTrackConstraints.frameRate=customConfig.frameRate||15;if((_a=videoInitConfig===null||videoInitConfig===void 0?void 0:videoInitConfig.encoderConfig)===null||_a===void 0?void 0:_a.bitrateMax){videoEncoderConfig.bitrateMax=(_b=videoInitConfig.encoderConfig)===null||_b===void 0?void 0:_b.bitrateMax;}if((_c=videoInitConfig===null||videoInitConfig===void 0?void 0:videoInitConfig.encoderConfig)===null||_c===void 0?void 0:_c.bitrateMin){videoEncoderConfig.bitrateMin=videoInitConfig.encoderConfig.bitrateMin;}}return {videoMediaTrackConstraints:videoMediaTrackConstraints,videoEncoderConfig:videoEncoderConfig};}// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
|
|
4202
4202
|
//
|
|
@@ -6149,7 +6149,7 @@ _createClass2(CoreRTC,[{key:"getSupportedCodec",value:function getSupportedCodec
|
|
|
6149
6149
|
* - `true`: 跳过权限检查。
|
|
6150
6150
|
* - `false`: (默认)不跳过权限检查。
|
|
6151
6151
|
* @category Media Devices
|
|
6152
|
-
*/},{key:"getCameras",value:function getCameras(skipPermissionCheck){return __awaiter(this,void 0,void 0,/*#__PURE__*/regenerator.mark(function _callee80(){var stream,devices,tracks;return regenerator.wrap(function _callee80$(_context80){while(1){switch(_context80.prev=_context80.next){case 0:if(skipPermissionCheck){_context80.next=11;break;}_context80.prev=1;_context80.next=4;return getusermedia({
|
|
6152
|
+
*/},{key:"getCameras",value:function getCameras(skipPermissionCheck){return __awaiter(this,void 0,void 0,/*#__PURE__*/regenerator.mark(function _callee80(){var stream,devices,tracks;return regenerator.wrap(function _callee80$(_context80){while(1){switch(_context80.prev=_context80.next){case 0:if(skipPermissionCheck){_context80.next=11;break;}_context80.prev=1;_context80.next=4;return getusermedia({video:true});case 4:stream=_context80.sent;_context80.next=11;break;case 7:_context80.prev=7;_context80.t0=_context80["catch"](1);if(!(_context80.t0.message.toUpperCase()===CoreRTCErrorCode.PERMISSION_DENIED)){_context80.next=11;break;}throw new CoreRTCError(CoreRTCErrorCode.PERMISSION_DENIED,_context80.t0.message);case 11:_context80.next=13;return getDevicesByKind('videoinput');case 13:devices=_context80.sent;// @ts-ignore
|
|
6153
6153
|
if(stream&&stream.getTracks){tracks=stream.getTracks();tracks.forEach(function(track){track.stop();});}return _context80.abrupt("return",devices);case 16:case"end":return _context80.stop();}}},_callee80,null,[[1,7]]);}));}/**
|
|
6154
6154
|
* 该方法枚举可用的媒体输入和输出设备,比如麦克风、摄像头、耳机等。
|
|
6155
6155
|
*
|
|
@@ -8412,9 +8412,8 @@ function log$2(clsName) {
|
|
|
8412
8412
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
8413
8413
|
arg[_i] = arguments[_i];
|
|
8414
8414
|
}
|
|
8415
|
-
var reportArgs = arg.filter(function (a) { return typeof a !== 'function'; });
|
|
8416
8415
|
if (volcCommonStatus.turnOnConsoleLogs) {
|
|
8417
|
-
console[volcCommonStatus.debugLogLevel]
|
|
8416
|
+
// console[volcCommonStatus.debugLogLevel](`%c 中间层 ==> ${clsName}.${name}()`, 'color:red', ...reportArgs);
|
|
8418
8417
|
// @ts-ignore
|
|
8419
8418
|
if (index._monitor) {
|
|
8420
8419
|
// @ts-ignore
|
|
@@ -8491,16 +8490,16 @@ var VolcLocalAudioTrackStatsManager = /** @class */ (function () {
|
|
|
8491
8490
|
return stats;
|
|
8492
8491
|
};
|
|
8493
8492
|
__decorate([
|
|
8494
|
-
log$2(
|
|
8493
|
+
log$2()
|
|
8495
8494
|
], VolcLocalAudioTrackStatsManager.prototype, "_onLocalStreamStats", null);
|
|
8496
8495
|
__decorate([
|
|
8497
|
-
log$2(
|
|
8496
|
+
log$2()
|
|
8498
8497
|
], VolcLocalAudioTrackStatsManager.prototype, "startPublish", null);
|
|
8499
8498
|
__decorate([
|
|
8500
|
-
log$2(
|
|
8499
|
+
log$2()
|
|
8501
8500
|
], VolcLocalAudioTrackStatsManager.prototype, "stopPublish", null);
|
|
8502
8501
|
__decorate([
|
|
8503
|
-
log$2(
|
|
8502
|
+
log$2()
|
|
8504
8503
|
], VolcLocalAudioTrackStatsManager.prototype, "getStats", null);
|
|
8505
8504
|
return VolcLocalAudioTrackStatsManager;
|
|
8506
8505
|
}());
|
|
@@ -8612,16 +8611,16 @@ var VolcLocalVideoTrackStatsManager = /** @class */ (function () {
|
|
|
8612
8611
|
return stats;
|
|
8613
8612
|
};
|
|
8614
8613
|
__decorate([
|
|
8615
|
-
log$2(
|
|
8614
|
+
log$2()
|
|
8616
8615
|
], VolcLocalVideoTrackStatsManager.prototype, "_onLocalStreamStats", null);
|
|
8617
8616
|
__decorate([
|
|
8618
|
-
log$2(
|
|
8617
|
+
log$2()
|
|
8619
8618
|
], VolcLocalVideoTrackStatsManager.prototype, "startPublish", null);
|
|
8620
8619
|
__decorate([
|
|
8621
|
-
log$2(
|
|
8620
|
+
log$2()
|
|
8622
8621
|
], VolcLocalVideoTrackStatsManager.prototype, "stopPublish", null);
|
|
8623
8622
|
__decorate([
|
|
8624
|
-
log$2(
|
|
8623
|
+
log$2()
|
|
8625
8624
|
], VolcLocalVideoTrackStatsManager.prototype, "getStats", null);
|
|
8626
8625
|
return VolcLocalVideoTrackStatsManager;
|
|
8627
8626
|
}());
|
|
@@ -8759,19 +8758,19 @@ var VolcRemoteAudioTrackStatsManager = /** @class */ (function () {
|
|
|
8759
8758
|
return stats;
|
|
8760
8759
|
};
|
|
8761
8760
|
__decorate([
|
|
8762
|
-
log$2(
|
|
8761
|
+
log$2()
|
|
8763
8762
|
], VolcRemoteAudioTrackStatsManager.prototype, "startSubscribe", null);
|
|
8764
8763
|
__decorate([
|
|
8765
|
-
log$2(
|
|
8764
|
+
log$2()
|
|
8766
8765
|
], VolcRemoteAudioTrackStatsManager.prototype, "stopSubscribe", null);
|
|
8767
8766
|
__decorate([
|
|
8768
|
-
log$2(
|
|
8767
|
+
log$2()
|
|
8769
8768
|
], VolcRemoteAudioTrackStatsManager.prototype, "_onStreamStats", null);
|
|
8770
8769
|
__decorate([
|
|
8771
|
-
log$2(
|
|
8770
|
+
log$2()
|
|
8772
8771
|
], VolcRemoteAudioTrackStatsManager.prototype, "getStats", null);
|
|
8773
8772
|
__decorate([
|
|
8774
|
-
log$2(
|
|
8773
|
+
log$2()
|
|
8775
8774
|
], VolcRemoteAudioTrackStatsManager.prototype, "getUserStats", null);
|
|
8776
8775
|
return VolcRemoteAudioTrackStatsManager;
|
|
8777
8776
|
}());
|
|
@@ -8919,19 +8918,19 @@ var VolcRemoteVideoTrackStatsManager = /** @class */ (function () {
|
|
|
8919
8918
|
return stats;
|
|
8920
8919
|
};
|
|
8921
8920
|
__decorate([
|
|
8922
|
-
log$2(
|
|
8921
|
+
log$2()
|
|
8923
8922
|
], VolcRemoteVideoTrackStatsManager.prototype, "startSubscribe", null);
|
|
8924
8923
|
__decorate([
|
|
8925
|
-
log$2(
|
|
8924
|
+
log$2()
|
|
8926
8925
|
], VolcRemoteVideoTrackStatsManager.prototype, "stopSubscribe", null);
|
|
8927
8926
|
__decorate([
|
|
8928
|
-
log$2(
|
|
8927
|
+
log$2()
|
|
8929
8928
|
], VolcRemoteVideoTrackStatsManager.prototype, "_onStreamStats", null);
|
|
8930
8929
|
__decorate([
|
|
8931
|
-
log$2(
|
|
8930
|
+
log$2()
|
|
8932
8931
|
], VolcRemoteVideoTrackStatsManager.prototype, "getStats", null);
|
|
8933
8932
|
__decorate([
|
|
8934
|
-
log$2(
|
|
8933
|
+
log$2()
|
|
8935
8934
|
], VolcRemoteVideoTrackStatsManager.prototype, "getUserStats", null);
|
|
8936
8935
|
return VolcRemoteVideoTrackStatsManager;
|
|
8937
8936
|
}());
|
|
@@ -9013,7 +9012,7 @@ var VolcCoreRTCStatsManager = /** @class */ (function () {
|
|
|
9013
9012
|
return stats;
|
|
9014
9013
|
};
|
|
9015
9014
|
__decorate([
|
|
9016
|
-
log$2(
|
|
9015
|
+
log$2()
|
|
9017
9016
|
], VolcCoreRTCStatsManager.prototype, "getStats", null);
|
|
9018
9017
|
return VolcCoreRTCStatsManager;
|
|
9019
9018
|
}());
|
|
@@ -9047,16 +9046,16 @@ var MediaStatsManager = /** @class */ (function () {
|
|
|
9047
9046
|
});
|
|
9048
9047
|
};
|
|
9049
9048
|
__decorate([
|
|
9050
|
-
log$2(
|
|
9049
|
+
log$2()
|
|
9051
9050
|
], MediaStatsManager.prototype, "init", null);
|
|
9052
9051
|
__decorate([
|
|
9053
|
-
log$2(
|
|
9052
|
+
log$2()
|
|
9054
9053
|
], MediaStatsManager.prototype, "dispose", null);
|
|
9055
9054
|
__decorate([
|
|
9056
|
-
log$2(
|
|
9055
|
+
log$2()
|
|
9057
9056
|
], MediaStatsManager.prototype, "onJoinRoom", null);
|
|
9058
9057
|
__decorate([
|
|
9059
|
-
log$2(
|
|
9058
|
+
log$2()
|
|
9060
9059
|
], MediaStatsManager.prototype, "getCoreRTCStats", null);
|
|
9061
9060
|
return MediaStatsManager;
|
|
9062
9061
|
}());
|
|
@@ -9328,37 +9327,37 @@ var VolcTrack = /** @class */ (function () {
|
|
|
9328
9327
|
this._eventEmitter.emit(event);
|
|
9329
9328
|
};
|
|
9330
9329
|
__decorate([
|
|
9331
|
-
log$2(
|
|
9330
|
+
log$2()
|
|
9332
9331
|
], VolcTrack.prototype, "getTrackId", null);
|
|
9333
9332
|
__decorate([
|
|
9334
|
-
log$2(
|
|
9333
|
+
log$2()
|
|
9335
9334
|
], VolcTrack.prototype, "getMediaStreamTrack", null);
|
|
9336
9335
|
__decorate([
|
|
9337
|
-
log$2(
|
|
9336
|
+
log$2()
|
|
9338
9337
|
], VolcTrack.prototype, "stop", null);
|
|
9339
9338
|
__decorate([
|
|
9340
|
-
log$2(
|
|
9339
|
+
log$2()
|
|
9341
9340
|
], VolcTrack.prototype, "play", null);
|
|
9342
9341
|
__decorate([
|
|
9343
|
-
log$2(
|
|
9342
|
+
log$2()
|
|
9344
9343
|
], VolcTrack.prototype, "getListeners", null);
|
|
9345
9344
|
__decorate([
|
|
9346
|
-
log$2(
|
|
9345
|
+
log$2()
|
|
9347
9346
|
], VolcTrack.prototype, "on", null);
|
|
9348
9347
|
__decorate([
|
|
9349
|
-
log$2(
|
|
9348
|
+
log$2()
|
|
9350
9349
|
], VolcTrack.prototype, "once", null);
|
|
9351
9350
|
__decorate([
|
|
9352
|
-
log$2(
|
|
9351
|
+
log$2()
|
|
9353
9352
|
], VolcTrack.prototype, "off", null);
|
|
9354
9353
|
__decorate([
|
|
9355
|
-
log$2(
|
|
9354
|
+
log$2()
|
|
9356
9355
|
], VolcTrack.prototype, "listenerCount", null);
|
|
9357
9356
|
__decorate([
|
|
9358
|
-
log$2(
|
|
9357
|
+
log$2()
|
|
9359
9358
|
], VolcTrack.prototype, "removeAllListeners", null);
|
|
9360
9359
|
__decorate([
|
|
9361
|
-
log$2(
|
|
9360
|
+
log$2()
|
|
9362
9361
|
], VolcTrack.prototype, "emit", null);
|
|
9363
9362
|
return VolcTrack;
|
|
9364
9363
|
}());
|
|
@@ -9398,6 +9397,7 @@ var VolcLocalTrack = /** @class */ (function (_super) {
|
|
|
9398
9397
|
};
|
|
9399
9398
|
VolcLocalTrack.prototype.trackEndEmitter = function () {
|
|
9400
9399
|
this.emit('track-ended');
|
|
9400
|
+
this._stopPublishingWhenTrackEnded();
|
|
9401
9401
|
};
|
|
9402
9402
|
Object.defineProperty(VolcLocalTrack.prototype, "track", {
|
|
9403
9403
|
get: function () {
|
|
@@ -9622,6 +9622,29 @@ var VolcLocalTrack = /** @class */ (function (_super) {
|
|
|
9622
9622
|
});
|
|
9623
9623
|
});
|
|
9624
9624
|
};
|
|
9625
|
+
VolcLocalTrack.prototype._stopPublishingWhenTrackEnded = function () {
|
|
9626
|
+
var _a, _b;
|
|
9627
|
+
return __awaiter$2(this, void 0, void 0, function () {
|
|
9628
|
+
var mediaType;
|
|
9629
|
+
return __generator(this, function (_c) {
|
|
9630
|
+
switch (_c.label) {
|
|
9631
|
+
case 0:
|
|
9632
|
+
mediaType = this._getVolcMediaType();
|
|
9633
|
+
if (!(volcCommonStatus.hasJoinRoom && mediaType)) return [3 /*break*/, 4];
|
|
9634
|
+
if (!this.isScreen) return [3 /*break*/, 2];
|
|
9635
|
+
return [4 /*yield*/, ((_a = this._engine) === null || _a === void 0 ? void 0 : _a.unpublishScreen(mediaType))];
|
|
9636
|
+
case 1:
|
|
9637
|
+
_c.sent();
|
|
9638
|
+
return [3 /*break*/, 4];
|
|
9639
|
+
case 2: return [4 /*yield*/, ((_b = this._engine) === null || _b === void 0 ? void 0 : _b.unpublishStream(mediaType))];
|
|
9640
|
+
case 3:
|
|
9641
|
+
_c.sent();
|
|
9642
|
+
_c.label = 4;
|
|
9643
|
+
case 4: return [2 /*return*/];
|
|
9644
|
+
}
|
|
9645
|
+
});
|
|
9646
|
+
});
|
|
9647
|
+
};
|
|
9625
9648
|
VolcLocalTrack.prototype._updateTrack = function () {
|
|
9626
9649
|
var _a, _b;
|
|
9627
9650
|
if (this.isScreen) {
|
|
@@ -9752,61 +9775,64 @@ var VolcLocalTrack = /** @class */ (function (_super) {
|
|
|
9752
9775
|
});
|
|
9753
9776
|
};
|
|
9754
9777
|
__decorate([
|
|
9755
|
-
log$2(
|
|
9778
|
+
log$2()
|
|
9756
9779
|
], VolcLocalTrack.prototype, "getUserId", null);
|
|
9757
9780
|
__decorate([
|
|
9758
|
-
log$2(
|
|
9781
|
+
log$2()
|
|
9759
9782
|
], VolcLocalTrack.prototype, "setUserId", null);
|
|
9760
9783
|
__decorate([
|
|
9761
|
-
log$2(
|
|
9784
|
+
log$2()
|
|
9762
9785
|
], VolcLocalTrack.prototype, "trackEndEmitter", null);
|
|
9763
9786
|
__decorate([
|
|
9764
|
-
log$2(
|
|
9787
|
+
log$2()
|
|
9765
9788
|
], VolcLocalTrack.prototype, "setTrack", null);
|
|
9766
9789
|
__decorate([
|
|
9767
|
-
log$2(
|
|
9790
|
+
log$2()
|
|
9768
9791
|
], VolcLocalTrack.prototype, "_bindingEvents", null);
|
|
9769
9792
|
__decorate([
|
|
9770
|
-
log$2(
|
|
9793
|
+
log$2()
|
|
9771
9794
|
], VolcLocalTrack.prototype, "_unbindingEvents", null);
|
|
9772
9795
|
__decorate([
|
|
9773
|
-
log$2(
|
|
9796
|
+
log$2()
|
|
9774
9797
|
], VolcLocalTrack.prototype, "getTrackLabel", null);
|
|
9775
9798
|
__decorate([
|
|
9776
|
-
log$2(
|
|
9799
|
+
log$2()
|
|
9777
9800
|
], VolcLocalTrack.prototype, "_startCapturing", null);
|
|
9778
9801
|
__decorate([
|
|
9779
|
-
log$2(
|
|
9802
|
+
log$2()
|
|
9780
9803
|
], VolcLocalTrack.prototype, "_stopCapturing", null);
|
|
9781
9804
|
__decorate([
|
|
9782
|
-
log$2(
|
|
9805
|
+
log$2()
|
|
9783
9806
|
], VolcLocalTrack.prototype, "_startScreenCapturing", null);
|
|
9784
9807
|
__decorate([
|
|
9785
|
-
log$2(
|
|
9808
|
+
log$2()
|
|
9786
9809
|
], VolcLocalTrack.prototype, "_stopScreenCapturing", null);
|
|
9787
9810
|
__decorate([
|
|
9788
|
-
log$2(
|
|
9811
|
+
log$2()
|
|
9789
9812
|
], VolcLocalTrack.prototype, "setEnabled", null);
|
|
9790
9813
|
__decorate([
|
|
9791
|
-
log$2(
|
|
9814
|
+
log$2()
|
|
9792
9815
|
], VolcLocalTrack.prototype, "_checkStatus", null);
|
|
9793
9816
|
__decorate([
|
|
9794
|
-
log$2(
|
|
9817
|
+
log$2()
|
|
9795
9818
|
], VolcLocalTrack.prototype, "_checkStatusForMain", null);
|
|
9796
9819
|
__decorate([
|
|
9797
|
-
log$2(
|
|
9820
|
+
log$2()
|
|
9821
|
+
], VolcLocalTrack.prototype, "_stopPublishingWhenTrackEnded", null);
|
|
9822
|
+
__decorate([
|
|
9823
|
+
log$2()
|
|
9798
9824
|
], VolcLocalTrack.prototype, "_updateTrack", null);
|
|
9799
9825
|
__decorate([
|
|
9800
|
-
log$2(
|
|
9826
|
+
log$2()
|
|
9801
9827
|
], VolcLocalTrack.prototype, "_checkStatusForScreen", null);
|
|
9802
9828
|
__decorate([
|
|
9803
|
-
log$2(
|
|
9829
|
+
log$2()
|
|
9804
9830
|
], VolcLocalTrack.prototype, "setMuted", null);
|
|
9805
9831
|
__decorate([
|
|
9806
|
-
log$2(
|
|
9832
|
+
log$2()
|
|
9807
9833
|
], VolcLocalTrack.prototype, "_getVolcMediaType", null);
|
|
9808
9834
|
__decorate([
|
|
9809
|
-
log$2(
|
|
9835
|
+
log$2()
|
|
9810
9836
|
], VolcLocalTrack.prototype, "close", null);
|
|
9811
9837
|
return VolcLocalTrack;
|
|
9812
9838
|
}(VolcTrack));
|
|
@@ -9881,25 +9907,25 @@ var VolcRemoteTrack = /** @class */ (function (_super) {
|
|
|
9881
9907
|
}
|
|
9882
9908
|
};
|
|
9883
9909
|
__decorate([
|
|
9884
|
-
log$2(
|
|
9910
|
+
log$2()
|
|
9885
9911
|
], VolcRemoteTrack.prototype, "setTrack", null);
|
|
9886
9912
|
__decorate([
|
|
9887
|
-
log$2(
|
|
9913
|
+
log$2()
|
|
9888
9914
|
], VolcRemoteTrack.prototype, "setUserId", null);
|
|
9889
9915
|
__decorate([
|
|
9890
|
-
log$2(
|
|
9916
|
+
log$2()
|
|
9891
9917
|
], VolcRemoteTrack.prototype, "getUserId", null);
|
|
9892
9918
|
__decorate([
|
|
9893
|
-
log$2(
|
|
9919
|
+
log$2()
|
|
9894
9920
|
], VolcRemoteTrack.prototype, "firstVideoFrameDecodedEmitter", null);
|
|
9895
9921
|
__decorate([
|
|
9896
|
-
log$2(
|
|
9922
|
+
log$2()
|
|
9897
9923
|
], VolcRemoteTrack.prototype, "firstAudioFrameDecodedEmitter", null);
|
|
9898
9924
|
__decorate([
|
|
9899
|
-
log$2(
|
|
9925
|
+
log$2()
|
|
9900
9926
|
], VolcRemoteTrack.prototype, "_bindingEvents", null);
|
|
9901
9927
|
__decorate([
|
|
9902
|
-
log$2(
|
|
9928
|
+
log$2()
|
|
9903
9929
|
], VolcRemoteTrack.prototype, "_unbindingEvents", null);
|
|
9904
9930
|
return VolcRemoteTrack;
|
|
9905
9931
|
}(VolcTrack));
|
|
@@ -9941,12 +9967,10 @@ var VolcLocalVideoTrack = /** @class */ (function (_super) {
|
|
|
9941
9967
|
else {
|
|
9942
9968
|
this._engine.setLocalVideoMirrorType(MirrorType.MIRROR_TYPE_NONE);
|
|
9943
9969
|
}
|
|
9944
|
-
|
|
9945
|
-
|
|
9946
|
-
|
|
9947
|
-
|
|
9948
|
-
});
|
|
9949
|
-
}
|
|
9970
|
+
this._engine.setLocalVideoPlayer(StreamIndex.STREAM_INDEX_MAIN, {
|
|
9971
|
+
renderDom: undefined,
|
|
9972
|
+
renderMode: _getRenderMode(),
|
|
9973
|
+
});
|
|
9950
9974
|
this._domElement = this._engine.setLocalVideoPlayer(StreamIndex.STREAM_INDEX_MAIN, {
|
|
9951
9975
|
renderDom: element,
|
|
9952
9976
|
renderMode: _getRenderMode(),
|
|
@@ -9954,12 +9978,10 @@ var VolcLocalVideoTrack = /** @class */ (function (_super) {
|
|
|
9954
9978
|
this._engine.play(undefined, MediaType.VIDEO, StreamIndex.STREAM_INDEX_MAIN);
|
|
9955
9979
|
}
|
|
9956
9980
|
else {
|
|
9957
|
-
|
|
9958
|
-
|
|
9959
|
-
|
|
9960
|
-
|
|
9961
|
-
});
|
|
9962
|
-
}
|
|
9981
|
+
this._engine.setLocalVideoPlayer(StreamIndex.STREAM_INDEX_SCREEN, {
|
|
9982
|
+
renderDom: undefined,
|
|
9983
|
+
renderMode: _getRenderMode(),
|
|
9984
|
+
});
|
|
9963
9985
|
this._domElement = this._engine.setLocalVideoPlayer(StreamIndex.STREAM_INDEX_SCREEN, {
|
|
9964
9986
|
renderDom: element,
|
|
9965
9987
|
renderMode: _getRenderMode(),
|
|
@@ -9971,7 +9993,7 @@ var VolcLocalVideoTrack = /** @class */ (function (_super) {
|
|
|
9971
9993
|
VolcLocalVideoTrack.prototype.getCurrentFrameData = function () {
|
|
9972
9994
|
var width = 100;
|
|
9973
9995
|
var height = 100;
|
|
9974
|
-
if (this._domElement
|
|
9996
|
+
if (this._domElement) {
|
|
9975
9997
|
var canvas = document.createElement('canvas');
|
|
9976
9998
|
var ctx = canvas.getContext('2d');
|
|
9977
9999
|
width = this._domElement.videoWidth;
|
|
@@ -9992,10 +10014,10 @@ var VolcLocalVideoTrack = /** @class */ (function (_super) {
|
|
|
9992
10014
|
return new ImageData(width, height);
|
|
9993
10015
|
};
|
|
9994
10016
|
__decorate([
|
|
9995
|
-
log$2(
|
|
10017
|
+
log$2()
|
|
9996
10018
|
], VolcLocalVideoTrack.prototype, "play", null);
|
|
9997
10019
|
__decorate([
|
|
9998
|
-
log$2(
|
|
10020
|
+
log$2()
|
|
9999
10021
|
], VolcLocalVideoTrack.prototype, "getCurrentFrameData", null);
|
|
10000
10022
|
return VolcLocalVideoTrack;
|
|
10001
10023
|
}(VolcLocalTrack));
|
|
@@ -10043,10 +10065,10 @@ var VolcCameraVideoTrack = /** @class */ (function (_super) {
|
|
|
10043
10065
|
});
|
|
10044
10066
|
};
|
|
10045
10067
|
__decorate([
|
|
10046
|
-
log$2(
|
|
10068
|
+
log$2()
|
|
10047
10069
|
], VolcCameraVideoTrack.prototype, "setDevice", null);
|
|
10048
10070
|
__decorate([
|
|
10049
|
-
log$2(
|
|
10071
|
+
log$2()
|
|
10050
10072
|
], VolcCameraVideoTrack.prototype, "setEncoderConfiguration", null);
|
|
10051
10073
|
return VolcCameraVideoTrack;
|
|
10052
10074
|
}(VolcLocalVideoTrack));
|
|
@@ -10103,16 +10125,16 @@ var VolcLocalAudioTrack = /** @class */ (function (_super) {
|
|
|
10103
10125
|
});
|
|
10104
10126
|
};
|
|
10105
10127
|
__decorate([
|
|
10106
|
-
log$2(
|
|
10128
|
+
log$2()
|
|
10107
10129
|
], VolcLocalAudioTrack.prototype, "setVolume", null);
|
|
10108
10130
|
__decorate([
|
|
10109
|
-
log$2(
|
|
10131
|
+
log$2()
|
|
10110
10132
|
], VolcLocalAudioTrack.prototype, "getVolumeLevel", null);
|
|
10111
10133
|
__decorate([
|
|
10112
|
-
log$2(
|
|
10134
|
+
log$2()
|
|
10113
10135
|
], VolcLocalAudioTrack.prototype, "play", null);
|
|
10114
10136
|
__decorate([
|
|
10115
|
-
log$2(
|
|
10137
|
+
log$2()
|
|
10116
10138
|
], VolcLocalAudioTrack.prototype, "setPlaybackDevice", null);
|
|
10117
10139
|
return VolcLocalAudioTrack;
|
|
10118
10140
|
}(VolcLocalTrack));
|
|
@@ -10133,7 +10155,7 @@ var VolcMicrophoneAudioTrack = /** @class */ (function (_super) {
|
|
|
10133
10155
|
});
|
|
10134
10156
|
};
|
|
10135
10157
|
__decorate([
|
|
10136
|
-
log$2(
|
|
10158
|
+
log$2()
|
|
10137
10159
|
], VolcMicrophoneAudioTrack.prototype, "setDevice", null);
|
|
10138
10160
|
return VolcMicrophoneAudioTrack;
|
|
10139
10161
|
}(VolcLocalAudioTrack));
|
|
@@ -10184,19 +10206,19 @@ var VolcRemoteAudioTrack = /** @class */ (function (_super) {
|
|
|
10184
10206
|
}
|
|
10185
10207
|
};
|
|
10186
10208
|
__decorate([
|
|
10187
|
-
log$2(
|
|
10209
|
+
log$2()
|
|
10188
10210
|
], VolcRemoteAudioTrack.prototype, "setVolume", null);
|
|
10189
10211
|
__decorate([
|
|
10190
|
-
log$2(
|
|
10212
|
+
log$2()
|
|
10191
10213
|
], VolcRemoteAudioTrack.prototype, "getVolumeLevel", null);
|
|
10192
10214
|
__decorate([
|
|
10193
|
-
log$2(
|
|
10215
|
+
log$2()
|
|
10194
10216
|
], VolcRemoteAudioTrack.prototype, "setVolumeLevel", null);
|
|
10195
10217
|
__decorate([
|
|
10196
|
-
log$2(
|
|
10218
|
+
log$2()
|
|
10197
10219
|
], VolcRemoteAudioTrack.prototype, "setPlaybackDevice", null);
|
|
10198
10220
|
__decorate([
|
|
10199
|
-
log$2(
|
|
10221
|
+
log$2()
|
|
10200
10222
|
], VolcRemoteAudioTrack.prototype, "play", null);
|
|
10201
10223
|
return VolcRemoteAudioTrack;
|
|
10202
10224
|
}(VolcRemoteTrack));
|
|
@@ -10261,7 +10283,7 @@ var VolcRemoteVideoTrack = /** @class */ (function (_super) {
|
|
|
10261
10283
|
VolcRemoteVideoTrack.prototype.getCurrentFrameData = function () {
|
|
10262
10284
|
var width = 100;
|
|
10263
10285
|
var height = 100;
|
|
10264
|
-
if (this._domElement
|
|
10286
|
+
if (this._domElement) {
|
|
10265
10287
|
var canvas = document.createElement('canvas');
|
|
10266
10288
|
var ctx = canvas.getContext('2d');
|
|
10267
10289
|
width = this._domElement.videoWidth;
|
|
@@ -10277,10 +10299,10 @@ var VolcRemoteVideoTrack = /** @class */ (function (_super) {
|
|
|
10277
10299
|
return new ImageData(width, height);
|
|
10278
10300
|
};
|
|
10279
10301
|
__decorate([
|
|
10280
|
-
log$2(
|
|
10302
|
+
log$2()
|
|
10281
10303
|
], VolcRemoteVideoTrack.prototype, "play", null);
|
|
10282
10304
|
__decorate([
|
|
10283
|
-
log$2(
|
|
10305
|
+
log$2()
|
|
10284
10306
|
], VolcRemoteVideoTrack.prototype, "getCurrentFrameData", null);
|
|
10285
10307
|
return VolcRemoteVideoTrack;
|
|
10286
10308
|
}(VolcRemoteTrack));
|
|
@@ -10432,8 +10454,9 @@ var VolcClient = /** @class */ (function (_super) {
|
|
|
10432
10454
|
var userId = e.userId, message = e.message;
|
|
10433
10455
|
this.emit('user-info-updated', userId, message);
|
|
10434
10456
|
};
|
|
10457
|
+
// 日志较多
|
|
10458
|
+
// @log('VolcClient')
|
|
10435
10459
|
VolcClient.prototype._handleRemoteAudioPropertiesReport = function (e) {
|
|
10436
|
-
var _this_1 = this;
|
|
10437
10460
|
var mainStreamAudioVolume = e
|
|
10438
10461
|
.filter(function (audioInfo) { return audioInfo.streamKey.streamIndex === StreamIndex.STREAM_INDEX_MAIN; })
|
|
10439
10462
|
.map(function (audioInfo) { return ({
|
|
@@ -10441,8 +10464,9 @@ var VolcClient = /** @class */ (function (_super) {
|
|
|
10441
10464
|
linearVolume: audioInfo.audioPropertiesInfo.linearVolume,
|
|
10442
10465
|
}); });
|
|
10443
10466
|
var _this = this;
|
|
10467
|
+
var volumeArr = [];
|
|
10444
10468
|
mainStreamAudioVolume.forEach(function (item) {
|
|
10445
|
-
|
|
10469
|
+
volumeArr.push({
|
|
10446
10470
|
uid: item.userId,
|
|
10447
10471
|
level: Math.floor((item.linearVolume) / 255 * 100),
|
|
10448
10472
|
});
|
|
@@ -10451,7 +10475,10 @@ var VolcClient = /** @class */ (function (_super) {
|
|
|
10451
10475
|
remoteUser.audioTrack.setVolumeLevel((item.linearVolume) / 255);
|
|
10452
10476
|
}
|
|
10453
10477
|
});
|
|
10478
|
+
this.emit('volume-indicator', volumeArr);
|
|
10454
10479
|
};
|
|
10480
|
+
// 日志较多
|
|
10481
|
+
// @log('VolcClient')
|
|
10455
10482
|
VolcClient.prototype._handleLocalAudioPropertiesReport = function (e) {
|
|
10456
10483
|
var mainStreamAudioVolume = e
|
|
10457
10484
|
.find(function (audioInfo) { return audioInfo.streamIndex === StreamIndex.STREAM_INDEX_MAIN; });
|
|
@@ -11000,82 +11027,76 @@ var VolcClient = /** @class */ (function (_super) {
|
|
|
11000
11027
|
return this._stats.remoteVideo.getStats();
|
|
11001
11028
|
};
|
|
11002
11029
|
__decorate([
|
|
11003
|
-
log$2(
|
|
11030
|
+
log$2()
|
|
11004
11031
|
], VolcClient.prototype, "_addEventListeners", null);
|
|
11005
11032
|
__decorate([
|
|
11006
|
-
log$2(
|
|
11033
|
+
log$2()
|
|
11007
11034
|
], VolcClient.prototype, "_onConnectionStateChange", null);
|
|
11008
11035
|
__decorate([
|
|
11009
|
-
log$2(
|
|
11036
|
+
log$2()
|
|
11010
11037
|
], VolcClient.prototype, "_onRoomMessageReceivedHandler", null);
|
|
11011
11038
|
__decorate([
|
|
11012
|
-
log$2(
|
|
11013
|
-
], VolcClient.prototype, "_handleRemoteAudioPropertiesReport", null);
|
|
11014
|
-
__decorate([
|
|
11015
|
-
log$2('VolcClient')
|
|
11016
|
-
], VolcClient.prototype, "_handleLocalAudioPropertiesReport", null);
|
|
11017
|
-
__decorate([
|
|
11018
|
-
log$2('VolcClient')
|
|
11039
|
+
log$2()
|
|
11019
11040
|
], VolcClient.prototype, "_removeEventListeners", null);
|
|
11020
11041
|
__decorate([
|
|
11021
|
-
log$2(
|
|
11042
|
+
log$2()
|
|
11022
11043
|
], VolcClient.prototype, "_onUserJoinedHandler", null);
|
|
11023
11044
|
__decorate([
|
|
11024
|
-
log$2(
|
|
11045
|
+
log$2()
|
|
11025
11046
|
], VolcClient.prototype, "_onUserLeaveHandler", null);
|
|
11026
11047
|
__decorate([
|
|
11027
|
-
log$2(
|
|
11048
|
+
log$2()
|
|
11028
11049
|
], VolcClient.prototype, "_onUserPublishStreamHandler", null);
|
|
11029
11050
|
__decorate([
|
|
11030
|
-
log$2(
|
|
11051
|
+
log$2()
|
|
11031
11052
|
], VolcClient.prototype, "_onUserPublishScreenHandler", null);
|
|
11032
11053
|
__decorate([
|
|
11033
|
-
log$2(
|
|
11054
|
+
log$2()
|
|
11034
11055
|
], VolcClient.prototype, "_onUserUnpublishStreamHandler", null);
|
|
11035
11056
|
__decorate([
|
|
11036
|
-
log$2(
|
|
11057
|
+
log$2()
|
|
11037
11058
|
], VolcClient.prototype, "_onUserUnpublishScreenHandler", null);
|
|
11038
11059
|
__decorate([
|
|
11039
|
-
log$2(
|
|
11060
|
+
log$2()
|
|
11040
11061
|
], VolcClient.prototype, "setEngine", null);
|
|
11041
11062
|
__decorate([
|
|
11042
|
-
log$2(
|
|
11063
|
+
log$2()
|
|
11043
11064
|
], VolcClient.prototype, "setUserInfo", null);
|
|
11044
11065
|
__decorate([
|
|
11045
|
-
log$2(
|
|
11066
|
+
log$2()
|
|
11046
11067
|
], VolcClient.prototype, "join", null);
|
|
11047
11068
|
__decorate([
|
|
11048
|
-
log$2(
|
|
11069
|
+
log$2()
|
|
11049
11070
|
], VolcClient.prototype, "leave", null);
|
|
11050
11071
|
__decorate([
|
|
11051
|
-
log$2(
|
|
11072
|
+
log$2()
|
|
11052
11073
|
], VolcClient.prototype, "publish", null);
|
|
11053
11074
|
__decorate([
|
|
11054
|
-
log$2(
|
|
11075
|
+
log$2()
|
|
11055
11076
|
], VolcClient.prototype, "unpublish", null);
|
|
11056
11077
|
__decorate([
|
|
11057
|
-
log$2(
|
|
11078
|
+
log$2()
|
|
11058
11079
|
], VolcClient.prototype, "subscribe", null);
|
|
11059
11080
|
__decorate([
|
|
11060
|
-
log$2(
|
|
11081
|
+
log$2()
|
|
11061
11082
|
], VolcClient.prototype, "unsubscribe", null);
|
|
11062
11083
|
__decorate([
|
|
11063
|
-
log$2(
|
|
11084
|
+
log$2()
|
|
11064
11085
|
], VolcClient.prototype, "setClientRole", null);
|
|
11065
11086
|
__decorate([
|
|
11066
|
-
log$2(
|
|
11087
|
+
log$2()
|
|
11067
11088
|
], VolcClient.prototype, "getRTCStats", null);
|
|
11068
11089
|
__decorate([
|
|
11069
|
-
log$2(
|
|
11090
|
+
log$2()
|
|
11070
11091
|
], VolcClient.prototype, "getLocalAudioStats", null);
|
|
11071
11092
|
__decorate([
|
|
11072
|
-
log$2(
|
|
11093
|
+
log$2()
|
|
11073
11094
|
], VolcClient.prototype, "getRemoteAudioStats", null);
|
|
11074
11095
|
__decorate([
|
|
11075
|
-
log$2(
|
|
11096
|
+
log$2()
|
|
11076
11097
|
], VolcClient.prototype, "getLocalVideoStats", null);
|
|
11077
11098
|
__decorate([
|
|
11078
|
-
log$2(
|
|
11099
|
+
log$2()
|
|
11079
11100
|
], VolcClient.prototype, "getRemoteVideoStats", null);
|
|
11080
11101
|
return VolcClient;
|
|
11081
11102
|
}(eventemitter3$1.EventEmitter));
|
|
@@ -11641,79 +11662,79 @@ var VolcCoreRTC = /** @class */ (function () {
|
|
|
11641
11662
|
configurable: true
|
|
11642
11663
|
});
|
|
11643
11664
|
__decorate([
|
|
11644
|
-
log$2(
|
|
11665
|
+
log$2()
|
|
11645
11666
|
], VolcCoreRTC.prototype, "setEngine", null);
|
|
11646
11667
|
__decorate([
|
|
11647
|
-
log$2(
|
|
11668
|
+
log$2()
|
|
11648
11669
|
], VolcCoreRTC.prototype, "_addEventListeners", null);
|
|
11649
11670
|
__decorate([
|
|
11650
|
-
log$2(
|
|
11671
|
+
log$2()
|
|
11651
11672
|
], VolcCoreRTC.prototype, "_removeEventListeners", null);
|
|
11652
11673
|
__decorate([
|
|
11653
|
-
log$2(
|
|
11674
|
+
log$2()
|
|
11654
11675
|
], VolcCoreRTC.prototype, "_videoDeviceStateChangeHandler", null);
|
|
11655
11676
|
__decorate([
|
|
11656
|
-
log$2(
|
|
11677
|
+
log$2()
|
|
11657
11678
|
], VolcCoreRTC.prototype, "_audioDeviceStateChangeHandler", null);
|
|
11658
11679
|
__decorate([
|
|
11659
|
-
log$2(
|
|
11680
|
+
log$2()
|
|
11660
11681
|
], VolcCoreRTC.prototype, "_autoplayFailedHandler", null);
|
|
11661
11682
|
__decorate([
|
|
11662
|
-
log$2(
|
|
11683
|
+
log$2()
|
|
11663
11684
|
], VolcCoreRTC.prototype, "setUserInfo", null);
|
|
11664
11685
|
__decorate([
|
|
11665
|
-
log$2(
|
|
11686
|
+
log$2()
|
|
11666
11687
|
], VolcCoreRTC.prototype, "createClient", null);
|
|
11667
11688
|
__decorate([
|
|
11668
|
-
log$2(
|
|
11689
|
+
log$2()
|
|
11669
11690
|
], VolcCoreRTC.prototype, "createCameraVideoTrack", null);
|
|
11670
11691
|
__decorate([
|
|
11671
|
-
log$2(
|
|
11692
|
+
log$2()
|
|
11672
11693
|
], VolcCoreRTC.prototype, "createMicrophoneAndCameraTracks", null);
|
|
11673
11694
|
__decorate([
|
|
11674
|
-
log$2(
|
|
11695
|
+
log$2()
|
|
11675
11696
|
], VolcCoreRTC.prototype, "_handleAudioTrackInitConfig", null);
|
|
11676
11697
|
__decorate([
|
|
11677
|
-
log$2(
|
|
11698
|
+
log$2()
|
|
11678
11699
|
], VolcCoreRTC.prototype, "_handleVideoTrackInitConfig", null);
|
|
11679
11700
|
__decorate([
|
|
11680
|
-
log$2(
|
|
11701
|
+
log$2()
|
|
11681
11702
|
], VolcCoreRTC.prototype, "_handleScreenVideoTrackInitConfig", null);
|
|
11682
11703
|
__decorate([
|
|
11683
|
-
log$2(
|
|
11704
|
+
log$2()
|
|
11684
11705
|
], VolcCoreRTC.prototype, "createMicrophoneAudioTrack", null);
|
|
11685
11706
|
__decorate([
|
|
11686
|
-
log$2(
|
|
11707
|
+
log$2()
|
|
11687
11708
|
], VolcCoreRTC.prototype, "createScreenVideoTrack", null);
|
|
11688
11709
|
__decorate([
|
|
11689
|
-
log$2(
|
|
11710
|
+
log$2()
|
|
11690
11711
|
], VolcCoreRTC.prototype, "getSupportedCodec", null);
|
|
11691
11712
|
__decorate([
|
|
11692
|
-
log$2(
|
|
11713
|
+
log$2()
|
|
11693
11714
|
], VolcCoreRTC.prototype, "checkSystemRequirements", null);
|
|
11694
11715
|
__decorate([
|
|
11695
|
-
log$2(
|
|
11716
|
+
log$2()
|
|
11696
11717
|
], VolcCoreRTC.prototype, "getDevices", null);
|
|
11697
11718
|
__decorate([
|
|
11698
|
-
log$2(
|
|
11719
|
+
log$2()
|
|
11699
11720
|
], VolcCoreRTC.prototype, "getMicrophones", null);
|
|
11700
11721
|
__decorate([
|
|
11701
|
-
log$2(
|
|
11722
|
+
log$2()
|
|
11702
11723
|
], VolcCoreRTC.prototype, "getCameras", null);
|
|
11703
11724
|
__decorate([
|
|
11704
|
-
log$2(
|
|
11725
|
+
log$2()
|
|
11705
11726
|
], VolcCoreRTC.prototype, "_senseDevices", null);
|
|
11706
11727
|
__decorate([
|
|
11707
|
-
log$2(
|
|
11728
|
+
log$2()
|
|
11708
11729
|
], VolcCoreRTC.prototype, "getPlaybackDevices", null);
|
|
11709
11730
|
__decorate([
|
|
11710
|
-
log$2(
|
|
11731
|
+
log$2()
|
|
11711
11732
|
], VolcCoreRTC.prototype, "setLogLevel", null);
|
|
11712
11733
|
__decorate([
|
|
11713
|
-
log$2(
|
|
11734
|
+
log$2()
|
|
11714
11735
|
], VolcCoreRTC.prototype, "enableLogUpload", null);
|
|
11715
11736
|
__decorate([
|
|
11716
|
-
log$2(
|
|
11737
|
+
log$2()
|
|
11717
11738
|
], VolcCoreRTC.prototype, "disableLogUpload", null);
|
|
11718
11739
|
return VolcCoreRTC;
|
|
11719
11740
|
}());
|