AlexWang

全局及自有禁言状态

1 /* 1 /*
2 -* 全局数据管理  
3 -* */ 2 + * 全局数据管理
  3 + * */
4 import Loger from 'Loger'; 4 import Loger from 'Loger';
5 import ApeConsts from "apes/ApeConsts"; 5 import ApeConsts from "apes/ApeConsts";
6 6
@@ -8,458 +8,457 @@ let loger = Loger.getLoger('GlobalConfig'); @@ -8,458 +8,457 @@ let loger = Loger.getLoger('GlobalConfig');
8 import EngineUtils from 'EngineUtils'; 8 import EngineUtils from 'EngineUtils';
9 9
10 class GlobalConfig { 10 class GlobalConfig {
11 - constructor () {  
12 - 11 + constructor() {
  12 +
  13 + }
  14 + _currentStatus = null;
  15 +
  16 + static getCurrentStatus() {
  17 + if (this._currentStatus == null) {
  18 + this._currentStatus = this.statusCode_0;
  19 + }
  20 + return this._currentStatus;
  21 + }
  22 + static setCurrentStatus(_data) {
  23 + this._currentStatus = _data;
  24 + }
  25 + static getClassDetail() {
  26 + return this.classDetail;
  27 + }
  28 + static setClassDetail(_data) {
  29 + this.classDetail = _data;
  30 + }
  31 + static getClassInfo() {
  32 + let classInfo = {};
  33 + classInfo.siteId = this.siteId;
  34 + classInfo.classId = this.classId;
  35 + classInfo.className = this.className;
  36 + classInfo.h5Module = this.h5Module;
  37 + classInfo.nodeId = this.nodeId;
  38 + classInfo.topNodeID = this.topNodeID;
  39 + classInfo.userRole = this.userRole;
  40 + classInfo.role = this.role;
  41 + classInfo.isHost = this.isHost;
  42 + classInfo.userId = this.userId;
  43 + classInfo.userName = this.userName;
  44 + classInfo.password = this.password;
  45 + classInfo.userType = this.userType;
  46 + classInfo.passwordRequired = this.passwordRequired;
  47 + classInfo.md5 = this.md5;
  48 + classInfo.msType = this.msType;
  49 + classInfo.portal = this.portal;
  50 + classInfo.mcuDelay = this.mcuDelay;
  51 + classInfo.MCUServerIP = this.MCUServerIP;
  52 + classInfo.MCUServerPort = this.MCUServerPort;
  53 + classInfo.maxVideoChannels = this.maxVideoChannels;
  54 + classInfo.maxAudioChannels = this.maxAudioChannels;
  55 + classInfo.maxMediaChannels = this.maxMediaChannels;
  56 + classInfo.fps = this.fps;
  57 + classInfo.gop = this.gop;
  58 + classInfo.videoQuality = this.videoQuality;
  59 + classInfo.ssTunnelAppURL = this.ssTunnelAppURL;
  60 + classInfo.currentSceneTableId = this.currentSceneTableId; //文档区域的模块显示
  61 + return classInfo;
  62 +
  63 + }
  64 +
  65 + //获取当前的课堂状态的信息
  66 + static get classStatusInfo() {
  67 + let classStatusInfo = {};
  68 +
  69 + classStatusInfo.siteId = this.siteId; //站点号
  70 +
  71 + classStatusInfo.classId = this.classId;
  72 + classStatusInfo.className = this.className;
  73 + classStatusInfo.classType = this.classType; //课堂类型
  74 + classStatusInfo.classStatus = this.classStatus; //课堂的状态
  75 + classStatusInfo.classStartTime = this.classStartTime; //课堂点击开始时间
  76 + classStatusInfo.classStopTime = this.classStopTime; //最后一次停止的时间(点暂停或结束),每次发送数据都获取当前时间戳
  77 + classStatusInfo.classTimestamp = this.classTimestamp; //相对于点开始课堂的时间戳
  78 + classStatusInfo.recordPlaybackMaxTime = this.recordPlaybackMaxTime; //相对于点开始课堂的时间戳
  79 +
  80 + classStatusInfo.classBeginTime = this.classBeginTime; //课堂创建的时间,这个是Sass返回的
  81 + classStatusInfo.classEndTime = this.classEndTime; //课堂结束的时间,这个是Sass返回的
  82 +
  83 + classStatusInfo.recordStatus = this.recordStatus; //当前录制状态
  84 + classStatusInfo.silence = this.silence; //当前课堂禁言状态
  85 + classStatusInfo.selfSilence = this.selfSilence; //当前自由禁言状态
  86 + classStatusInfo.recordTimestamp = this.recordTimestamp; //相对于首次开始录制的时间戳
  87 + classStatusInfo.recordFileName = this.recordFileName; //录制的文件名
  88 + classStatusInfo.recordDownloadUrl = this.recordDownloadUrl; //下载地址
  89 +
  90 + classStatusInfo.serverTimestamp = this.serverTimestamp; //当前的系统时间戳
  91 + classStatusInfo.activeDocId = this.activeDocId; //当前激活的文档ID
  92 + classStatusInfo.activeDocCurPage = this.activeDocCurPage; //当前激活的文档的当前页
  93 +
  94 + classStatusInfo.currentSceneTableId = this.currentSceneTableId; //文档区域的模块显示
  95 + return classStatusInfo;
13 } 96 }
14 - _currentStatus=null;  
15 -  
16 - static getCurrentStatus(){  
17 - if(this._currentStatus==null){  
18 - this._currentStatus=this.statusCode_0;  
19 - }  
20 - return this._currentStatus; 97 + //设置当前的课堂状态的信息
  98 + static setClassStatusInfo(_data) {
  99 + loger.log("setClassStatusInfo");
  100 + if (_data == null) {
  101 + loger.warn("classStatusInfo error,_data:", _data);
  102 + return;
21 } 103 }
22 - static setCurrentStatus(_data){  
23 - this._currentStatus=_data; 104 + let data = _data;
  105 +
  106 + //下列的信息以从Sass获取的最新的为准
  107 + if (!this.siteId) {
  108 + this.siteId = data.siteId; //站点号
24 } 109 }
25 - static getClassDetail(){  
26 - return this.classDetail; 110 + if (!this.classId) {
  111 + this.classId = data.classId;
27 } 112 }
28 - static setClassDetail(_data){  
29 - this.classDetail=_data; 113 + if (!this.className) {
  114 + this.className = data.className;
30 } 115 }
31 - static getClassInfo (){  
32 - let classInfo={};  
33 - classInfo.siteId= this.siteId;  
34 - classInfo.classId= this.classId;  
35 - classInfo.className=this.className;  
36 - classInfo.h5Module= this.h5Module;  
37 - classInfo.nodeId=this.nodeId;  
38 - classInfo.topNodeID=this.topNodeID;  
39 - classInfo.userRole=this.userRole;  
40 - classInfo.role= this.role;  
41 - classInfo.isHost= this.isHost;  
42 - classInfo.userId= this.userId;  
43 - classInfo.userName= this.userName;  
44 - classInfo.password= this.password;  
45 - classInfo.userType= this.userType;  
46 - classInfo.passwordRequired= this.passwordRequired;  
47 - classInfo.md5=this.md5;  
48 - classInfo.msType= this.msType;  
49 - classInfo.portal= this.portal;  
50 - classInfo.mcuDelay=this.mcuDelay;  
51 - classInfo.MCUServerIP=this.MCUServerIP;  
52 - classInfo.MCUServerPort=this.MCUServerPort;  
53 - classInfo.maxVideoChannels= this.maxVideoChannels;  
54 - classInfo.maxAudioChannels=this.maxAudioChannels;  
55 - classInfo.maxMediaChannels=this.maxMediaChannels;  
56 - classInfo.fps=this.fps;  
57 - classInfo.gop=this.gop;  
58 - classInfo.videoQuality=this.videoQuality;  
59 - classInfo.ssTunnelAppURL = this.ssTunnelAppURL;  
60 - classInfo.currentSceneTableId=this.currentSceneTableId;//文档区域的模块显示  
61 - return classInfo;  
62 116
  117 + if (!this.classType) {
  118 + this.classType = data.classType;
63 } 119 }
64 -  
65 - //获取当前的课堂状态的信息  
66 - static get classStatusInfo(){  
67 - let classStatusInfo={};  
68 -  
69 - classStatusInfo.siteId=this.siteId;//站点号  
70 -  
71 - classStatusInfo.classId=this.classId;  
72 - classStatusInfo.className=this.className;  
73 - classStatusInfo.classType=this.classType;//课堂类型  
74 - classStatusInfo.classStatus=this.classStatus;//课堂的状态  
75 - classStatusInfo.classStartTime=this.classStartTime;//课堂点击开始时间  
76 - classStatusInfo.classStopTime=this.classStopTime;//最后一次停止的时间(点暂停或结束),每次发送数据都获取当前时间戳  
77 - classStatusInfo.classTimestamp=this.classTimestamp;//相对于点开始课堂的时间戳  
78 - classStatusInfo.recordPlaybackMaxTime=this.recordPlaybackMaxTime;//相对于点开始课堂的时间戳  
79 -  
80 - classStatusInfo.classBeginTime=this.classBeginTime;//课堂创建的时间,这个是Sass返回的  
81 - classStatusInfo.classEndTime=this.classEndTime;//课堂结束的时间,这个是Sass返回的  
82 -  
83 - classStatusInfo.recordStatus=this.recordStatus;//当前录制状态  
84 - classStatusInfo.recordTimestamp=this.recordTimestamp;//相对于首次开始录制的时间戳  
85 - classStatusInfo.recordFileName=this.recordFileName;//录制的文件名  
86 - classStatusInfo.recordDownloadUrl=this.recordDownloadUrl;//下载地址  
87 -  
88 - classStatusInfo.serverTimestamp=this.serverTimestamp;//当前的系统时间戳  
89 - classStatusInfo.activeDocId=this.activeDocId;//当前激活的文档ID  
90 - classStatusInfo.activeDocCurPage=this.activeDocCurPage;//当前激活的文档的当前页  
91 -  
92 - classStatusInfo.currentSceneTableId=this.currentSceneTableId;//文档区域的模块显示  
93 - return classStatusInfo; 120 + if (!this.classBeginTime) {
  121 + this.classBeginTime = data.classBeginTime; //课堂创建的时间,这个是Sass返回的
  122 + }
  123 + if (!this.classEndTime) {
  124 + this.classEndTime = data.classEndTime; //课堂结束的时间,这个是Sass返回的
94 } 125 }
95 - //设置当前的课堂状态的信息  
96 - static setClassStatusInfo(_data){  
97 - loger.log("setClassStatusInfo");  
98 - if(_data==null){  
99 - loger.warn("classStatusInfo error,_data:",_data);  
100 - return;  
101 - }  
102 - let data=_data;  
103 -  
104 - //下列的信息以从Sass获取的最新的为准  
105 - if(!this.siteId){  
106 - this.siteId=data.siteId;//站点号  
107 - }  
108 - if(!this.classId){  
109 - this.classId=data.classId;  
110 - }  
111 - if(!this.className){  
112 - this.className=data.className;  
113 - }  
114 126
115 - if(!this.classType){  
116 - this.classType=data.classType;  
117 - }  
118 - if(!this.classBeginTime){  
119 - this.classBeginTime=data.classBeginTime;//课堂创建的时间,这个是Sass返回的  
120 - }  
121 - if(!this.classEndTime){  
122 - this.classEndTime=data.classEndTime;//课堂结束的时间,这个是Sass返回的  
123 - } 127 + //下面的信息Sass和mcu都会更新
  128 + this.classStatus = data.classStatus || this.classStatus; //课堂的状态
  129 + this.classStartTime = data.classStartTime || this.classStartTime; //课堂点击开始时间
  130 + this.classStopTime = data.classStopTime || this.classStopTime; //最后一次停止的时间(点暂停或结束),每次发送数据都获取当前时间戳
  131 + this.classTimestamp = data.classTimestamp || this.classTimestamp; //相对于点开始课堂的时间戳
124 132
125 - //下面的信息Sass和mcu都会更新  
126 - this.classStatus=data.classStatus||this.classStatus;//课堂的状态  
127 - this.classStartTime=data.classStartTime||this.classStartTime;//课堂点击开始时间  
128 - this.classStopTime=data.classStopTime||this.classStopTime;//最后一次停止的时间(点暂停或结束),每次发送数据都获取当前时间戳  
129 - this.classTimestamp=data.classTimestamp||this.classTimestamp;//相对于点开始课堂的时间戳  
130 -  
131 - this.recordStatus=data.recordStatus||this.recordStatus;//当前录制状态  
132 - this.recordTimestamp=data.recordTimestamp||this.recordTimestamp;//相对于首次开始录制的时间戳  
133 - this.recordFileName=data.recordFileName||this.recordFileName;//录制的文件名  
134 - this.recordDownloadUrl=data.recordDownloadUrl||this.recordDownloadUrl;//下载地址  
135 - this.currentSceneTableId=data.currentSceneTableId||0;//文档区域的模块显示  
136 - } 133 + // 全局禁言状态
  134 + this.silence = data.silence || false;
  135 + // 自有禁言状态
  136 + this.selfSilence = data.selfSilence || '';
  137 + this.recordStatus = data.recordStatus || this.recordStatus; //当前录制状态
  138 + this.recordTimestamp = data.recordTimestamp || this.recordTimestamp; //相对于首次开始录制的时间戳
  139 + this.recordFileName = data.recordFileName || this.recordFileName; //录制的文件名
  140 + this.recordDownloadUrl = data.recordDownloadUrl || this.recordDownloadUrl; //下载地址
  141 + this.currentSceneTableId = data.currentSceneTableId || 0; //文档区域的模块显示
  142 + }
137 143
138 - // 判断自己是否主持人角色  
139 - static get isHost(){  
140 - if(this.userRole ==ApeConsts.host){  
141 - return true;  
142 - }  
143 - return false; 144 + // 判断自己是否主持人角色
  145 + static get isHost() {
  146 + if (this.userRole == ApeConsts.host) {
  147 + return true;
144 } 148 }
  149 + return false;
  150 + }
145 151
146 - // 判断自己是否助教角色  
147 - static get isAssistant()  
148 - {  
149 - if(this.userRole ==ApeConsts.assistant){  
150 - return true;  
151 - }  
152 - return false; 152 + // 判断自己是否助教角色
  153 + static get isAssistant() {
  154 + if (this.userRole == ApeConsts.assistant) {
  155 + return true;
153 } 156 }
  157 + return false;
  158 + }
154 159
155 - // 判断自己是否主讲人角色  
156 - static get isPresenter()  
157 - {  
158 - if(this.userRole ==ApeConsts.presenter){  
159 - return true;  
160 - }  
161 - return false; 160 + // 判断自己是否主讲人角色
  161 + static get isPresenter() {
  162 + if (this.userRole == ApeConsts.presenter) {
  163 + return true;
162 } 164 }
  165 + return false;
  166 + }
163 167
164 - // 判断自己是否普通角色  
165 - static get isNormal()  
166 - {  
167 - if(this.userRole ==ApeConsts.normal) {  
168 - return true;  
169 - }  
170 - return false; 168 + // 判断自己是否普通角色
  169 + static get isNormal() {
  170 + if (this.userRole == ApeConsts.normal) {
  171 + return true;
171 } 172 }
  173 + return false;
  174 + }
172 175
173 - // 判断自己是否是隐身用户  
174 - static get isInvisible(){  
175 - if(this.userRole == ApeConsts.invisible){  
176 - return true;  
177 - }  
178 - return false; 176 + // 判断自己是否是隐身用户
  177 + static get isInvisible() {
  178 + if (this.userRole == ApeConsts.invisible) {
  179 + return true;
179 } 180 }
  181 + return false;
  182 + }
180 183
181 - static get serverTimestamp(){  
182 - return EngineUtils.creatTimestamp(); 184 + static get serverTimestamp() {
  185 + return EngineUtils.creatTimestamp();
183 } 186 }
184 //储存已经提前上传的文档列表 187 //储存已经提前上传的文档列表
185 - static setDocListPrepare(_data){  
186 - if(_data==null) return;  
187 - this.docListPrepare=_data;  
188 - }  
189 - static getDocListPrepare(){  
190 - return this.docListPrepare; 188 + static setDocListPrepare(_data) {
  189 + if (_data == null) return;
  190 + this.docListPrepare = _data;
  191 + }
  192 + static getDocListPrepare() {
  193 + return this.docListPrepare;
191 } 194 }
192 //储存已经提前上传的媒体共享文件列表 195 //储存已经提前上传的媒体共享文件列表
193 - static setMediaShareList(_data){  
194 - if(_data==null) return;  
195 - this.sharedMediaList=_data;  
196 - }  
197 - static getMediaShareList(){  
198 - return this.sharedMediaList;  
199 - }  
200 -  
201 - //储存录制列表  
202 - static setRecordList(_data){  
203 - if(_data==null) return;  
204 - this.recordList=_data;  
205 - }  
206 - static getRecordList(){  
207 - return this.recordList;  
208 - }  
209 -  
210 - //文档服务器列表  
211 - static setDocList(_data){  
212 - if(_data==null) return;  
213 - this.docList=_data;  
214 - }  
215 - static getDocList(){  
216 - return this.docList; 196 + static setMediaShareList(_data) {
  197 + if (_data == null) return;
  198 + this.sharedMediaList = _data;
  199 + }
  200 + static getMediaShareList() {
  201 + return this.sharedMediaList;
  202 + }
  203 +
  204 + //储存录制列表
  205 + static setRecordList(_data) {
  206 + if (_data == null) return;
  207 + this.recordList = _data;
  208 + }
  209 + static getRecordList() {
  210 + return this.recordList;
  211 + }
  212 +
  213 + //文档服务器列表
  214 + static setDocList(_data) {
  215 + if (_data == null) return;
  216 + this.docList = _data;
  217 + }
  218 + static getDocList() {
  219 + return this.docList;
217 } 220 }
218 //ms列表 221 //ms列表
219 - static setMsList(_data){  
220 - if(_data==null) return;  
221 - //MSlist列表中的地址需要进行筛选,目前有的站点播流和推流需要分开  
222 - if(GlobalConfig.siteId==GlobalConfig.siteId_letv){  
223 - this.msList=[];  
224 - this.pullRtmpList=[];  
225 - this.hlsList=[];  
226 - let len=_data.length;  
227 - for(let i=0;i<len;i++){  
228 - let item=_data[i];  
229 - if(item&&item.ip){  
230 - if(item.ip.indexOf('pull.')>=0){  
231 - this.pullRtmpList.push(item);  
232 - }else if(item.ip.indexOf('lehls.')>=0){  
233 - this.hlsList.push(item);  
234 - }else {  
235 - this.msList.push(item);  
236 - }  
237 - }  
238 - }  
239 - loger.log("msListAll->",_data);  
240 - loger.log("msList->",this.msList);  
241 - loger.log("pullList->",this.pullRtmpList);  
242 - loger.log("hlsList->",this.hlsList);  
243 - }else {  
244 - this.msList=_data; 222 + static setMsList(_data) {
  223 + if (_data == null) return;
  224 + //MSlist列表中的地址需要进行筛选,目前有的站点播流和推流需要分开
  225 + if (GlobalConfig.siteId == GlobalConfig.siteId_letv) {
  226 + this.msList = [];
  227 + this.pullRtmpList = [];
  228 + this.hlsList = [];
  229 + let len = _data.length;
  230 + for (let i = 0; i < len; i++) {
  231 + let item = _data[i];
  232 + if (item && item.ip) {
  233 + if (item.ip.indexOf('pull.') >= 0) {
  234 + this.pullRtmpList.push(item);
  235 + } else if (item.ip.indexOf('lehls.') >= 0) {
  236 + this.hlsList.push(item);
  237 + } else {
  238 + this.msList.push(item);
  239 + }
245 } 240 }
246 - }  
247 - static getMsList(){  
248 - return this.msList;  
249 - }  
250 -  
251 - //mcu列表  
252 - static setMcuList(_data){  
253 - if(_data==null) return;  
254 - this.mcuList=_data;  
255 - }  
256 - static getMcuList(){  
257 - return this.mcuList;  
258 - }  
259 -  
260 - //声音列表  
261 - static setMusicList(_data){  
262 - if(_data==null) return;  
263 - this.musicList=_data;  
264 - }  
265 - static getMusicList(){  
266 - return this.musicList; 241 + }
  242 + loger.log("msListAll->", _data);
  243 + loger.log("msList->", this.msList);
  244 + loger.log("pullList->", this.pullRtmpList);
  245 + loger.log("hlsList->", this.hlsList);
  246 + } else {
  247 + this.msList = _data;
  248 + }
  249 + }
  250 + static getMsList() {
  251 + return this.msList;
  252 + }
  253 +
  254 + //mcu列表
  255 + static setMcuList(_data) {
  256 + if (_data == null) return;
  257 + this.mcuList = _data;
  258 + }
  259 + static getMcuList() {
  260 + return this.mcuList;
  261 + }
  262 +
  263 + //声音列表
  264 + static setMusicList(_data) {
  265 + if (_data == null) return;
  266 + this.musicList = _data;
  267 + }
  268 + static getMusicList() {
  269 + return this.musicList;
267 } 270 }
268 //已经上传的声音列表 271 //已经上传的声音列表
269 - static setMusicListPrepare(_data){  
270 - if(_data==null) return;  
271 - this.musicListPrepare=_data;  
272 - }  
273 - static getMusicListPrepare(){  
274 - return this.musicListPrepare;  
275 - }  
276 -  
277 - //rs列表  
278 - static setRsList(_data){  
279 - if(_data==null) return;  
280 - this.rsList=_data;  
281 - }  
282 - static getRsList(){  
283 - return this.rsList;  
284 - }  
285 -  
286 - //CDN加速的 拉流地址 rtmp 和hls(m3u8)  
287 - static setVideoCDNAddr(_data){  
288 - if(_data==null) return;  
289 - //ideoCDNAddr中的地址需要进行筛选,里面包含hls开头和rtmppush开头的地址  
290 - this.videoCDNAddr=_data||'';  
291 - if(this.videoCDNAddr){  
292 - this.videoCDNAddrList=this.videoCDNAddr.split(';');  
293 - }  
294 - loger.log("videoCDNAddrList->",this.videoCDNAddrList);  
295 - } 272 + static setMusicListPrepare(_data) {
  273 + if (_data == null) return;
  274 + this.musicListPrepare = _data;
  275 + }
  276 + static getMusicListPrepare() {
  277 + return this.musicListPrepare;
  278 + }
  279 +
  280 + //rs列表
  281 + static setRsList(_data) {
  282 + if (_data == null) return;
  283 + this.rsList = _data;
  284 + }
  285 + static getRsList() {
  286 + return this.rsList;
  287 + }
  288 +
  289 + //CDN加速的 拉流地址 rtmp 和hls(m3u8)
  290 + static setVideoCDNAddr(_data) {
  291 + if (_data == null) return;
  292 + //ideoCDNAddr中的地址需要进行筛选,里面包含hls开头和rtmppush开头的地址
  293 + this.videoCDNAddr = _data || '';
  294 + if (this.videoCDNAddr) {
  295 + this.videoCDNAddrList = this.videoCDNAddr.split(';');
  296 + }
  297 + loger.log("videoCDNAddrList->", this.videoCDNAddrList);
  298 + }
296 } 299 }
297 300
298 -GlobalConfig.statusCode_0={"code":0,message:"SDK 未初始化"};  
299 -GlobalConfig.statusCode_1={"code":1,message:"未加入课堂"};  
300 -GlobalConfig.statusCode_2={"code":2,message:"已经加入课堂"};  
301 -GlobalConfig.statusCode_3={"code":3,message:"已经离开课堂"};  
302 -GlobalConfig.statusCode_4={"code":4,message:"未知状态"}; 301 +GlobalConfig.statusCode_0 = { "code": 0, message: "SDK 未初始化" };
  302 +GlobalConfig.statusCode_1 = { "code": 1, message: "未加入课堂" };
  303 +GlobalConfig.statusCode_2 = { "code": 2, message: "已经加入课堂" };
  304 +GlobalConfig.statusCode_3 = { "code": 3, message: "已经离开课堂" };
  305 +GlobalConfig.statusCode_4 = { "code": 4, message: "未知状态" };
