/* * 全局数据管理 * */ import Loger from 'Loger'; import ApeConsts from "apes/ApeConsts"; let loger = Loger.getLoger('GlobalConfig'); import EngineUtils from 'EngineUtils'; class GlobalConfig { constructor() { } _currentStatus = null; static getCurrentStatus() { if (this._currentStatus == null) { this._currentStatus = this.statusCode_0; } return this._currentStatus; } static setCurrentStatus(_data) { this._currentStatus = _data; } static getClassDetail() { return this.classDetail; } static setClassDetail(_data) { this.classDetail = _data; } static getClassInfo() { let classInfo = {}; classInfo.siteId = this.siteId; classInfo.classId = this.classId; classInfo.className = this.className; classInfo.h5Module = this.h5Module; classInfo.nodeId = this.nodeId; classInfo.topNodeID = this.topNodeID; classInfo.userRole = this.userRole; classInfo.role = this.role; classInfo.isHost = this.isHost; classInfo.userId = this.userId; classInfo.userName = this.userName; classInfo.password = this.password; classInfo.userType = this.userType; classInfo.passwordRequired = this.passwordRequired; classInfo.md5 = this.md5; classInfo.msType = this.msType; classInfo.portal = this.portal; classInfo.mcuDelay = this.mcuDelay; classInfo.MCUServerIP = this.MCUServerIP; classInfo.MCUServerPort = this.MCUServerPort; classInfo.maxVideoChannels = this.maxVideoChannels; classInfo.maxAudioChannels = this.maxAudioChannels; classInfo.maxMediaChannels = this.maxMediaChannels; classInfo.fps = this.fps; classInfo.gop = this.gop; classInfo.videoQuality = this.videoQuality; classInfo.ssTunnelAppURL = this.ssTunnelAppURL; classInfo.currentSceneTableId = this.currentSceneTableId; //文档区域的模块显示 classInfo.serverAndLoacTimeDistanc = this.serverAndLoacTimeDistanc; classInfo.appId = this.appId; classInfo.appCertificate = this.appCertificate; classInfo.appRecordingKey = this.appRecordingKey; classInfo.channelId = this.channelId; classInfo.channelKey = this.channelKey; classInfo.userUid = this.userUid; return classInfo; } //获取当前的课堂状态的信息 static get classStatusInfo() { let classStatusInfo = {}; classStatusInfo.siteId = this.siteId; //站点号 classStatusInfo.classId = this.classId; classStatusInfo.className = this.className; classStatusInfo.classType = this.classType; //课堂类型 classStatusInfo.classStatus = this.classStatus; //课堂的状态 classStatusInfo.classStartTime = this.classStartTime; //课堂点击开始时间 classStatusInfo.classStopTime = this.classStopTime; //最后一次停止的时间(点暂停或结束),每次发送数据都获取当前时间戳 classStatusInfo.classTimestamp = this.classTimestamp; //相对于点开始课堂的时间戳 classStatusInfo.recordPlaybackMaxTime = this.recordPlaybackMaxTime; //相对于点开始课堂的时间戳 classStatusInfo.classBeginTime = this.classBeginTime; //课堂创建的时间,这个是Sass返回的 classStatusInfo.classEndTime = this.classEndTime; //课堂结束的时间,这个是Sass返回的 classStatusInfo.isEnableGift = this.isEnableGift; classStatusInfo.isEnableDraw = this.isEnableDraw; //当前是否开启绘制权限 classStatusInfo.recordStatus = this.recordStatus; //当前录制状态 classStatusInfo.silence = this.silence; //当前课堂禁言状态 classStatusInfo.silenceUsers = this.silenceUsers; //当前课堂禁言状态 classStatusInfo.selfSilence = this.selfSilence; //当前自由禁言状态 classStatusInfo.recordTimestamp = this.recordTimestamp; //相对于首次开始录制的时间戳 classStatusInfo.recordFileName = this.recordFileName; //录制的文件名 classStatusInfo.recordDownloadUrl = this.recordDownloadUrl; //下载地址 classStatusInfo.serverTimestamp = this.serverTimestamp; //当前的系统时间戳 classStatusInfo.activeDocId = this.activeDocId; //当前激活的文档ID classStatusInfo.activeDocCurPage = this.activeDocCurPage; //当前激活的文档的当前页 classStatusInfo.currentSceneTableId = this.currentSceneTableId; //文档区域的模块显示 classStatusInfo.serverAndLoacTimeDistanc = this.serverAndLoacTimeDistanc; classStatusInfo.videoScale = this.videoScale; return classStatusInfo; } //设置当前的课堂状态的信息 static setClassStatusInfo(_data) { //loger.log("setClassStatusInfo"); if (_data == null) { loger.warn("设置当前的课堂状态的信失败:", _data); return; } let data = _data; //下列的信息以从Sass获取的最新的为准 if (!this.siteId) { this.siteId = data.siteId; //站点号 } if (!this.classId) { this.classId = data.classId; } if (!this.className) { this.className = data.className; } if (data.classType) { this.classType = parseInt(data.classType); } if (!this.classBeginTime) { this.classBeginTime = data.classBeginTime; //课堂创建的时间,这个是Sass返回的 } if (!this.classEndTime) { this.classEndTime = data.classEndTime; //课堂结束的时间,这个是Sass返回的 } //下面的信息Sass和mcu都会更新 this.classStatus = data.classStatus || this.classStatus; //课堂的状态 this.classStartTime = data.classStartTime || this.classStartTime; //课堂点击开始时间 this.classStopTime = data.classStopTime || this.classStopTime; //最后一次停止的时间(点暂停或结束),每次发送数据都获取当前时间戳 this.classTimestamp = data.classTimestamp || this.classTimestamp; //相对于点开始课堂的时间戳 //this.recordStatus = data.recordStatus || this.recordStatus; //当前录制状态 this.recordStatus = data.recordStatus || false; //当前录制状态 this.recordTimestamp = Math.max(parseInt(data.recordTimestamp), this.recordTimestamp); //录制时间取最大值 this.recordFileName = data.recordFileName || this.recordFileName; //录制的文件名 this.recordDownloadUrl = data.recordDownloadUrl || this.recordDownloadUrl; //下载地址 this.currentSceneTableId = data.currentSceneTableId || 0; //文档区域的模块显示 this.isEnableDraw = data.isEnableDraw || false;//是否开启所有人的绘制权限 this.isEnableGift = data.isEnableGift || false; this.videoScale = parseInt(data.videoScale) || 1; // 全局禁言状态 this.silence = data.silence || false; this.silenceUsers = data.silenceUsers || {}; if ((typeof this.silenceUsers == 'string') && this.silenceUsers.constructor == String) { this.silenceUsers = {}; } } /* * 根据nodeId获取用户的身份 * */ static getUserRoleFromeNodeId(_nodeId) { let user = this.rosters[_nodeId]; if (user) { return user.userRole; } else { return "normal" } } /* * 根据nodeId获取用户的身份 * */ static getUserRoleToString(userRole) { let userRoleName="学生"; switch (userRole){ case ApeConsts.NR_HOST: userRoleName="老师"; break; case ApeConsts.NR_PRESENTER: userRoleName="助教"; break; case ApeConsts.NR_INVISIBLE: userRoleName="监客"; break; case ApeConsts.NR_NORMAL: userRoleName="学生"; break; default : break; } return userRoleName; } /* * 根据nodeId获取用户的信息 * */ static getUserInfoFromeNodeId(_nodeId) { return this.rosters[_nodeId]; } //获取推流权限,需要检查当前是否可以继续推流 static getPublishPermission() { if (!this.rosters) { return true; } let openCounter = 0; for (let i in this.rosters) { let item = this.rosters[i]; if (item && item.userRole != ApeConsts.invisible && (item.openCamera > 0 || item.openMicrophones > 0)) { openCounter++; //统计当前已经开启摄像头和麦克风的人数,如果当前开启的人数大于等于最大允许的数量就不允许其他人再打开 if (openCounter >= GlobalConfig.maxMediaChannels) { return false; } } } return true; } /* * 获取当前推流的人数 * */ static getPublishUser() { if (!this.rosters) { return 0; } let openCounter = 0; for (let i in this.rosters) { let item = this.rosters[i]; if (item && item.userRole != ApeConsts.invisible && (item.openCamera > 0 || item.openMicrophones > 0)) { openCounter++; } } return openCounter; } // 判断自己是否主持人角色 static get isHost() { if (this.userRole == ApeConsts.host) { return true; } return false; } // 判断自己是否助教角色 static get isAssistant() { if (this.userRole == ApeConsts.assistant) { return true; } return false; } // 判断自己是否主讲人角色 static get isPresenter() { if (this.userRole == ApeConsts.presenter) { return true; } return false; } // 判断自己是否普通角色 static get isNormal() { if (this.userRole == ApeConsts.normal) { return true; } return false; } // 判断自己是否是隐身用户 static get isInvisible() { if (this.userRole == ApeConsts.invisible) { return true; } return false; } //是否是老师或主讲人 static get isTeachOrAssistant() { if (this.userRole == ApeConsts.host || this.userRole == ApeConsts.assistant || this.userRole == ApeConsts.presenter) { return true; } return false; } static get serverTimestamp() { return EngineUtils.creatTimestamp(); } //储存已经提前上传的文档列表 static setDocListPrepare(_data) { if (_data == null) return; this.docListPrepare = _data; } static getDocListPrepare() { return this.docListPrepare; } //储存已经提前上传的媒体共享文件列表 static setMediaShareList(_data) { if (_data == null) return; this.sharedMediaList = _data; } static getMediaShareList() { return this.sharedMediaList; } //储存已经提前上传的媒体共享文件列表 static setMusicShareList(_data) { if (_data == null) return; this.sharedMusicList = _data; } static getMusicShareList() { return this.sharedMusicList; } //储存录制列表 static setRecordList(_data) { if (_data == null) return; this.recordList = _data; } static getRecordList() { return this.recordList; } //文档服务器列表 static setDocList(_data) { if (_data == null) return; this.docList = _data; } static getDocList() { return this.docList; } //ms列表 static setMsList(_data) { if (_data == null) return; this.msList = _data; } static getMsList() { return this.msList; } //rtmpPullList列表 static setRtmpPullList(_data) { if (_data == null) return; this.rtmpPullList = _data; } static getRtmpPullList() { return this.rtmpPullList; } //hlsPullList列表 static setHlsPullList(_data) { if (_data == null) return; this.hlsPullList = _data; } static getHlsPullList() { return this.hlsPullList; } //rs列表 static setRsList(_data) { if (_data == null) return; this.rsList = _data; } static getRsList() { return this.rsList; } //mcu列表 static setMcuList(_data) { if (_data == null) return; this.mcuList = _data; } static getMcuList() { return this.mcuList; } //声音列表 static setMusicList(_data) { if (_data == null) return; this.musicList = _data; } static getMusicList() { return this.musicList; } //已经上传的声音列表 static setMusicListPrepare(_data) { if (_data == null) return; this.musicListPrepare = _data; } static getMusicListPrepare() { return this.musicListPrepare; } //CDN加速的 拉流地址 rtmp 和hls(m3u8) static setVideoCDNAddr(_data) { if (_data == null) return; //ideoCDNAddr中的地址需要进行筛选,里面包含hls开头和rtmppush开头的地址 this.videoCDNAddr = _data || ''; if (this.videoCDNAddr) { this.videoCDNAddrList = this.videoCDNAddr.split(';'); } loger.log("videoCDNAddrList->", this.videoCDNAddrList); } //把IP中的端口换成指定端口 static replacePort(_ipport, _curPort, _newPort) { loger.warn("替换端口->", _ipport, _curPort, _newPort); if (!_ipport || !_curPort) { //数据不正确,直接返回原数据 return _ipport; } try { //判断要替换的端口是否在最后的位置,否则是不能替换的,比如替换":80"端口,如果地址是"xxx.xxx.xxx:8080" 不判断的话就会出错 let lastIndex = _ipport.lastIndexOf(_curPort); if ((_ipport.length - _curPort.length) == lastIndex) { let ipportNew = _ipport.replace(_curPort, _newPort); return ipportNew } return _ipport; } catch (err) { return _ipport; } } //通过IP查找IP对象 static getIpItem(ip, ipList) { if (!ip || !ipList) { return null; } for (let i = 0; i < ipList.length; i++) { let item = ipList[i]; if (item && item.ip == ip) { return item; } } return null; } } GlobalConfig.statusCode_0 = {"code": 0, message: "SDK 未初始化"}; GlobalConfig.statusCode_1 = {"code": 1, message: "未加入课堂"}; GlobalConfig.statusCode_2 = {"code": 2, message: "已经加入课堂"}; GlobalConfig.statusCode_3 = {"code": 3, message: "已经离开课堂"}; GlobalConfig.statusCode_4 = {"code": 4, message: "未知状态"}; GlobalConfig.screenWidth = 1024; GlobalConfig.screenHeight = 768; GlobalConfig.md5 = ""; GlobalConfig.msType = 1; //目前固定用这个 GlobalConfig.messageDelay = false; //是否启用消息延迟 GlobalConfig.mcuDelay = 0; //默认的延迟时间(单位-秒) GlobalConfig.classExit = false;//是否关闭课堂,如果关闭之后不再连接MCU GlobalConfig.docDelay = 1600; //文档模块加入成功之后延迟发送送成功的消息给主模块(sdk内部使用) GlobalConfig.portal = ""; //Sass IP //从Sass获取的 GlobalConfig.country = ""; //国家 GlobalConfig.city = ""; //城市 GlobalConfig.province = ""; //服务商 GlobalConfig.isp = ""; //服务商 GlobalConfig.sharedMediaList = []; // 已经提前上传的媒体文件列表,进入课堂后需要自动加载 GlobalConfig.sharedMusicList = []; // 已经提前上传的音乐文件列表,进入课堂后需要自动加载 GlobalConfig.docListPrepare = []; // 已经提前上传的文档,进入课堂后需要自动加载 GlobalConfig.recordList = []; //录制服务器地址集合 GlobalConfig.docList = []; //文档服务器地址集合 GlobalConfig.musicList = []; //music服务器地址集合 GlobalConfig.musicListPrepare = []; //提提前上传的music集合 GlobalConfig.videoCDNAddr = ''; GlobalConfig.videoCDNAddrList = []; //从videoCDNAddr转换来的,videoCDNAddr字符串用分号隔开了多个ip //从Sass获取的数据 GlobalConfig.mcuList = []; //录制服务器地址集合 GlobalConfig.msList = []; //从Sass获取的ms推流地址集合,也可以拉流 GlobalConfig.rtmpPullList = []; //从Sass获取的rtmp拉流地址集合 GlobalConfig.hlsPullList = []; //从sasss获取的hls拉流服务器地址集合 GlobalConfig.rsList = []; //录制回放中视频hls点播地址 //从Sass获取的数据 GlobalConfig.mcuListFromSass = []; //录制服务器地址集合 GlobalConfig.msListFromSass = []; //从Sass获取的ms推流地址集合,也可以拉流 GlobalConfig.rtmpPullListFromSass = []; //从Sass获取的rtmp拉流地址集合 GlobalConfig.hlsPullListFromSass = []; //从sasss获取的hls拉流服务器地址集合 GlobalConfig.rsListFromSass = []; //录制回放中视频hls点播地址 //根据userIP从server获取的数据 GlobalConfig.mcuListFromServer = []; //根据userIP从server获取的mcu列表 GlobalConfig.msListFromServer = []; //根据userIP从server获取的ms列表 GlobalConfig.rtmpPullListFromServer = []; //根据userIP从server获取的rtmp拉流地址列表 GlobalConfig.hlsPullListFromServer = []; //根据userIP从server获取的hls拉流地址列表 GlobalConfig.rsPullListFromServer = []; //根据userIP从server获取的录制回放hls列表 //最终使用的选点列表集合-(从server.json中获取或Sass中获取) GlobalConfig.mcuListFinal = []; //最终选择的MCU集合 GlobalConfig.msListFinal = []; //最终选择的MS 推流地址集合 GlobalConfig.rtmpPullListFinal = []; //最终选择的RTMP推流地址集合 GlobalConfig.hlsPullListFinal = []; //最终选择的HLS拉流地址集合 GlobalConfig.rsPullListFinal = []; //最终选择的录制回放HLS拉流地址集合 //连接MCU的IP+端口 GlobalConfig.MCUServerIP = ""; GlobalConfig.MCUServerPort = ''; //推流地址+端口 GlobalConfig.MS_PUBLISH_IP = ""; GlobalConfig.MS_PUBLISH_PORT = ""; //rtmp 拉流地址+端口(rtmp) GlobalConfig.MS_PLAY_RTMP_IP = ""; GlobalConfig.MS_PLAY_RTMP_PORT = ""; //HLS 拉流地址+端口 (m3u8) GlobalConfig.MS_PLAY_HLS_IP = ""; GlobalConfig.MS_PLAY_HLS_PORT = ""; //录制回放 m3u8播流地址() GlobalConfig.RS_RECORD_PLAY_IP = ""; GlobalConfig.RS_RECORD_PLAY_PORT = ""; //DOC GlobalConfig.DOCServerIP = ""; GlobalConfig.DOCServerPort = ""; GlobalConfig.RecordServerIP = ""; GlobalConfig.RecordServerPort = ""; GlobalConfig.maxVideoChannels = 0; //最大视频路数 GlobalConfig.maxAudioChannels = 0; //最大音频路数 GlobalConfig.maxMediaChannels = 0; //最大音视频路数,以音视频路数中的最大值为准 GlobalConfig.hasCamera = false; //摄像头是否可用 GlobalConfig.hasMicrophone = false; //麦克风是否可用 GlobalConfig.returnCitySN = null;//获取的ip数据 {"cip":"60.253.214.122","cid":"110000","cname":"北京市"} //设备类型 0:电脑 1:ios 2:安卓 3 h5 GlobalConfig.deviceType = 0; GlobalConfig.devicePC=0; GlobalConfig.deviceIOS=1; GlobalConfig.deviceAndroid=2; GlobalConfig.deviceH5=3; GlobalConfig.userIp = ""; //用户当前IP GlobalConfig.userId = 0; GlobalConfig.paramUserId=0; GlobalConfig.userName = ""; GlobalConfig.handUpTime = 0; GlobalConfig.level = 0; GlobalConfig.openCamera = 0; GlobalConfig.openMicrophones = 0; //音视频是否被禁用 GlobalConfig.videoEnabled =true; GlobalConfig.audioEnabled=true; GlobalConfig.selfDisEnableDrawTime = 1;//记录是否禁用画笔,0为启用画笔,大于0时被禁用的时间戳 //视频质量相关设置 GlobalConfig.fps = 15; //帧频 GlobalConfig.gop = 3; //关键帧间隔(秒) GlobalConfig.videoQuality = 1; //画面质量 0-低;1-中;2-高; GlobalConfig.curVideoQuality = 1; //当前分辨率 GlobalConfig.cameras = []; //摄像头列表 GlobalConfig.microphones = []; //麦克风列表 GlobalConfig.curCamera = ""; //当前选择的摄像头 GlobalConfig.curMicrophone = ''; //当前选择的麦克风 GlobalConfig.micGain = 70; //音量(0-100)*80 GlobalConfig.micNoise = 70; //(0-100)*(-60) GlobalConfig.autoGain = false; //自动调节麦克风音量 GlobalConfig.speakerVolume = 80; //扬声器音量(0-80) GlobalConfig.micCode = 0; //麦克风模式 GlobalConfig.optionJsonData = "";//音视频模块推流时的可选参数,这个由外部传入 GlobalConfig.audioRecords = []; GlobalConfig.videoRecords = []; GlobalConfig.status = 0 GlobalConfig.mobileDirection = 0; GlobalConfig.joinTimestamp = 0; //加入课堂的时间戳 GlobalConfig.nodeId = 0; //随机生成 mcu中的唯一ID GlobalConfig.passwordRequired = false; GlobalConfig.password = ""; GlobalConfig.userType = 8; //默认是8 GlobalConfig.userRole = ApeConsts.normal; //用户的身份,5种类型: GlobalConfig.role = ApeConsts.NR_NORMAL; //课堂角色身份 GlobalConfig.h5Module = 1; //是否支持H5 GlobalConfig.topNodeID = 101; //现在固定值,还不知道是做什么用 GlobalConfig.siteId = ""; //站点号 GlobalConfig.className = ""; // 课程名称 GlobalConfig.classId = 0; //课堂号=classId=meetingNumber 之后统一修改为classId GlobalConfig.classType = ApeConsts.CLASS_TYPE_1v1; //课堂类型 GlobalConfig.classStatus = ApeConsts.CLASS_STATUS_WAIT; // 0;//课堂还未开始 1;//直播中 2 //课间休息 3已经停止 GlobalConfig.classStartTime = ""; //课堂点击开始时间 GlobalConfig.classStopTime = ""; //最后一次停止的时间(点暂停或结束),每次发送数据都获取当前时间戳 GlobalConfig.classBeginTime = ""; //课堂创建的时间,这个是Sass返回的 GlobalConfig.classEndTime = ""; //课堂结束的时间,这个是Sass返回的 GlobalConfig.classTimestamp = 0; //从课堂开始到现在的时 GlobalConfig.classJoinSuccess = false; //是否已经加入课堂 GlobalConfig.recordPlaybackMaxTime = 0; //录制回放的总时间 GlobalConfig.recordStatus = false; //当前录制状态 GlobalConfig.isEnableDraw = false; //当前所有人是否开启绘制状态(老师除外) GlobalConfig.isEnableGift = false; //当前所有人是否开启送礼物状态 GlobalConfig.silence = false; //当前课堂禁言状态 GlobalConfig.silenceUsers = {}; //当前课堂用户禁言状态 GlobalConfig.selfSilence = {}; //当前课堂禁言状态 GlobalConfig.recordTimestamp = 0; //相对于首次开始录制的进行时间 GlobalConfig.recordFileName = ""; //录制的文件名,如 果为空就创建一个 GlobalConfig.recordDownloadUrl = ""; //下载地址 GlobalConfig.recordReplaytickValues = {}; // 滚动条关键点,用于快进快退 GlobalConfig.isAutoStartClass = 0; //是否自动开始上课 0-否 ;1 是 GlobalConfig.updateRecordTimeDelay = 5; //(秒),同步一次课堂录制状态的并保存到Sass GlobalConfig.updateClassInfoDelay = 10; //(秒),同步一次课堂状态的并保存到Sass GlobalConfig.msDynamicChooseIpDelay = 60 * 3; //(秒)MS动态选点的间隔 //GlobalConfig.serverTimestamp=0;//当前的系统时间戳 用get set 获取 GlobalConfig.activeDocId = 0; //当前激活的文档ID GlobalConfig.activeDocCurPage = 1; //当前激活的文档的当前页 //白板 GlobalConfig.whiteboardId = 2359297;//白板文档的ID GlobalConfig.whiteboardJsonPath = "pclive.xuedianyun.com/DocSharing/data/whiteboard/whiteboard.json";//白板文档配置地址 //默认的白板数据 GlobalConfig.whiteboardDefault={ itemIdx: GlobalConfig.whiteboardId,//指定的白板文档ID name: "白板.pdf", creatUserId: 0, md5: "b153313f6f390328a30db5389b6cee53", pageNum: 30, docId: "b153313f6f390328a30db5389b6cee53", url: "http://pclive.xuedianyun.com/DocSharing/data/whiteboard/default/whiteboard.pdf", dynamicTransferStatic: "0", relativeUrl: "/DocSharing/data/whiteboard/default/whiteboard.pdf", fileType: "pdf", type:"pdf" }; GlobalConfig.whiteboardForSiteId=null;//站点私有的白板数据 GlobalConfig.activeMediaId = 0; //当前显示的媒体文件的id GlobalConfig.activeMediaSeek = 1; //当前的媒体文件的播放进度seek点 GlobalConfig.currentSceneTableId = 0; //文档区域的当前模块id显示的模块 0=文档模块、1=屏幕共享、2=媒体共享 GlobalConfig.classAllParam = {}; //Sass直接返回的所有课堂信息(最全) GlobalConfig.classDetail = {}; //Sass直接返回的当前课堂基本信息 GlobalConfig.isRecordPlayBack = false; //是否是录制回放,默认是否 GlobalConfig.allowRecordMaxTime = 48 * 60 * 60; //(秒)允许录制的最长时间 GlobalConfig.siteId_letv = 'shchuanbao'; //乐视,MS不需要动态选点的站点 GlobalConfig.ssTunnelAppURL = ''; //屏幕共享插件的地址 GlobalConfig.serverTime = 0; //服务器当前时间戳 GlobalConfig.serverAndLoacTimeDistanc = 0; //当前系统时间和服务器时间的差值 (秒); GlobalConfig.logUrl = ""; //日志上报地址; GlobalConfig.rosterNum = 0;//当前总人数 GlobalConfig.rosters = {};//当前课堂内的人员数据 GlobalConfig.isMobile = false; //是否是移动端 GlobalConfig.language = "";//浏览器语言 GlobalConfig.platform = "pc";//平台 IOS/ANDROID/PC GlobalConfig.explorer = "未知";//浏览器 GlobalConfig.explorerVersion = "未知";//浏览器版本 GlobalConfig.os = "未知";//系统 GlobalConfig.locationProtocol = "http://";//https;或http: GlobalConfig.websocketProtocol = "ws://";//wss或ws GlobalConfig.isHttps = false;//是否是https GlobalConfig.openFlash = false;//使用flash通话模式。默认为false,使用的是webRtc //webRtc GlobalConfig.appId = ''; GlobalConfig.appCertificate = ""; GlobalConfig.appRecordingKey = ""; GlobalConfig.channelId = ""; GlobalConfig.channelKey = ""; GlobalConfig.userUid = 0; GlobalConfig.videoScale = 1;//视频的缩放倍数,默认1倍无缩放 GlobalConfig.recordInterfaces = "";//控制开启录制和录制状态改变的接口 GlobalConfig.getRecordInfoInterfaces = "";//获取媒体录制信息数据的接口 GlobalConfig.stopRecordingInterfaces = "";//停止录制的接口 GlobalConfig.getTxRecordInfoInterfaces = "";//获取媒体录制信息数据的接口(tx) GlobalConfig.getRecordFileURLAgoInterfaces = "";//获取媒体录制信息数据的接口(ago) GlobalConfig.getChannelToken = "";//获取token的地址 GlobalConfig.recordFileSever = "";//录制文件路径和文件地址(ago) export default GlobalConfig;