303 306
304 -GlobalConfig.screenWidth=1024;  
305 -GlobalConfig.screenHeight=768; 307 +GlobalConfig.screenWidth = 1024;
  308 +GlobalConfig.screenHeight = 768;
306 309
307 -GlobalConfig.md5="";  
308 -GlobalConfig.msType=1;//目前固定用这个  
309 -GlobalConfig.messageDelay=false;//是否启用消息延迟  
310 -GlobalConfig.mcuDelay=0;//默认的延迟时间(单位-秒) 310 +GlobalConfig.md5 = "";
  311 +GlobalConfig.msType = 1; //目前固定用这个
  312 +GlobalConfig.messageDelay = false; //是否启用消息延迟
  313 +GlobalConfig.mcuDelay = 0; //默认的延迟时间(单位-秒)
311 314
312 -GlobalConfig.docDelay=1600;//文档模块加入成功之后延迟发送送成功的消息给主模块(sdk内部使用)  
313 -GlobalConfig.portal="112.126.80.182:80";//Sass IP 315 +GlobalConfig.docDelay = 1600; //文档模块加入成功之后延迟发送送成功的消息给主模块(sdk内部使用)
  316 +GlobalConfig.portal = "112.126.80.182:80"; //Sass IP
314 317
315 //GlobalConfig.ip="112.126.80.182"; 318 //GlobalConfig.ip="112.126.80.182";
316 //GlobalConfig.port="80"; 319 //GlobalConfig.port="80";
317 320
318 //连接MCU的IP+端口 321 //连接MCU的IP+端口
319 -GlobalConfig.MCUServerIP="";  
320 -GlobalConfig.MCUServerPort=''; 322 +GlobalConfig.MCUServerIP = "";
  323 +GlobalConfig.MCUServerPort = '';
321 324
322 //推流地址+端口 325 //推流地址+端口
323 GlobalConfig.MS_PUBLISH_IP = ""; 326 GlobalConfig.MS_PUBLISH_IP = "";
324 -GlobalConfig.MS_PUBLISH_PORT =""; 327 +GlobalConfig.MS_PUBLISH_PORT = "";
325 328
326 //rtmp 拉流地址+端口(rtmp) 329 //rtmp 拉流地址+端口(rtmp)
327 -GlobalConfig.MS_PLAY_RTMP_IP="";  
328 -GlobalConfig.MS_PLAY_RTMP_PORT=""; 330 +GlobalConfig.MS_PLAY_RTMP_IP = "";
  331 +GlobalConfig.MS_PLAY_RTMP_PORT = "";
329 332
330 //HLS 拉流地址+端口 (m3u8) 333 //HLS 拉流地址+端口 (m3u8)
331 -GlobalConfig.MS_PLAY_HLS_IP="";  
332 -GlobalConfig.MS_PLAY_HLS_PORT="";  
333 - 334 +GlobalConfig.MS_PLAY_HLS_IP = "";
  335 +GlobalConfig.MS_PLAY_HLS_PORT = "";
334 336
335 //录制回放 m3u8播流地址() 337 //录制回放 m3u8播流地址()
336 -GlobalConfig.RS_RECORD_PLAY_IP ="";  
337 -GlobalConfig.RS_RECORD_PLAY_PORT =""; 338 +GlobalConfig.RS_RECORD_PLAY_IP = "";
  339 +GlobalConfig.RS_RECORD_PLAY_PORT = "";
338 340
339 //DOC 341 //DOC
340 -GlobalConfig.DOCServerIP ="";  
341 -GlobalConfig.DOCServerPort ="";  
342 -  
343 -GlobalConfig.RecordServerIP ="";  
344 -GlobalConfig.RecordServerPort ="";  
345 -  
346 -GlobalConfig.maxVideoChannels=0;//最大视频路数  
347 -GlobalConfig.maxAudioChannels=0;//最大音频路数  
348 -GlobalConfig.maxMediaChannels=0;//最大音视频路数,以音视频路数中的最大值为准  
349 -  
350 -GlobalConfig.hasCamera=false;//摄像头是否可用  
351 -GlobalConfig.hasMicrophone=false;//麦克风是否可用  
352 -  
353 -GlobalConfig.deviceType=0; //设备类型 0:电脑 1:安卓 2:ios  
354 -GlobalConfig.userIp="";//用户当前IP  
355 -GlobalConfig.userId=0;  
356 -GlobalConfig.userName="";  
357 -GlobalConfig.handUpTime=0;  
358 -GlobalConfig.level=0;  
359 -GlobalConfig.openCamera=0;  
360 -GlobalConfig.openMicrophones=0; 342 +GlobalConfig.DOCServerIP = "";
  343 +GlobalConfig.DOCServerPort = "";
  344 +
  345 +GlobalConfig.RecordServerIP = "";
  346 +GlobalConfig.RecordServerPort = "";
  347 +
  348 +GlobalConfig.maxVideoChannels = 0; //最大视频路数
  349 +GlobalConfig.maxAudioChannels = 0; //最大音频路数
  350 +GlobalConfig.maxMediaChannels = 0; //最大音视频路数,以音视频路数中的最大值为准
  351 +
  352 +GlobalConfig.hasCamera = false; //摄像头是否可用
  353 +GlobalConfig.hasMicrophone = false; //麦克风是否可用
  354 +
  355 +GlobalConfig.deviceType = 0; //设备类型 0:电脑 1:安卓 2:ios
  356 +GlobalConfig.userIp = ""; //用户当前IP
  357 +GlobalConfig.userId = 0;
  358 +GlobalConfig.userName = "";
  359 +GlobalConfig.handUpTime = 0;
  360 +GlobalConfig.level = 0;
  361 +GlobalConfig.openCamera = 0;
  362 +GlobalConfig.openMicrophones = 0;
361 //视频质量相关设置 363 //视频质量相关设置
362 -GlobalConfig.fps=15;//帧频  
363 -GlobalConfig.gop=3;//关键帧间隔(秒)  
364 -GlobalConfig.videoQuality=2;//画面质量 0-低;1-中;2-高;  
365 -GlobalConfig.curVideoQuality=2;//当前分辨率  
366 -GlobalConfig.cameras=[];//摄像头列表  
367 -GlobalConfig.microphones=[];//麦克风列表  
368 -  
369 -GlobalConfig.curCamera="";//当前选择的摄像头  
370 -GlobalConfig.curMicrophone='';//当前选择的麦克风  
371 -GlobalConfig.micGain=50;//音量(0-80)  
372 -GlobalConfig.speakerVolume=50;//扬声器音量(0-80)  
373 -GlobalConfig.micCode=0;//麦克风模式  
374 -  
375 -  
376 -GlobalConfig.audioRecords=[];  
377 -GlobalConfig.videoRecords=[];  
378 -GlobalConfig.status=0  
379 -GlobalConfig.mobileDirection=0;  
380 -  
381 -  
382 -GlobalConfig.nodeId=0;//随机生成 mcu中的唯一ID  
383 -GlobalConfig.passwordRequired=false;  
384 -GlobalConfig.password="";  
385 -GlobalConfig.userType=8;//默认是8  
386 -GlobalConfig.userRole=ApeConsts.normal;//用户的身份,5种类型:  
387 -GlobalConfig.role=ApeConsts.NR_NORMAL;//课堂角色身份  
388 -  
389 -GlobalConfig.h5Module=1;//是否支持H5  
390 -GlobalConfig.topNodeID=101;//现在固定值,还不知道是做什么用  
391 -  
392 -GlobalConfig.siteId="";//站点号  
393 -GlobalConfig.className= ""; // 课程名称  
394 -GlobalConfig.classId=0;//课堂号=classId=meetingNumber 之后统一修改为classId  
395 -GlobalConfig.classType=ApeConsts.CLASS_TYPE_1;//课堂类型  
396 -GlobalConfig.classStatus=ApeConsts.CLASS_STATUS_WAIT;// 0;//课堂还未开始 1;//直播中 2 //课间休息 3已经停止  
397 -GlobalConfig.classStartTime="";//课堂点击开始时间  
398 -GlobalConfig.classStopTime="";//最后一次停止的时间(点暂停或结束),每次发送数据都获取当前时间戳  
399 -GlobalConfig.classBeginTime="";//课堂创建的时间,这个是Sass返回的  
400 -GlobalConfig.classEndTime="";//课堂结束的时间,这个是Sass返回的  
401 -GlobalConfig.classTimestamp=0;//从课堂开始到现在的时  
402 -GlobalConfig.classJoinSuccess=false;//是否已经加入课堂  
403 -GlobalConfig.recordPlaybackMaxTime=0;//录制回放的总时间  
404 -GlobalConfig.recordStatus=false;//当前录制状态  
405 -GlobalConfig.recordTimestamp=0;//相对于首次开始录制的进行时间  
406 -GlobalConfig.recordFileName="";//录制的文件名,如 果为空就创建一个  
407 -GlobalConfig.recordDownloadUrl="";//下载地址  
408 -GlobalConfig.recordReplaytickValues={}; // 滚动条关键点,用于快进快退  
409 -  
410 -GlobalConfig.isAutoStartClass=0;//是否自动开始上课 0-否 ;1 是  
411 -  
412 -GlobalConfig.updateClassInfoDelay=30;//(秒),每隔30秒同步一次课堂状态的并保存到Sass  
413 -GlobalConfig.msDynamicChooseIpDelay=15;//(秒)MS动态选点的间隔 364 +GlobalConfig.fps = 15; //帧频
  365 +GlobalConfig.gop = 3; //关键帧间隔(秒)
  366 +GlobalConfig.videoQuality = 2; //画面质量 0-低;1-中;2-高;
  367 +GlobalConfig.curVideoQuality = 2; //当前分辨率
  368 +GlobalConfig.cameras = []; //摄像头列表
  369 +GlobalConfig.microphones = []; //麦克风列表
  370 +
  371 +GlobalConfig.curCamera = ""; //当前选择的摄像头
  372 +GlobalConfig.curMicrophone = ''; //当前选择的麦克风
  373 +GlobalConfig.micGain = 50; //音量(0-80)
  374 +GlobalConfig.speakerVolume = 50; //扬声器音量(0-80)
  375 +GlobalConfig.micCode = 0; //麦克风模式
  376 +
  377 +GlobalConfig.audioRecords = [];
  378 +GlobalConfig.videoRecords = [];
  379 +GlobalConfig.status = 0
  380 +GlobalConfig.mobileDirection = 0;
  381 +
  382 +GlobalConfig.nodeId = 0; //随机生成 mcu中的唯一ID
  383 +GlobalConfig.passwordRequired = false;
  384 +GlobalConfig.password = "";
  385 +GlobalConfig.userType = 8; //默认是8
  386 +GlobalConfig.userRole = ApeConsts.normal; //用户的身份,5种类型:
  387 +GlobalConfig.role = ApeConsts.NR_NORMAL; //课堂角色身份
  388 +
  389 +GlobalConfig.h5Module = 1; //是否支持H5
  390 +GlobalConfig.topNodeID = 101; //现在固定值,还不知道是做什么用
  391 +
  392 +GlobalConfig.siteId = ""; //站点号
  393 +GlobalConfig.className = ""; // 课程名称
  394 +GlobalConfig.classId = 0; //课堂号=classId=meetingNumber 之后统一修改为classId
  395 +GlobalConfig.classType = ApeConsts.CLASS_TYPE_1; //课堂类型
  396 +GlobalConfig.classStatus = ApeConsts.CLASS_STATUS_WAIT; // 0;//课堂还未开始 1;//直播中 2 //课间休息 3已经停止
  397 +GlobalConfig.classStartTime = ""; //课堂点击开始时间
  398 +GlobalConfig.classStopTime = ""; //最后一次停止的时间(点暂停或结束),每次发送数据都获取当前时间戳
  399 +GlobalConfig.classBeginTime = ""; //课堂创建的时间,这个是Sass返回的
  400 +GlobalConfig.classEndTime = ""; //课堂结束的时间,这个是Sass返回的
  401 +GlobalConfig.classTimestamp = 0; //从课堂开始到现在的时
  402 +GlobalConfig.classJoinSuccess = false; //是否已经加入课堂
  403 +GlobalConfig.recordPlaybackMaxTime = 0; //录制回放的总时间
  404 +GlobalConfig.recordStatus = false; //当前录制状态
  405 +GlobalConfig.silence = false; //当前课堂禁言状态
  406 +GlobalConfig.selfSilence = ''; //当前课堂禁言状态
  407 +GlobalConfig.recordTimestamp = 0; //相对于首次开始录制的进行时间
  408 +GlobalConfig.recordFileName = ""; //录制的文件名,如 果为空就创建一个
  409 +GlobalConfig.recordDownloadUrl = ""; //下载地址
  410 +GlobalConfig.recordReplaytickValues = {}; // 滚动条关键点,用于快进快退
  411 +
  412 +GlobalConfig.isAutoStartClass = 0; //是否自动开始上课 0-否 ;1 是
  413 +
  414 +GlobalConfig.updateClassInfoDelay = 30; //(秒),每隔30秒同步一次课堂状态的并保存到Sass
  415 +GlobalConfig.msDynamicChooseIpDelay = 15; //(秒)MS动态选点的间隔
414 //GlobalConfig.serverTimestamp=0;//当前的系统时间戳 用get set 获取 416 //GlobalConfig.serverTimestamp=0;//当前的系统时间戳 用get set 获取
415 417
  418 +GlobalConfig.activeDocId = 0; //当前激活的文档ID
  419 +GlobalConfig.activeDocCurPage = 1; //当前激活的文档的当前页
416 420
417 -GlobalConfig.activeDocId=0;//当前激活的文档ID  
418 -GlobalConfig.activeDocCurPage=1;//当前激活的文档的当前页 421 +GlobalConfig.activeMediaId = 0; //当前显示的媒体文件的id
  422 +GlobalConfig.activeMediaSeek = 1; //当前的媒体文件的播放进度seek点
419 423
420 -GlobalConfig.activeMediaId=0;//当前显示的媒体文件的id  
421 -GlobalConfig.activeMediaSeek=1;//当前的媒体文件的播放进度seek点 424 +GlobalConfig.currentSceneTableId = 0; //文档区域的当前模块id显示的模块 0=文档模块、1=屏幕共享、2=媒体共享
422 425
423 -GlobalConfig.currentSceneTableId=0;//文档区域的当前模块id显示的模块 0=文档模块、1=屏幕共享、2=媒体共享  
424 -  
425 -GlobalConfig.classAllParam={};//Sass直接返回的所有课堂信息(最全)  
426 -GlobalConfig.classDetail={};//Sass直接返回的当前课堂基本信息 426 +GlobalConfig.classAllParam = {}; //Sass直接返回的所有课堂信息(最全)
  427 +GlobalConfig.classDetail = {}; //Sass直接返回的当前课堂基本信息
427 428
428 //从Sass获取的 429 //从Sass获取的
429 -GlobalConfig.sharedMediaList=[]; // 已经提前上传的媒体文件列表,进入课堂后需要自动加载  
430 -GlobalConfig.docListPrepare=[]; // 已经提前上传的文档,进入课堂后需要自动加载  
431 -GlobalConfig.recordList=[];//录制服务器地址集合  
432 -GlobalConfig.docList=[];//文档服务器地址集合  
433 -GlobalConfig.mcuList=[];//录制服务器地址集合  
434 -GlobalConfig.msList=[];//ms服务器地址集合  
435 -GlobalConfig.musicList=[];//music服务器地址集合  
436 -GlobalConfig.musicListPrepare=[];//提提前上传的music集合  
437 -GlobalConfig.rsList=[];//录制回放中视频点播地址  
438 -GlobalConfig.videoCDNAddr='';  
439 -GlobalConfig.videoCDNAddrList=[];//从videoCDNAddr转换来的,videoCDNAddr字符串用分号隔开了多个ip 430 +GlobalConfig.sharedMediaList = []; // 已经提前上传的媒体文件列表,进入课堂后需要自动加载
  431 +GlobalConfig.docListPrepare = []; // 已经提前上传的文档,进入课堂后需要自动加载
  432 +GlobalConfig.recordList = []; //录制服务器地址集合
  433 +GlobalConfig.docList = []; //文档服务器地址集合
  434 +GlobalConfig.mcuList = []; //录制服务器地址集合
  435 +GlobalConfig.msList = []; //ms服务器地址集合
  436 +GlobalConfig.musicList = []; //music服务器地址集合
  437 +GlobalConfig.musicListPrepare = []; //提提前上传的music集合
  438 +GlobalConfig.rsList = []; //录制回放中视频点播地址
  439 +GlobalConfig.videoCDNAddr = '';
  440 +GlobalConfig.videoCDNAddrList = []; //从videoCDNAddr转换来的,videoCDNAddr字符串用分号隔开了多个ip
440 441
441 //乐视的推流和播放需要分开 442 //乐视的推流和播放需要分开
442 -GlobalConfig.pullRtmpList=[];//rtmp播流地址集合(推流和播流地址需要区分的站点使用)  
443 -GlobalConfig.hlsList=[];//hls播流地址集合(推流和播流地址需要区分的站点使用) 443 +GlobalConfig.pullRtmpList = []; //rtmp播流地址集合(推流和播流地址需要区分的站点使用)
  444 +GlobalConfig.hlsList = []; //hls播流地址集合(推流和播流地址需要区分的站点使用)
444 445
445 //根据IP从server获取 446 //根据IP从server获取
446 -GlobalConfig.mcuListFromServer=[];//根据userIP从server获取的mcu列表  
447 -GlobalConfig.msListFromServer=[];//根据userIP从server获取的ms列表  
448 -GlobalConfig.country ="";//国家  
449 -GlobalConfig.city ="";//城市  
450 -GlobalConfig.province = "";//服务商  
451 -GlobalConfig.isp ="";//服务商  
452 -  
453 -  
454 -GlobalConfig.mcuListAll=[];//所有MCU集合(sass+server)  
455 -GlobalConfig.msListAll=[];//所有MS集合(sass+server) 447 +GlobalConfig.mcuListFromServer = []; //根据userIP从server获取的mcu列表
  448 +GlobalConfig.msListFromServer = []; //根据userIP从server获取的ms列表
  449 +GlobalConfig.country = ""; //国家
  450 +GlobalConfig.city = ""; //城市
  451 +GlobalConfig.province = ""; //服务商
  452 +GlobalConfig.isp = ""; //服务商
456 453
457 -GlobalConfig.isRecordPlayBack=false;//是否是录制回放,默认是否  
458 -GlobalConfig.allowRecordMaxTime=14400;//(秒)允许录制的最长时间,默认是4小时 454 +GlobalConfig.mcuListAll = []; //所有MCU集合(sass+server)
  455 +GlobalConfig.msListAll = []; //所有MS集合(sass+server)
459 456
460 -GlobalConfig.siteId_letv='shchuanbao';//乐视,MS不需要动态选点的站点  
461 -GlobalConfig.ssTunnelAppURL='';//屏幕共享插件的地址 457 +GlobalConfig.isRecordPlayBack = false; //是否是录制回放,默认是否
  458 +GlobalConfig.allowRecordMaxTime = 14400; //(秒)允许录制的最长时间,默认是4小时
462 459
  460 +GlobalConfig.siteId_letv = 'shchuanbao'; //乐视,MS不需要动态选点的站点
  461 +GlobalConfig.ssTunnelAppURL = ''; //屏幕共享插件的地址
463 462
  463 +export default GlobalConfig;
464 464
465 -export default GlobalConfig;