正在显示
5 个修改的文件
包含
195 行增加
和
219 行删除
| @@ -62,7 +62,7 @@ export default class MessageEntrance extends Emiter { | @@ -62,7 +62,7 @@ export default class MessageEntrance extends Emiter { | ||
| 62 | constructor() { | 62 | constructor() { |
| 63 | super(); | 63 | super(); |
| 64 | //sdk 信息 | 64 | //sdk 信息 |
| 65 | - GlobalConfig.sdkVersion = "v2.14.5.20170927"; | 65 | + GlobalConfig.sdkVersion = "v2.15.3.20170929"; |
| 66 | loger.warn("sdkVersion:" + GlobalConfig.sdkVersion); | 66 | loger.warn("sdkVersion:" + GlobalConfig.sdkVersion); |
| 67 | 67 | ||
| 68 | //设置 | 68 | //设置 |
| @@ -297,6 +297,7 @@ export default class MessageEntrance extends Emiter { | @@ -297,6 +297,7 @@ export default class MessageEntrance extends Emiter { | ||
| 297 | this.setAppConfig=this._setAppConfig.bind(this); | 297 | this.setAppConfig=this._setAppConfig.bind(this); |
| 298 | this.recordControl=this._mediaRecordControl.bind(this); | 298 | this.recordControl=this._mediaRecordControl.bind(this); |
| 299 | 299 | ||
| 300 | + this.changeRtcVideoConfig=this._changeRtcVideoConfig.bind(this);//设置webRtc视频视图的缩放 | ||
| 300 | 301 | ||
| 301 | this.setDeviceInfo = this._setDeviceInfo.bind(this); //设置设备信息(麦克风,摄像头等等.....) | 302 | this.setDeviceInfo = this._setDeviceInfo.bind(this); //设置设备信息(麦克风,摄像头等等.....) |
| 302 | this.setMessageDelay = this._setMessageDelay.bind(this); //设置是否延迟消息 | 303 | this.setMessageDelay = this._setMessageDelay.bind(this); //设置是否延迟消息 |
| @@ -2916,6 +2917,30 @@ export default class MessageEntrance extends Emiter { | @@ -2916,6 +2917,30 @@ export default class MessageEntrance extends Emiter { | ||
| 2916 | } | 2917 | } |
| 2917 | 2918 | ||
| 2918 | /* | 2919 | /* |
| 2920 | + * 设置RTC视频属性 | ||
| 2921 | + * */ | ||
| 2922 | + _changeRtcVideoConfig(_params){ | ||
| 2923 | + loger.log("设置RTC视频属性",_params); | ||
| 2924 | + if(!_params){ | ||
| 2925 | + return; | ||
| 2926 | + } | ||
| 2927 | + if(GlobalConfig.deviceType==1||GlobalConfig.deviceType==2){ | ||
| 2928 | + return; | ||
| 2929 | + } | ||
| 2930 | + if(_webRtc){ | ||
| 2931 | + _webRtc.changeRtcVideoConfig(_params); | ||
| 2932 | + | ||
| 2933 | + //如果是老师操作,需要同步给所有人 | ||
| 2934 | + if(GlobalConfig.isHost){ | ||
| 2935 | + if(_confer_ape){ | ||
| 2936 | + GlobalConfig.videoScale=_params.videoScale||1; | ||
| 2937 | + _confer_ape.sendUpdaterClassStatusInfo({videoScale:_params.videoScale}); | ||
| 2938 | + } | ||
| 2939 | + } | ||
| 2940 | + } | ||
| 2941 | + } | ||
| 2942 | + | ||
| 2943 | + /* | ||
| 2919 | * 设置监课和需要隐藏显示的用户视图 | 2944 | * 设置监课和需要隐藏显示的用户视图 |
| 2920 | * */ | 2945 | * */ |
| 2921 | _setInvisibleMediaView(_params){ | 2946 | _setInvisibleMediaView(_params){ |
| @@ -101,6 +101,7 @@ class GlobalConfig { | @@ -101,6 +101,7 @@ class GlobalConfig { | ||
| 101 | 101 | ||
| 102 | classStatusInfo.currentSceneTableId = this.currentSceneTableId; //文档区域的模块显示 | 102 | classStatusInfo.currentSceneTableId = this.currentSceneTableId; //文档区域的模块显示 |
| 103 | classStatusInfo.serverAndLoacTimeDistanc = this.serverAndLoacTimeDistanc; | 103 | classStatusInfo.serverAndLoacTimeDistanc = this.serverAndLoacTimeDistanc; |
| 104 | + classStatusInfo.videoScale=this.videoScale; | ||
| 104 | return classStatusInfo; | 105 | return classStatusInfo; |
| 105 | } | 106 | } |
| 106 | //设置当前的课堂状态的信息 | 107 | //设置当前的课堂状态的信息 |
| @@ -148,6 +149,7 @@ class GlobalConfig { | @@ -148,6 +149,7 @@ class GlobalConfig { | ||
| 148 | this.currentSceneTableId = data.currentSceneTableId || 0; //文档区域的模块显示 | 149 | this.currentSceneTableId = data.currentSceneTableId || 0; //文档区域的模块显示 |
| 149 | 150 | ||
| 150 | this.isEnableDraw=data.isEnableDraw||false;//是否开启所有人的绘制权限 | 151 | this.isEnableDraw=data.isEnableDraw||false;//是否开启所有人的绘制权限 |
| 152 | + this.videoScale=parseInt(data.videoScale)||1; | ||
| 151 | // 全局禁言状态 | 153 | // 全局禁言状态 |
| 152 | this.silence = data.silence || false; | 154 | this.silence = data.silence || false; |
| 153 | this.silenceUsers =data.silenceUsers || {}; | 155 | this.silenceUsers =data.silenceUsers || {}; |
| @@ -607,5 +609,8 @@ GlobalConfig.stopRecordingInterfaces="";//停止录制的接口 | @@ -607,5 +609,8 @@ GlobalConfig.stopRecordingInterfaces="";//停止录制的接口 | ||
| 607 | GlobalConfig.getTxRecordInfoInterfaces="";//获取媒体录制信息数据的接口(tx) | 609 | GlobalConfig.getTxRecordInfoInterfaces="";//获取媒体录制信息数据的接口(tx) |
| 608 | 610 | ||
| 609 | GlobalConfig.getChannelToken="";//获取token的地址 | 611 | GlobalConfig.getChannelToken="";//获取token的地址 |
| 612 | + | ||
| 613 | +GlobalConfig.videoScale=1;//视频的缩放倍数,默认1倍无缩放 | ||
| 614 | + | ||
| 610 | export default GlobalConfig; | 615 | export default GlobalConfig; |
| 611 | 616 |
| @@ -130,7 +130,7 @@ class ConferApe extends Ape { | @@ -130,7 +130,7 @@ class ConferApe extends Ape { | ||
| 130 | nodeInfoRecordPdu.city = GlobalConfig.city; //城市 | 130 | nodeInfoRecordPdu.city = GlobalConfig.city; //城市 |
| 131 | nodeInfoRecordPdu.province = GlobalConfig.province; //服务商 | 131 | nodeInfoRecordPdu.province = GlobalConfig.province; //服务商 |
| 132 | nodeInfoRecordPdu.isp = GlobalConfig.isp; //服务商 | 132 | nodeInfoRecordPdu.isp = GlobalConfig.isp; //服务商 |
| 133 | - nodeInfoRecordPdu.msList=[]; | 133 | + nodeInfoRecordPdu.msList = []; |
| 134 | //用户的MS列表 | 134 | //用户的MS列表 |
| 135 | let msListAll = GlobalConfig.msListFinal; | 135 | let msListAll = GlobalConfig.msListFinal; |
| 136 | for (let k = 0; k < msListAll.length; k++) { | 136 | for (let k = 0; k < msListAll.length; k++) { |
| @@ -257,10 +257,10 @@ class ConferApe extends Ape { | @@ -257,10 +257,10 @@ class ConferApe extends Ape { | ||
| 257 | //conferRecordSendPdu.classTime = GlobalConfig.classTimestamp;//不能使用课堂进行时间,这个时间结束课堂的时候会被清除 | 257 | //conferRecordSendPdu.classTime = GlobalConfig.classTimestamp;//不能使用课堂进行时间,这个时间结束课堂的时候会被清除 |
| 258 | conferRecordSendPdu.classTime = GlobalConfig.recordTimestamp; //课堂录制的累积时间,不会被清除 | 258 | conferRecordSendPdu.classTime = GlobalConfig.recordTimestamp; //课堂录制的累积时间,不会被清除 |
| 259 | conferRecordSendPdu.filename = GlobalConfig.recordFileName || GlobalConfig.classId + "_" + EngineUtils.creatTimestampYMD() + ".rec"; | 259 | conferRecordSendPdu.filename = GlobalConfig.recordFileName || GlobalConfig.classId + "_" + EngineUtils.creatTimestampYMD() + ".rec"; |
| 260 | - if(GlobalConfig.recordStatus){ | ||
| 261 | - loger.log("发送录制的指令->开启",conferRecordSendPdu); | ||
| 262 | - }else { | ||
| 263 | - loger.log("发送录制的指令->停止",conferRecordSendPdu); | 260 | + if (GlobalConfig.recordStatus) { |
| 261 | + loger.log("发送录制的指令->开启", conferRecordSendPdu); | ||
| 262 | + } else { | ||
| 263 | + loger.log("发送录制的指令->停止", conferRecordSendPdu); | ||
| 264 | } | 264 | } |
| 265 | this.sendChatUniform(conferRecordSendPdu); | 265 | this.sendChatUniform(conferRecordSendPdu); |
| 266 | } | 266 | } |
| @@ -273,64 +273,65 @@ class ConferApe extends Ape { | @@ -273,64 +273,65 @@ class ConferApe extends Ape { | ||
| 273 | return; | 273 | return; |
| 274 | } | 274 | } |
| 275 | //如果已经开始录制就不再开启 | 275 | //如果已经开始录制就不再开启 |
| 276 | - if(GlobalConfig.recordStatus&&this.rosterLen>1){ | ||
| 277 | - loger.warn('目前已经是录制状态->当前课堂人数:'+this.rosterLen); | 276 | + if (GlobalConfig.recordStatus && this.rosterLen > 1) { |
| 277 | + loger.warn('目前已经是录制状态->当前课堂人数:' + this.rosterLen); | ||
| 278 | return false; | 278 | return false; |
| 279 | } | 279 | } |
| 280 | //如果是host或者当前课堂只有1个人 | 280 | //如果是host或者当前课堂只有1个人 |
| 281 | if (this.checkHasRecordControl()) { | 281 | if (this.checkHasRecordControl()) { |
| 282 | - loger.warn('开启录制', "isHost", GlobalConfig.isHost, "recordStatus", GlobalConfig.recordStatus,"当前人数:"+this.rosterLen); | 282 | + loger.warn('开启录制', "isHost", GlobalConfig.isHost, "recordStatus", GlobalConfig.recordStatus, "当前人数:" + this.rosterLen); |
| 283 | //如果录制的文件名不存在,需要创建一个名字 | 283 | //如果录制的文件名不存在,需要创建一个名字 |
| 284 | let timestampYMD = EngineUtils.creatTimestampYMD(); | 284 | let timestampYMD = EngineUtils.creatTimestampYMD(); |
| 285 | - if(!GlobalConfig.recordFileName){ | ||
| 286 | - GlobalConfig.recordFileName=GlobalConfig.siteId + "/" + timestampYMD + "/" + GlobalConfig.classId + "_" + timestampYMD + ".rec"; //4、文件名称 $RECORD_HOME/`site id`/`日期`/`filename` 例:/data/record/su/20161216/`filename` | 285 | + if (!GlobalConfig.recordFileName) { |
| 286 | + GlobalConfig.recordFileName = GlobalConfig.siteId + "/" + timestampYMD + "/" + GlobalConfig.classId + "_" + timestampYMD + ".rec"; //4、文件名称 $RECORD_HOME/`site id`/`日期`/`filename` 例:/data/record/su/20161216/`filename` | ||
| 287 | } | 287 | } |
| 288 | GlobalConfig.classStopTime = EngineUtils.creatTimestampStr(); | 288 | GlobalConfig.classStopTime = EngineUtils.creatTimestampStr(); |
| 289 | - this.sendConferRecordMsg({"recordStatus": true}); | ||
| 290 | - this._emit(MessageTypes.CLASS_STATUS_INFO_CHANGE); | ||
| 291 | - this._emit(MessageTypes.CLASS_RECORD_START); //课堂开始录制 | 289 | + this.sendConferRecordMsg({"recordStatus": true}); |
| 290 | + this._emit(MessageTypes.CLASS_STATUS_INFO_CHANGE); | ||
| 291 | + this._emit(MessageTypes.CLASS_RECORD_START); //课堂开始录制 | ||
| 292 | } | 292 | } |
| 293 | } | 293 | } |
| 294 | 294 | ||
| 295 | //检测是否有控制录制操作的权限 | 295 | //检测是否有控制录制操作的权限 |
| 296 | - checkHasRecordControl(){ | 296 | + checkHasRecordControl() { |
| 297 | //loger.warn('检测是否有控制录制操作的权限', "isHost", GlobalConfig.isHost, "recordStatus", GlobalConfig.recordStatus,"当前人数:"+this.rosterLen); | 297 | //loger.warn('检测是否有控制录制操作的权限', "isHost", GlobalConfig.isHost, "recordStatus", GlobalConfig.recordStatus,"当前人数:"+this.rosterLen); |
| 298 | //1.如果自己是老师或者当前课堂只有一个人 | 298 | //1.如果自己是老师或者当前课堂只有一个人 |
| 299 | - if(GlobalConfig.isHost||this.rosterLen<=1){ | 299 | + if (GlobalConfig.isHost || this.rosterLen <= 1) { |
| 300 | return true; | 300 | return true; |
| 301 | } | 301 | } |
| 302 | //2.如果自己不是老师,需要判断当前课堂内是否有老师,如果有老师就不做操作 | 302 | //2.如果自己不是老师,需要判断当前课堂内是否有老师,如果有老师就不做操作 |
| 303 | - for(let i in this.rosters){ | 303 | + for (let i in this.rosters) { |
| 304 | //如果就老师就停止 | 304 | //如果就老师就停止 |
| 305 | - let rosterItem=this.rosters[i]; | ||
| 306 | - if(rosterItem&&rosterItem.userRole==ApeConsts.host){ | 305 | + let rosterItem = this.rosters[i]; |
| 306 | + if (rosterItem && rosterItem.userRole == ApeConsts.host) { | ||
| 307 | return false; | 307 | return false; |
| 308 | } | 308 | } |
| 309 | } | 309 | } |
| 310 | //3.课堂内有多个人并且都不是老师,选择一个nodeId最小的来操作 | 310 | //3.课堂内有多个人并且都不是老师,选择一个nodeId最小的来操作 |
| 311 | - for(let k in this.rosters){ | 311 | + for (let k in this.rosters) { |
| 312 | //如果选择的nodeId是自己就有权限,否则没有权限 | 312 | //如果选择的nodeId是自己就有权限,否则没有权限 |
| 313 | - if(k==GlobalConfig.nodeId){ | 313 | + if (k == GlobalConfig.nodeId) { |
| 314 | return true; | 314 | return true; |
| 315 | - }else { | 315 | + } else { |
| 316 | return false; | 316 | return false; |
| 317 | } | 317 | } |
| 318 | } | 318 | } |
| 319 | return false | 319 | return false |
| 320 | } | 320 | } |
| 321 | + | ||
| 321 | //停止录制 | 322 | //停止录制 |
| 322 | stopRecord(isForce) { | 323 | stopRecord(isForce) { |
| 323 | //判断是否有权限 | 324 | //判断是否有权限 |
| 324 | - if (this.checkHasRecordControl()){ | 325 | + if (this.checkHasRecordControl()) { |
| 325 | loger.warn('停止录制', "isHost", GlobalConfig.isHost, "recordStatus", GlobalConfig.recordStatus); | 326 | loger.warn('停止录制', "isHost", GlobalConfig.isHost, "recordStatus", GlobalConfig.recordStatus); |
| 326 | //this.sendUpdaterClassStatusInfo({"actionType":GlobalConfig.classStatus, isStopAllPublishMedia: true}); | 327 | //this.sendUpdaterClassStatusInfo({"actionType":GlobalConfig.classStatus, isStopAllPublishMedia: true}); |
| 327 | this.sendConferMsg({"to": 0, "message": "STOP_ALL_PUBLISH", "actionType": ApeConsts.STOP_ALL_PUBLISH}); | 328 | this.sendConferMsg({"to": 0, "message": "STOP_ALL_PUBLISH", "actionType": ApeConsts.STOP_ALL_PUBLISH}); |
| 328 | - setTimeout(()=>{ | 329 | + setTimeout(()=> { |
| 329 | GlobalConfig.classStopTime = EngineUtils.creatTimestampStr(); | 330 | GlobalConfig.classStopTime = EngineUtils.creatTimestampStr(); |
| 330 | this._emit(MessageTypes.CLASS_STATUS_INFO_CHANGE); | 331 | this._emit(MessageTypes.CLASS_STATUS_INFO_CHANGE); |
| 331 | this.sendConferRecordMsg({"recordStatus": false}); | 332 | this.sendConferRecordMsg({"recordStatus": false}); |
| 332 | - },2000); | ||
| 333 | - }else { | 333 | + }, 2000); |
| 334 | + } else { | ||
| 334 | loger.warn('没有权限停止录制', "isHost", GlobalConfig.isHost, "recordStatus", GlobalConfig.recordStatus); | 335 | loger.warn('没有权限停止录制', "isHost", GlobalConfig.isHost, "recordStatus", GlobalConfig.recordStatus); |
| 335 | } | 336 | } |
| 336 | } | 337 | } |
| @@ -394,8 +395,9 @@ class ConferApe extends Ape { | @@ -394,8 +395,9 @@ class ConferApe extends Ape { | ||
| 394 | loger.warn('学生没有开启禁言的权限'); | 395 | loger.warn('学生没有开启禁言的权限'); |
| 395 | } | 396 | } |
| 396 | } | 397 | } |
| 398 | + | ||
| 397 | //全局绘制权限控制 | 399 | //全局绘制权限控制 |
| 398 | - changeDrawStatus(params){ | 400 | + changeDrawStatus(params) { |
| 399 | if (!GlobalConfig.isNormal) { | 401 | if (!GlobalConfig.isNormal) { |
| 400 | //同步禁言状态 | 402 | //同步禁言状态 |
| 401 | if (params && params.isEnableDraw == true) { | 403 | if (params && params.isEnableDraw == true) { |
| @@ -408,12 +410,13 @@ class ConferApe extends Ape { | @@ -408,12 +410,13 @@ class ConferApe extends Ape { | ||
| 408 | loger.warn('学生没有开启绘制的权限'); | 410 | loger.warn('学生没有开启绘制的权限'); |
| 409 | } | 411 | } |
| 410 | } | 412 | } |
| 413 | + | ||
| 411 | //控制指定用户的画笔状态 | 414 | //控制指定用户的画笔状态 |
| 412 | - changeUserDrawStatus(_param){ | 415 | + changeUserDrawStatus(_param) { |
| 413 | loger.log('控制指定用户的画笔状态->', _param); | 416 | loger.log('控制指定用户的画笔状态->', _param); |
| 414 | if (_param && _param.isDisEnableDraw == true) { | 417 | if (_param && _param.isDisEnableDraw == true) { |
| 415 | //举手 | 418 | //举手 |
| 416 | - GlobalConfig.selfDisEnableDrawTime=EngineUtils.creatTimestamp();//被禁用画笔的时间 | 419 | + GlobalConfig.selfDisEnableDrawTime = EngineUtils.creatTimestamp();//被禁用画笔的时间 |
| 417 | } else { | 420 | } else { |
| 418 | GlobalConfig.selfDisEnableDrawTime = 0; //取消禁用画笔 | 421 | GlobalConfig.selfDisEnableDrawTime = 0; //取消禁用画笔 |
| 419 | } | 422 | } |
| @@ -426,12 +429,12 @@ class ConferApe extends Ape { | @@ -426,12 +429,12 @@ class ConferApe extends Ape { | ||
| 426 | let timestamp = EngineUtils.creatTimestampStr(); | 429 | let timestamp = EngineUtils.creatTimestampStr(); |
| 427 | GlobalConfig.classStopTime = timestamp; | 430 | GlobalConfig.classStopTime = timestamp; |
| 428 | 431 | ||
| 429 | -/* | ||
| 430 | - //如果录制的文件名不存在,需要创建一个名字 | ||
| 431 | - let timestampYMD = EngineUtils.creatTimestampYMD(); | ||
| 432 | - GlobalConfig.recordFileName = GlobalConfig.recordFileName || | ||
| 433 | - GlobalConfig.siteId + "/" + timestampYMD + "/" + GlobalConfig.classId + "_" + timestampYMD + ".rec"; //4、文件名称 $RECORD_HOME/`site id`/`日期`/`filename` 例:/data/record/su/20161216/`filename` | ||
| 434 | -*/ | 432 | + /* |
| 433 | + //如果录制的文件名不存在,需要创建一个名字 | ||
| 434 | + let timestampYMD = EngineUtils.creatTimestampYMD(); | ||
| 435 | + GlobalConfig.recordFileName = GlobalConfig.recordFileName || | ||
| 436 | + GlobalConfig.siteId + "/" + timestampYMD + "/" + GlobalConfig.classId + "_" + timestampYMD + ".rec"; //4、文件名称 $RECORD_HOME/`site id`/`日期`/`filename` 例:/data/record/su/20161216/`filename` | ||
| 437 | + */ | ||
| 435 | 438 | ||
| 436 | if (GlobalConfig.classStatus == ApeConsts.CLASS_STATUS_WAIT) { | 439 | if (GlobalConfig.classStatus == ApeConsts.CLASS_STATUS_WAIT) { |
| 437 | //之前是为开始状态,第一次点开始 | 440 | //之前是为开始状态,第一次点开始 |
| @@ -530,25 +533,26 @@ class ConferApe extends Ape { | @@ -530,25 +533,26 @@ class ConferApe extends Ape { | ||
| 530 | console.log(_param); | 533 | console.log(_param); |
| 531 | } | 534 | } |
| 532 | } | 535 | } |
| 536 | + | ||
| 533 | //控制画笔的使用状态 | 537 | //控制画笔的使用状态 |
| 534 | controlDrawStatus(_param) { | 538 | controlDrawStatus(_param) { |
| 535 | - //控制用户的举手状态 | ||
| 536 | - if (!_param || !_param.nodeId) { | ||
| 537 | - loger.log('控制画笔的使用状态->失败->参数错误', _param); | ||
| 538 | - return; | ||
| 539 | - } | ||
| 540 | - let msgObj = {}; | ||
| 541 | - msgObj.nodeId = _param.nodeId; | ||
| 542 | - msgObj.isDisEnableDraw = false; | ||
| 543 | - if (_param && _param.isDisEnableDraw == true) { | ||
| 544 | - msgObj.isDisEnableDraw = true; | ||
| 545 | - } | ||
| 546 | - this.sendConferMsg({ | ||
| 547 | - "to": _param.nodeId, | ||
| 548 | - "message": JSON.stringify(msgObj), | ||
| 549 | - "actionType": ApeConsts.CLASS_ACTION_DRAW_STATUS_CHANGE | ||
| 550 | - }); | 539 | + //控制用户的举手状态 |
| 540 | + if (!_param || !_param.nodeId) { | ||
| 541 | + loger.log('控制画笔的使用状态->失败->参数错误', _param); | ||
| 542 | + return; | ||
| 543 | + } | ||
| 544 | + let msgObj = {}; | ||
| 545 | + msgObj.nodeId = _param.nodeId; | ||
| 546 | + msgObj.isDisEnableDraw = false; | ||
| 547 | + if (_param && _param.isDisEnableDraw == true) { | ||
| 548 | + msgObj.isDisEnableDraw = true; | ||
| 551 | } | 549 | } |
| 550 | + this.sendConferMsg({ | ||
| 551 | + "to": _param.nodeId, | ||
| 552 | + "message": JSON.stringify(msgObj), | ||
| 553 | + "actionType": ApeConsts.CLASS_ACTION_DRAW_STATUS_CHANGE | ||
| 554 | + }); | ||
| 555 | + } | ||
| 552 | 556 | ||
| 553 | //控制举手状态 | 557 | //控制举手状态 |
| 554 | controlHandUpStatus(_param) { | 558 | controlHandUpStatus(_param) { |
| @@ -589,7 +593,7 @@ class ConferApe extends Ape { | @@ -589,7 +593,7 @@ class ConferApe extends Ape { | ||
| 589 | } | 593 | } |
| 590 | loger.log('切换文档-媒体-屏幕模块切换->', _param); | 594 | loger.log('切换文档-媒体-屏幕模块切换->', _param); |
| 591 | //如果是host身份 | 595 | //如果是host身份 |
| 592 | - if (GlobalConfig.isHost) { | 596 | + if (GlobalConfig.isHost||GlobalConfig.isAssistant||GlobalConfig.isPresenter) { |
| 593 | if (_param) { | 597 | if (_param) { |
| 594 | GlobalConfig.currentSceneTableId = parseInt(_param.currentSceneTableId) || 0; //当前场景显示的模块 0=文档模块、1=屏幕共享、2=媒体共享 | 598 | GlobalConfig.currentSceneTableId = parseInt(_param.currentSceneTableId) || 0; //当前场景显示的模块 0=文档模块、1=屏幕共享、2=媒体共享 |
| 595 | //保存数据到Sass | 599 | //保存数据到Sass |
| @@ -604,7 +608,7 @@ class ConferApe extends Ape { | @@ -604,7 +608,7 @@ class ConferApe extends Ape { | ||
| 604 | //更新课堂信息 | 608 | //更新课堂信息 |
| 605 | sendUpdaterClassStatusInfo(_param) { | 609 | sendUpdaterClassStatusInfo(_param) { |
| 606 | //{"actionType": 1,isStopAllPublishMedia:false} //actionType课堂状态 isStopAllPublishMedia是否停止当前的所有推流 | 610 | //{"actionType": 1,isStopAllPublishMedia:false} //actionType课堂状态 isStopAllPublishMedia是否停止当前的所有推流 |
| 607 | - //loger.log('发送更新课堂信息->'); | 611 | + //loger.log('发送更新课堂信息->'); |
| 608 | if (_param == null || EngineUtils.isEmptyObject(_param)) { | 612 | if (_param == null || EngineUtils.isEmptyObject(_param)) { |
| 609 | loger.log('发送更新课堂信息->参数错误'); | 613 | loger.log('发送更新课堂信息->参数错误'); |
| 610 | this._emit(MessageTypes.MCU_ERROR, MessageTypes.ERR_APE_INTERFACE_PARAM_WRONG); | 614 | this._emit(MessageTypes.MCU_ERROR, MessageTypes.ERR_APE_INTERFACE_PARAM_WRONG); |
| @@ -651,32 +655,18 @@ class ConferApe extends Ape { | @@ -651,32 +655,18 @@ class ConferApe extends Ape { | ||
| 651 | /////收到消息处理///////////////////////////////////////////////////////////////////////////////// | 655 | /////收到消息处理///////////////////////////////////////////////////////////////////////////////// |
| 652 | //加入channel成功 | 656 | //加入channel成功 |
| 653 | onJoinChannelHandlerSuccess() { | 657 | onJoinChannelHandlerSuccess() { |
| 654 | - if(GlobalConfig.isRecordPlayBack){ | ||
| 655 | - loger.log('课堂模块初始完成->当前是录制回放:'+ GlobalConfig.classStatus); | 658 | + if (GlobalConfig.isRecordPlayBack) { |
| 659 | + loger.log('课堂模块初始完成->当前是录制回放:' + GlobalConfig.classStatus); | ||
| 656 | return; | 660 | return; |
| 657 | } | 661 | } |
| 658 | - loger.log('课堂模块初始完成->当前课堂状态:'+ GlobalConfig.classStatus,"recordStatus:"+GlobalConfig.recordStatus); | 662 | + loger.log('课堂模块初始完成->当前课堂状态:' + GlobalConfig.classStatus, "recordStatus:" + GlobalConfig.recordStatus); |
| 659 | this.timerCounter.addTimerCallBack(this.timerCounterUptate.bind(this), 1); | 663 | this.timerCounter.addTimerCallBack(this.timerCounterUptate.bind(this), 1); |
| 660 | this.startTimerCounter(); | 664 | this.startTimerCounter(); |
| 661 | this.startClass(); | 665 | this.startClass(); |
| 662 | clearTimeout(this.startRecordTimer); | 666 | clearTimeout(this.startRecordTimer); |
| 663 | - this.startRecordTimer=setTimeout(()=>{ | ||
| 664 | - this.startRecord(); | ||
| 665 | - },2000); | ||
| 666 | - | ||
| 667 | - /* //如果当前课堂正在进行中,开启计时器 | ||
| 668 | - if (GlobalConfig.classStatus == ApeConsts.CLASS_STATUS_STARTED) { | ||
| 669 | - //开始计时 | ||
| 670 | - this.startTimerCounter(); | 667 | + this.startRecordTimer = setTimeout(()=> { |
| 671 | this.startRecord(); | 668 | this.startRecord(); |
| 672 | - } else if (GlobalConfig.classStatus == ApeConsts.CLASS_STATUS_WAIT && | ||
| 673 | - GlobalConfig.isHost && GlobalConfig.isAutoStartClass && !GlobalConfig.isRecordPlayBack) { | ||
| 674 | - //自动开始上课的4个条件 | ||
| 675 | - //1.如果自己是host,2.Sass配置的是自动开始上课,3.并且当前是未开始状态,4.当前不是录制回放,开始自动上课 | ||
| 676 | - loger.log('自动开始上课->classStatus:', GlobalConfig.classStatus, " isHost:", GlobalConfig.isHost, " isAutoStartClass:", GlobalConfig.isAutoStartClass, " isRecordPlayBack:", GlobalConfig.isRecordPlayBack); | ||
| 677 | - this.startClass(); | ||
| 678 | - }*/ | ||
| 679 | - | 669 | + }, 2000); |
| 680 | } | 670 | } |
| 681 | 671 | ||
| 682 | //开启计时器 | 672 | //开启计时器 |
| @@ -707,17 +697,17 @@ class ConferApe extends Ape { | @@ -707,17 +697,17 @@ class ConferApe extends Ape { | ||
| 707 | //向应用层更新当前课堂进行的时间长度 (秒) | 697 | //向应用层更新当前课堂进行的时间长度 (秒) |
| 708 | this._emit(MessageTypes.CLASS_UPDATE_TIMER, {"classTimestamp": GlobalConfig.classTimestamp}); | 698 | this._emit(MessageTypes.CLASS_UPDATE_TIMER, {"classTimestamp": GlobalConfig.classTimestamp}); |
| 709 | 699 | ||
| 710 | - /* 录制消息已经更新了数据,这个课堂内的就不需要再更新,间隔太短了频率太高 | ||
| 711 | - //以一定的时间间隔同步课堂内所有人的累积上课时间 | ||
| 712 | - if (GlobalConfig.classTimestamp % GlobalConfig.updateClassInfoDelay == 0) { | ||
| 713 | - //如果是host身份,需要同步时间给其他人,同时把当前的状态上传到服务器 | ||
| 714 | - if (this.checkHasRecordControl()) { | ||
| 715 | - //保存数据到Sass | ||
| 716 | - this._emit(MessageTypes.CLASS_STATUS_INFO_CHANGE); | ||
| 717 | - //同步消息给其他人 | ||
| 718 | - this.sendUpdaterClassStatusInfo({"actionType": ApeConsts.CLASS_STATUS_STARTED, isStopAllPublishMedia: false}); | ||
| 719 | - } | ||
| 720 | - }*/ | 700 | + /* 录制消息已经更新了数据,这个课堂内的就不需要再更新,间隔太短了频率太高 |
| 701 | + //以一定的时间间隔同步课堂内所有人的累积上课时间 | ||
| 702 | + if (GlobalConfig.classTimestamp % GlobalConfig.updateClassInfoDelay == 0) { | ||
| 703 | + //如果是host身份,需要同步时间给其他人,同时把当前的状态上传到服务器 | ||
| 704 | + if (this.checkHasRecordControl()) { | ||
| 705 | + //保存数据到Sass | ||
| 706 | + this._emit(MessageTypes.CLASS_STATUS_INFO_CHANGE); | ||
| 707 | + //同步消息给其他人 | ||
| 708 | + this.sendUpdaterClassStatusInfo({"actionType": ApeConsts.CLASS_STATUS_STARTED, isStopAllPublishMedia: false}); | ||
| 709 | + } | ||
| 710 | + }*/ | ||
| 721 | 711 | ||
| 722 | //进行MS动态选点,选择最快的MS服务器地址(录制回放不做处理) | 712 | //进行MS动态选点,选择最快的MS服务器地址(录制回放不做处理) |
| 723 | if (!GlobalConfig.isRecordPlayBack && GlobalConfig.classTimestamp % GlobalConfig.msDynamicChooseIpDelay == 0) { | 713 | if (!GlobalConfig.isRecordPlayBack && GlobalConfig.classTimestamp % GlobalConfig.msDynamicChooseIpDelay == 0) { |
| @@ -730,7 +720,6 @@ class ConferApe extends Ape { | @@ -730,7 +720,6 @@ class ConferApe extends Ape { | ||
| 730 | } | 720 | } |
| 731 | } | 721 | } |
| 732 | 722 | ||
| 733 | - | ||
| 734 | //更新录制进行时间 | 723 | //更新录制进行时间 |
| 735 | GlobalConfig.recordTimestamp = GlobalConfig.recordTimestamp + 1; | 724 | GlobalConfig.recordTimestamp = GlobalConfig.recordTimestamp + 1; |
| 736 | if (this.checkHasRecordControl()) { | 725 | if (this.checkHasRecordControl()) { |
| @@ -745,83 +734,6 @@ class ConferApe extends Ape { | @@ -745,83 +734,6 @@ class ConferApe extends Ape { | ||
| 745 | this.sendUpdaterClassStatusInfo({"actionType": GlobalConfig.classStatus, isStopAllPublishMedia: false}); | 734 | this.sendUpdaterClassStatusInfo({"actionType": GlobalConfig.classStatus, isStopAllPublishMedia: false}); |
| 746 | } | 735 | } |
| 747 | } | 736 | } |
| 748 | - /* if (GlobalConfig.classStatus == ApeConsts.CLASS_STATUS_STARTED) { | ||
| 749 | - GlobalConfig.classTimestamp = GlobalConfig.classTimestamp + 1; //计时 | ||
| 750 | - //老师身份的时候要记录录制的时间 | ||
| 751 | - if (GlobalConfig.isHost||this.rosterLen<=1) { | ||
| 752 | - GlobalConfig.recordTimestamp = GlobalConfig.recordTimestamp + 1; | ||
| 753 | - } | ||
| 754 | - //向应用层更新当前课堂进行的时间长度 (秒) | ||
| 755 | - this._emit(MessageTypes.CLASS_UPDATE_TIMER, {"classTimestamp": GlobalConfig.classTimestamp}); | ||
| 756 | - | ||
| 757 | - //以一定的时间间隔同步课堂内所有人的累积上课时间 | ||
| 758 | - if (GlobalConfig.classTimestamp % GlobalConfig.updateClassInfoDelay == 0) { | ||
| 759 | - //如果是host身份,需要同步时间给其他人,同时把当前的状态上传到服务器 | ||
| 760 | - if (GlobalConfig.isHost||this.rosterLen<=1) { | ||
| 761 | - //保存数据到Sass | ||
| 762 | - this._emit(MessageTypes.CLASS_STATUS_INFO_CHANGE); | ||
| 763 | - //同步消息给其他人 | ||
| 764 | - this.sendUpdaterClassStatusInfo({"actionType": ApeConsts.CLASS_STATUS_STARTED, isStopAllPublishMedia: false}); | ||
| 765 | - } | ||
| 766 | - } | ||
| 767 | - | ||
| 768 | - //进行MS动态选点,选择最快的MS服务器地址(录制回放不做处理) | ||
| 769 | - if (!GlobalConfig.isRecordPlayBack && GlobalConfig.classTimestamp % GlobalConfig.msDynamicChooseIpDelay == 0) { | ||
| 770 | - //MS推流选点 | ||
| 771 | - this._emit(MessageTypes.SWITCH_MS_IP); | ||
| 772 | - //MS拉流选点 | ||
| 773 | - this._emit(MessageTypes.SWITCH_RTMP_PULL_IP); | ||
| 774 | - //HLS拉流选点 | ||
| 775 | - this._emit(MessageTypes.SWITCH_HLS_IP); | ||
| 776 | - } | ||
| 777 | - }else { | ||
| 778 | - //课堂暂停或未开始的情况下,如果已经开始录制,需要更新录制的时间 | ||
| 779 | - if (GlobalConfig.isHost||this.rosterLen<=1) { | ||
| 780 | - GlobalConfig.recordTimestamp = GlobalConfig.recordTimestamp + 1; | ||
| 781 | - //以一定的时间间隔同步课堂内所有人的累积上课时间 | ||
| 782 | - if (GlobalConfig.classTimestamp % GlobalConfig.updateClassInfoDelay == 0) { | ||
| 783 | - //保存数据到Sass | ||
| 784 | - this._emit(MessageTypes.CLASS_STATUS_INFO_CHANGE); | ||
| 785 | - //同步消息给其他人 | ||
| 786 | - this.sendUpdaterClassStatusInfo({"actionType": ApeConsts.CLASS_STATUS_STARTED, isStopAllPublishMedia: false}); | ||
| 787 | - } | ||
| 788 | - } | ||
| 789 | - }*/ | ||
| 790 | - | ||
| 791 | - /* //如果还没开始或已经暂停、关闭,不做计时处理 | ||
| 792 | - if (GlobalConfig.classStatus != ApeConsts.CLASS_STATUS_STARTED) { | ||
| 793 | - loger.warn('当前课堂已经暂停或者未开始,不计时', "classStatus-->", GlobalConfig.classStatus); | ||
| 794 | - return; | ||
| 795 | - } | ||
| 796 | - GlobalConfig.classTimestamp = GlobalConfig.classTimestamp + 1; //计时 | ||
| 797 | - | ||
| 798 | - //老师身份的时候要记录录制的时间 | ||
| 799 | - if (GlobalConfig.isHost) { | ||
| 800 | - GlobalConfig.recordTimestamp = GlobalConfig.recordTimestamp + 1; | ||
| 801 | - } | ||
| 802 | - //向应用层更新当前课堂进行的时间长度 (秒) | ||
| 803 | - this._emit(MessageTypes.CLASS_UPDATE_TIMER, {"classTimestamp": GlobalConfig.classTimestamp}); | ||
| 804 | - | ||
| 805 | - //以一定的时间间隔同步课堂内所有人的累积上课时间 | ||
| 806 | - if (GlobalConfig.classTimestamp % GlobalConfig.updateClassInfoDelay == 0) { | ||
| 807 | - //如果是host身份,需要同步时间给其他人,同时把当前的状态上传到服务器 | ||
| 808 | - if (GlobalConfig.isHost) { | ||
| 809 | - //保存数据到Sass | ||
| 810 | - this._emit(MessageTypes.CLASS_STATUS_INFO_CHANGE); | ||
| 811 | - //同步消息给其他人 | ||
| 812 | - this.sendUpdaterClassStatusInfo({"actionType": ApeConsts.CLASS_STATUS_STARTED, isStopAllPublishMedia: false}); | ||
| 813 | - } | ||
| 814 | - } | ||
| 815 | - | ||
| 816 | - //进行MS动态选点,选择最快的MS服务器地址(录制回放不做处理) | ||
| 817 | - if (!GlobalConfig.isRecordPlayBack && GlobalConfig.classTimestamp % GlobalConfig.msDynamicChooseIpDelay == 0) { | ||
| 818 | - //MS推流选点 | ||
| 819 | - this._emit(MessageTypes.SWITCH_MS_IP); | ||
| 820 | - //MS拉流选点 | ||
| 821 | - this._emit(MessageTypes.SWITCH_RTMP_PULL_IP); | ||
| 822 | - //HLS拉流选点 | ||
| 823 | - this._emit(MessageTypes.SWITCH_HLS_IP); | ||
| 824 | - }*/ | ||
| 825 | } | 737 | } |
| 826 | 738 | ||
| 827 | tableUpdateHandler(owner, itemIdx, itemData) { | 739 | tableUpdateHandler(owner, itemIdx, itemData) { |
| @@ -831,7 +743,7 @@ class ConferApe extends Ape { | @@ -831,7 +743,7 @@ class ConferApe extends Ape { | ||
| 831 | //{"itemIdx":720899,"from":976168842,"owner":976168842,"actionType":null,"classStatusInfo":{"nodeId":976168842,"userId":"user_979813","userName":"user_979813","siteId":"markettest","classId":889112694,"className":"ly828-1v1","classType":1,"classStatus":1,"classStartTime":"2017-8-28-16-33-18","classStopTime":"2017-8-29-11-9-28","classTimestamp":1930,"classBeginTime":"2017-08-28 16:00:00","classEndTime":"2017-08-31 18:00:00","recordStatus":false,"recordTimestamp":2825,"recordFileName":"markettest/20170828/889112694_20170828.rec","recordDownloadUrl":"","serverTimestamp":1503976246,"activeDocId":976170739,"activeDocCurPage":1,"isStopAllPublishMedia":false,"currentSceneTableId":0,"silence":false,"silenceUsers":"{}","isEnableDraw":true}} | 743 | //{"itemIdx":720899,"from":976168842,"owner":976168842,"actionType":null,"classStatusInfo":{"nodeId":976168842,"userId":"user_979813","userName":"user_979813","siteId":"markettest","classId":889112694,"className":"ly828-1v1","classType":1,"classStatus":1,"classStartTime":"2017-8-28-16-33-18","classStopTime":"2017-8-29-11-9-28","classTimestamp":1930,"classBeginTime":"2017-08-28 16:00:00","classEndTime":"2017-08-31 18:00:00","recordStatus":false,"recordTimestamp":2825,"recordFileName":"markettest/20170828/889112694_20170828.rec","recordDownloadUrl":"","serverTimestamp":1503976246,"activeDocId":976170739,"activeDocCurPage":1,"isStopAllPublishMedia":false,"currentSceneTableId":0,"silence":false,"silenceUsers":"{}","isEnableDraw":true}} |
| 832 | //处理课堂更新的信息 | 744 | //处理课堂更新的信息 |
| 833 | if (model && model.classStatusInfo) { | 745 | if (model && model.classStatusInfo) { |
| 834 | - // loger.log("课堂更新->",model.classStatusInfo); | 746 | + // loger.log("课堂更新->",model.classStatusInfo); |
| 835 | try { | 747 | try { |
| 836 | model.classStatusInfo.silenceUsers = JSON.parse(model.classStatusInfo.silenceUsers); | 748 | model.classStatusInfo.silenceUsers = JSON.parse(model.classStatusInfo.silenceUsers); |
| 837 | } catch (err) { | 749 | } catch (err) { |
| @@ -843,7 +755,7 @@ class ConferApe extends Ape { | @@ -843,7 +755,7 @@ class ConferApe extends Ape { | ||
| 843 | this._emit(MessageTypes.STOP_ALL_MEDIA_PUBLISH); | 755 | this._emit(MessageTypes.STOP_ALL_MEDIA_PUBLISH); |
| 844 | } | 756 | } |
| 845 | } | 757 | } |
| 846 | - // loger.log('课堂数据更新->'); | 758 | + // loger.log('课堂数据更新->'); |
| 847 | //通知应用层更新课堂状态 | 759 | //通知应用层更新课堂状态 |
| 848 | let classInfo = GlobalConfig.classStatusInfo; | 760 | let classInfo = GlobalConfig.classStatusInfo; |
| 849 | //loger.log('通知应用层更新课堂状态->CLASS_UPTATE_STATUS') | 761 | //loger.log('通知应用层更新课堂状态->CLASS_UPTATE_STATUS') |
| @@ -855,14 +767,6 @@ class ConferApe extends Ape { | @@ -855,14 +767,6 @@ class ConferApe extends Ape { | ||
| 855 | this.stopTimerCounter(); | 767 | this.stopTimerCounter(); |
| 856 | return; | 768 | return; |
| 857 | } | 769 | } |
| 858 | - | ||
| 859 | - /* if (GlobalConfig.classStatus == ApeConsts.CLASS_STATUS_STARTED) { | ||
| 860 | - //如果课堂在进行中,开始计时器 | ||
| 861 | - this.startTimerCounter(); | ||
| 862 | - } else { | ||
| 863 | - //停止计时 | ||
| 864 | - this.stopTimerCounter(); | ||
| 865 | - }*/ | ||
| 866 | } catch (err) { | 770 | } catch (err) { |
| 867 | loger.warn('课堂更新->error', err.message); | 771 | loger.warn('课堂更新->error', err.message); |
| 868 | } | 772 | } |
| @@ -883,9 +787,9 @@ class ConferApe extends Ape { | @@ -883,9 +787,9 @@ class ConferApe extends Ape { | ||
| 883 | //关闭之前停止所有推流 | 787 | //关闭之前停止所有推流 |
| 884 | this._emit(MessageTypes.STOP_ALL_MEDIA_PUBLISH); | 788 | this._emit(MessageTypes.STOP_ALL_MEDIA_PUBLISH); |
| 885 | //收到课堂关闭,所有人都退出,执行自己关闭的流程 | 789 | //收到课堂关闭,所有人都退出,执行自己关闭的流程 |
| 886 | - setTimeout(()=>{ | 790 | + setTimeout(()=> { |
| 887 | this._emit(MessageTypes.CLASS_RUN_EXIT, {'type': 1}); | 791 | this._emit(MessageTypes.CLASS_RUN_EXIT, {'type': 1}); |
| 888 | - },2000); | 792 | + }, 2000); |
| 889 | break; | 793 | break; |
| 890 | case ApeConsts.STOP_ALL_PUBLISH: | 794 | case ApeConsts.STOP_ALL_PUBLISH: |
| 891 | this._emit(MessageTypes.STOP_ALL_MEDIA_PUBLISH); | 795 | this._emit(MessageTypes.STOP_ALL_MEDIA_PUBLISH); |
| @@ -1010,12 +914,12 @@ class ConferApe extends Ape { | @@ -1010,12 +914,12 @@ class ConferApe extends Ape { | ||
| 1010 | //{"initiator":564398684,"record":true,"classTime":39,"filename":"markettest/20170823/1096250804_20170823.rec"}//开启成功 | 914 | //{"initiator":564398684,"record":true,"classTime":39,"filename":"markettest/20170823/1096250804_20170823.rec"}//开启成功 |
| 1011 | //{"initiator":564398684,"record":false,"classTime":39,"filename":"markettest/20170823/1096250804_20170823.rec"} //停止成功 | 915 | //{"initiator":564398684,"record":false,"classTime":39,"filename":"markettest/20170823/1096250804_20170823.rec"} //停止成功 |
| 1012 | loger.warn("录制回放控制操作成功->", conferRecordSendPdu); | 916 | loger.warn("录制回放控制操作成功->", conferRecordSendPdu); |
| 1013 | - if (conferRecordSendPdu ){ | ||
| 1014 | - if(conferRecordSendPdu.record == true || conferRecordSendPdu.record == "true") { | 917 | + if (conferRecordSendPdu) { |
| 918 | + if (conferRecordSendPdu.record == true || conferRecordSendPdu.record == "true") { | ||
| 1015 | //每次开启录制的时候,需要把当前显示的文档数据更新一次,否则无法录制已经显示的文件 | 919 | //每次开启录制的时候,需要把当前显示的文档数据更新一次,否则无法录制已经显示的文件 |
| 1016 | loger.warn("MCU已经开启录制"); | 920 | loger.warn("MCU已经开启录制"); |
| 1017 | this._emit(MessageTypes.CLASS_RECORD_SUCCESS); | 921 | this._emit(MessageTypes.CLASS_RECORD_SUCCESS); |
| 1018 | - }else{ | 922 | + } else { |
| 1019 | //停止录制成功 | 923 | //停止录制成功 |
| 1020 | loger.warn("MCU已经停止录制"); | 924 | loger.warn("MCU已经停止录制"); |
| 1021 | } | 925 | } |
| @@ -1045,18 +949,16 @@ class ConferApe extends Ape { | @@ -1045,18 +949,16 @@ class ConferApe extends Ape { | ||
| 1045 | // 1.当前课堂只有自己;2.自己的身份不是host;3当前的课堂状态为(CLASS_STATUS_STARTED= 1;//直播中) | 949 | // 1.当前课堂只有自己;2.自己的身份不是host;3当前的课堂状态为(CLASS_STATUS_STARTED= 1;//直播中) |
| 1046 | this.rosterLen = Object.keys(this.rosters).length; | 950 | this.rosterLen = Object.keys(this.rosters).length; |
| 1047 | GlobalConfig.rosterNumber = this.rosterLen;//记录当前的总人数 | 951 | GlobalConfig.rosterNumber = this.rosterLen;//记录当前的总人数 |
| 1048 | - /* if (this.rosterLen <=1 && !GlobalConfig.isHost && GlobalConfig.classStatus == ApeConsts.CLASS_STATUS_STARTED) { | ||
| 1049 | - loger.warn("当前课堂没有老师->暂停课堂"); | ||
| 1050 | - this.pauseClass({isForce: true}); | ||
| 1051 | - //this.stopRecord(true); | ||
| 1052 | - }*/ | 952 | + /* if (this.rosterLen <=1 && !GlobalConfig.isHost && GlobalConfig.classStatus == ApeConsts.CLASS_STATUS_STARTED) { |
| 953 | + loger.warn("当前课堂没有老师->暂停课堂"); | ||
| 954 | + this.pauseClass({isForce: true}); | ||
| 955 | + //this.stopRecord(true); | ||
| 956 | + }*/ | ||
| 1053 | //处理用户信息 | 957 | //处理用户信息 |
| 1054 | this.unPackRosterInfo(nodeId, nodeData); | 958 | this.unPackRosterInfo(nodeId, nodeData); |
| 1055 | return; | 959 | return; |
| 1056 | } | 960 | } |
| 1057 | 961 | ||
| 1058 | - //loger.log(nodeId, "加入课堂,role-->", nodeData.role, ApeConsts.userTypes[nodeData.role]); | ||
| 1059 | - | ||
| 1060 | //新加入的人员不是自己 | 962 | //新加入的人员不是自己 |
| 1061 | //1.判断进入的用户身份,如果进入的人身份是host,助教,监课,并且和自己的身份冲突,自己会被踢掉 | 963 | //1.判断进入的用户身份,如果进入的人身份是host,助教,监课,并且和自己的身份冲突,自己会被踢掉 |
| 1062 | //2.最后进入的人会踢掉之前进入的人,nodeId是按时间戳生成的,最后进入的人nodeId的值比之前进入的人大 | 964 | //2.最后进入的人会踢掉之前进入的人,nodeId是按时间戳生成的,最后进入的人nodeId的值比之前进入的人大 |
| @@ -1069,35 +971,15 @@ class ConferApe extends Ape { | @@ -1069,35 +971,15 @@ class ConferApe extends Ape { | ||
| 1069 | deviceType: nodeData.deviceType | 971 | deviceType: nodeData.deviceType |
| 1070 | } | 972 | } |
| 1071 | if (nodeData.role == ApeConsts.NR_HOST && GlobalConfig.isHost) { | 973 | if (nodeData.role == ApeConsts.NR_HOST && GlobalConfig.isHost) { |
| 1072 | - loger.warn("相同身份的人进入->自己被踢出->进入的人员信息","userName:"+ nodeData.name,"userId:"+ nodeData.userId,"userRole:"+ nodeData.userRole,"nodeId:"+ nodeData.nodeId,"deviceType:"+ nodeData.deviceType); | 974 | + loger.warn("相同身份的人进入->自己被踢出->进入的人员信息", "userName:" + nodeData.name, "userId:" + nodeData.userId, "userRole:" + nodeData.userRole, "nodeId:" + nodeData.nodeId, "deviceType:" + nodeData.deviceType); |
| 1073 | this.kickOutRoster(newUserInfo); | 975 | this.kickOutRoster(newUserInfo); |
| 1074 | return; | 976 | return; |
| 1075 | } else if (nodeData.userId == GlobalConfig.userId && GlobalConfig.userId != "0") { | 977 | } else if (nodeData.userId == GlobalConfig.userId && GlobalConfig.userId != "0") { |
| 1076 | loger.warn("异地登陆->userId->", GlobalConfig.userId); | 978 | loger.warn("异地登陆->userId->", GlobalConfig.userId); |
| 1077 | - this._emit(MessageTypes.MCU_ERROR, {type:MessageTypes.ERR_CLASS_REMOTE_LANDING, data:newUserInfo}); | 979 | + this._emit(MessageTypes.MCU_ERROR, {type: MessageTypes.ERR_CLASS_REMOTE_LANDING, data: newUserInfo}); |
| 1078 | this._emit(MessageTypes.CLASS_RUN_EXIT, {'type': 1}); | 980 | this._emit(MessageTypes.CLASS_RUN_EXIT, {'type': 1}); |
| 1079 | } | 981 | } |
| 1080 | } | 982 | } |
| 1081 | - /*if (parseInt(nodeId) > GlobalConfig.nodeId) { | ||
| 1082 | - if (nodeData.role == ApeConsts.NR_HOST && GlobalConfig.isHost) { | ||
| 1083 | - this.kickOutRoster(); | ||
| 1084 | - return; | ||
| 1085 | - } else if (nodeData.role == ApeConsts.NR_PRESENTER && GlobalConfig.isPresenter) { | ||
| 1086 | - this.kickOutRoster(); | ||
| 1087 | - return; | ||
| 1088 | - } else if (nodeData.role == ApeConsts.NR_ASSISTANT && GlobalConfig.isAssistant) { | ||
| 1089 | - this.kickOutRoster(); | ||
| 1090 | - return; | ||
| 1091 | - } else if (nodeData.role == ApeConsts.NR_INVISIBLE && GlobalConfig.isInvisible) { | ||
| 1092 | - this.kickOutRoster(); | ||
| 1093 | - return; | ||
| 1094 | - }else if(nodeData.userId==GlobalConfig.userId&&GlobalConfig.userId!="0"){ | ||
| 1095 | - loger.log("异地登陆->userId->",GlobalConfig.userId); | ||
| 1096 | - this._emit(MessageTypes.MCU_ERROR, MessageTypes.ERR_CLASS_REMOTE_LANDING); | ||
| 1097 | - this._emit(MessageTypes.CLASS_RUN_EXIT,{'type':1}); | ||
| 1098 | - } | ||
| 1099 | - }*/ | ||
| 1100 | - | ||
| 1101 | //处理用户信息 | 983 | //处理用户信息 |
| 1102 | this.unPackRosterInfo(nodeId, nodeData); | 984 | this.unPackRosterInfo(nodeId, nodeData); |
| 1103 | } | 985 | } |
| @@ -1106,7 +988,7 @@ class ConferApe extends Ape { | @@ -1106,7 +988,7 @@ class ConferApe extends Ape { | ||
| 1106 | unPackRosterInfo(nodeId, nodeData) { | 988 | unPackRosterInfo(nodeId, nodeData) { |
| 1107 | let rosterExists = this.rosters[nodeId]; | 989 | let rosterExists = this.rosters[nodeId]; |
| 1108 | this.rosters[nodeId] = nodeData; | 990 | this.rosters[nodeId] = nodeData; |
| 1109 | - GlobalConfig.rosters=this.rosters; | 991 | + GlobalConfig.rosters = this.rosters; |
| 1110 | let userDataObj = null; | 992 | let userDataObj = null; |
| 1111 | try { | 993 | try { |
| 1112 | userDataObj = pdu['RCNodeInfoUserDataPdu'].decode(nodeData.userData); | 994 | userDataObj = pdu['RCNodeInfoUserDataPdu'].decode(nodeData.userData); |
| @@ -1133,7 +1015,7 @@ class ConferApe extends Ape { | @@ -1133,7 +1015,7 @@ class ConferApe extends Ape { | ||
| 1133 | this.rosterLen = Object.keys(this.rosters).length; | 1015 | this.rosterLen = Object.keys(this.rosters).length; |
| 1134 | GlobalConfig.rosterNumber = this.rosterLen;//记录当前的总人数 | 1016 | GlobalConfig.rosterNumber = this.rosterLen;//记录当前的总人数 |
| 1135 | newNodeData.rosterLen = this.rosterLen; | 1017 | newNodeData.rosterLen = this.rosterLen; |
| 1136 | - if(nodeId!=GlobalConfig.nodeId){ | 1018 | + if (nodeId != GlobalConfig.nodeId) { |
| 1137 | loger.log("人员更新信息->", newNodeData); | 1019 | loger.log("人员更新信息->", newNodeData); |
| 1138 | } | 1020 | } |
| 1139 | this._emit(MessageTypes.CLASS_UPDATE_ROSTER, {"nodeId": nodeId, "nodeData": newNodeData}); | 1021 | this._emit(MessageTypes.CLASS_UPDATE_ROSTER, {"nodeId": nodeId, "nodeData": newNodeData}); |
| @@ -1149,7 +1031,7 @@ class ConferApe extends Ape { | @@ -1149,7 +1031,7 @@ class ConferApe extends Ape { | ||
| 1149 | userRole:nodeData.userRole, | 1031 | userRole:nodeData.userRole, |
| 1150 | deviceType: nodeData.deviceType | 1032 | deviceType: nodeData.deviceType |
| 1151 | }*/ | 1033 | }*/ |
| 1152 | - this._emit(MessageTypes.MCU_ERROR, {type:MessageTypes.ERR_CLASS_KICK_OUT,data: _newUserInfo}); | 1034 | + this._emit(MessageTypes.MCU_ERROR, {type: MessageTypes.ERR_CLASS_KICK_OUT, data: _newUserInfo}); |
| 1153 | this._emit(MessageTypes.CLASS_RUN_EXIT, {'type': 1}); | 1035 | this._emit(MessageTypes.CLASS_RUN_EXIT, {'type': 1}); |
| 1154 | } | 1036 | } |
| 1155 | 1037 | ||
| @@ -1181,7 +1063,7 @@ class ConferApe extends Ape { | @@ -1181,7 +1063,7 @@ class ConferApe extends Ape { | ||
| 1181 | loger.log(nodeId, "->离开课堂->身份->", user.userRole); | 1063 | loger.log(nodeId, "->离开课堂->身份->", user.userRole); |
| 1182 | } | 1064 | } |
| 1183 | delete this.rosters[nodeId]; | 1065 | delete this.rosters[nodeId]; |
| 1184 | - GlobalConfig.rosters=this.rosters; | 1066 | + GlobalConfig.rosters = this.rosters; |
| 1185 | this.rosterLen = Object.keys(this.rosters).length; | 1067 | this.rosterLen = Object.keys(this.rosters).length; |
| 1186 | GlobalConfig.rosterNumber = this.rosterLen;//记录当前的总人数 | 1068 | GlobalConfig.rosterNumber = this.rosterLen;//记录当前的总人数 |
| 1187 | 1069 | ||
| @@ -1244,6 +1126,7 @@ class ConferApe extends Ape { | @@ -1244,6 +1126,7 @@ class ConferApe extends Ape { | ||
| 1244 | classStatusInfo.silence = GlobalConfig.silence; | 1126 | classStatusInfo.silence = GlobalConfig.silence; |
| 1245 | classStatusInfo.silenceUsers = JSON.stringify(GlobalConfig.silenceUsers); | 1127 | classStatusInfo.silenceUsers = JSON.stringify(GlobalConfig.silenceUsers); |
| 1246 | classStatusInfo.isEnableDraw = GlobalConfig.isEnableDraw; | 1128 | classStatusInfo.isEnableDraw = GlobalConfig.isEnableDraw; |
| 1129 | + classStatusInfo.videoScale=GlobalConfig.videoScale||1; | ||
| 1247 | //loger.log("classStatusInfo--->", classStatusInfo); | 1130 | //loger.log("classStatusInfo--->", classStatusInfo); |
| 1248 | 1131 | ||
| 1249 | /* | 1132 | /* |
| @@ -1278,11 +1161,12 @@ class ConferApe extends Ape { | @@ -1278,11 +1161,12 @@ class ConferApe extends Ape { | ||
| 1278 | } | 1161 | } |
| 1279 | return null; | 1162 | return null; |
| 1280 | } | 1163 | } |
| 1281 | - stopApe(){ | ||
| 1282 | - this.rosters={}; | ||
| 1283 | - this.rosterLen=0; | ||
| 1284 | - GlobalConfig.rosterNumber=this.rosterLen; | ||
| 1285 | - GlobalConfig.rosters=this.rosters; | 1164 | + |
| 1165 | + stopApe() { | ||
| 1166 | + this.rosters = {}; | ||
| 1167 | + this.rosterLen = 0; | ||
| 1168 | + GlobalConfig.rosterNumber = this.rosterLen; | ||
| 1169 | + GlobalConfig.rosters = this.rosters; | ||
| 1286 | } | 1170 | } |
| 1287 | 1171 | ||
| 1288 | } | 1172 | } |
| @@ -44,6 +44,8 @@ class WebRtcApe extends Emiter { | @@ -44,6 +44,8 @@ class WebRtcApe extends Emiter { | ||
| 44 | 44 | ||
| 45 | this.isPublish = false;//当前是否正在推流 | 45 | this.isPublish = false;//当前是否正在推流 |
| 46 | 46 | ||
| 47 | + this.videoScale=1;//视图的缩放比例,默认为1; | ||
| 48 | + | ||
| 47 | this.normalRemoteViewId = ""; | 49 | this.normalRemoteViewId = ""; |
| 48 | this.normalRemoteStyle = ""; | 50 | this.normalRemoteStyle = ""; |
| 49 | this.normalRemoteVideoWidth = 320; | 51 | this.normalRemoteVideoWidth = 320; |
| @@ -64,6 +66,12 @@ class WebRtcApe extends Emiter { | @@ -64,6 +66,12 @@ class WebRtcApe extends Emiter { | ||
| 64 | this.invisibleVideoWidth = 320; | 66 | this.invisibleVideoWidth = 320; |
| 65 | this.invisibleVideoHeight = 240; | 67 | this.invisibleVideoHeight = 240; |
| 66 | this.xdyRemote = "xdy_remote"; | 68 | this.xdyRemote = "xdy_remote"; |
| 69 | + | ||
| 70 | + this.localWebRtcVideoClass='localWebRtcVideoClass';//本地视图统一的class名称 | ||
| 71 | + this.invisibleWebRtcVideoClass='invisibleWebRtcVideoClass'; | ||
| 72 | + this.normalWebRtcVideoClass='normalWebRtcVideoClass'; | ||
| 73 | + this.hostWebRtcVideoClass='hostWebRtcVideoClass' | ||
| 74 | + | ||
| 67 | //webRtc sdk | 75 | //webRtc sdk |
| 68 | this.client = AgoraRTC.createClient({mode: this.mode}); | 76 | this.client = AgoraRTC.createClient({mode: this.mode}); |
| 69 | 77 | ||
| @@ -184,17 +192,17 @@ class WebRtcApe extends Emiter { | @@ -184,17 +192,17 @@ class WebRtcApe extends Emiter { | ||
| 184 | if (userRole == ApeConsts.invisible) { | 192 | if (userRole == ApeConsts.invisible) { |
| 185 | //把远程视频添加到监课列表 | 193 | //把远程视频添加到监课列表 |
| 186 | loger.log("获取远程视频流成功->监课:" + userName + "->" + uid, new Date().getTime()); | 194 | loger.log("获取远程视频流成功->监课:" + userName + "->" + uid, new Date().getTime()); |
| 187 | - let viewDiv = `<div id="${this.xdyRemote + uid}" style="width:${this.invisibleVideoWidth}px;height:${this.invisibleVideoHeight}px;float: left;margin-right: 1px;pointer-events: none;">${nameDiv}</div>`; | 195 | + let viewDiv = `<div id="${this.xdyRemote + uid}" class="${this.invisibleWebRtcVideoClass}" style="width:${this.invisibleVideoWidth*this.videoScale}px;height:${this.invisibleVideoHeight*this.videoScale}px;float: left;margin-right: 1px;pointer-events: none;">${nameDiv}</div>`; |
| 188 | $(this.invisibleViewId).append(viewDiv); | 196 | $(this.invisibleViewId).append(viewDiv); |
| 189 | } else if (userRole == ApeConsts.host||userRole == ApeConsts.assistant||userRole == ApeConsts.presenter) { | 197 | } else if (userRole == ApeConsts.host||userRole == ApeConsts.assistant||userRole == ApeConsts.presenter) { |
| 190 | //把远程视图添加到老师列表 | 198 | //把远程视图添加到老师列表 |
| 191 | loger.log("获取远程视频流成功->userRole:"+userRole+":" + userName + "->" + uid, new Date().getTime()); | 199 | loger.log("获取远程视频流成功->userRole:"+userRole+":" + userName + "->" + uid, new Date().getTime()); |
| 192 | - let viewDiv = `<div id="${this.xdyRemote + uid}" style="width:${this.hostRemoteVideoWidth}px;height:${this.hostRemoteVideoHeight}px;float: left;margin-right: 1px;pointer-events: none;">${nameDiv}</div>`; | 200 | + let viewDiv = `<div id="${this.xdyRemote + uid}" class="${this.hostWebRtcVideoClass}" style="width:${this.hostRemoteVideoWidth*this.videoScale}px;height:${this.hostRemoteVideoHeight*this.videoScale}px;float: left;margin-right: 1px;pointer-events: none;">${nameDiv}</div>`; |
| 193 | $(this.hostRemoteViewId).append(viewDiv); | 201 | $(this.hostRemoteViewId).append(viewDiv); |
| 194 | } else { | 202 | } else { |
| 195 | //把视图添加到学生列表 | 203 | //把视图添加到学生列表 |
| 196 | loger.log("获取远程视频流成功->学生:" + userName + "->" + uid, new Date().getTime()); | 204 | loger.log("获取远程视频流成功->学生:" + userName + "->" + uid, new Date().getTime()); |
| 197 | - let viewDiv = `<div id="${this.xdyRemote + uid}" style="width:${this.normalRemoteVideoWidth}px;height:${this.normalRemoteVideoHeight}px;float: left;margin-right: 1px;pointer-events: none;">${nameDiv}</div>`; | 205 | + let viewDiv = `<div id="${this.xdyRemote + uid}" class="${this.normalWebRtcVideoClass}" style="width:${this.normalRemoteVideoWidth*this.videoScale}px;height:${this.normalRemoteVideoHeight*this.videoScale}px;float: left;margin-right: 1px;pointer-events: none;">${nameDiv}</div>`; |
| 198 | $(this.normalRemoteViewId).append(viewDiv); | 206 | $(this.normalRemoteViewId).append(viewDiv); |
| 199 | } | 207 | } |
| 200 | //播放视频,隐藏控制条 | 208 | //播放视频,隐藏控制条 |
| @@ -370,8 +378,9 @@ class WebRtcApe extends Emiter { | @@ -370,8 +378,9 @@ class WebRtcApe extends Emiter { | ||
| 370 | let viewName = 'localVideoBox_' + this.uid; | 378 | let viewName = 'localVideoBox_' + this.uid; |
| 371 | let videoBox = document.createElement("div"); | 379 | let videoBox = document.createElement("div"); |
| 372 | videoBox.id = viewName; | 380 | videoBox.id = viewName; |
| 373 | - videoBox.style.width = this.localVideoWidth + 'px'; | ||
| 374 | - videoBox.style.height = this.localVideoHeight + 'px'; | 381 | + videoBox.className=this.localWebRtcVideoClass; |
| 382 | + videoBox.style.width = (this.localVideoWidth*this.videoScale) + 'px'; | ||
| 383 | + videoBox.style.height = (this.localVideoHeight*this.videoScale) + 'px'; | ||
| 375 | videoBox.style.float = 'left'; | 384 | videoBox.style.float = 'left'; |
| 376 | videoBox.style.marginRight = "1px"; | 385 | videoBox.style.marginRight = "1px"; |
| 377 | videoBox.style.pointerEvents = 'none'; | 386 | videoBox.style.pointerEvents = 'none'; |
| @@ -439,6 +448,50 @@ class WebRtcApe extends Emiter { | @@ -439,6 +448,50 @@ class WebRtcApe extends Emiter { | ||
| 439 | } | 448 | } |
| 440 | 449 | ||
| 441 | /* | 450 | /* |
| 451 | + * 更新所有视频的尺寸大小 | ||
| 452 | + * */ | ||
| 453 | + updateAllVideoSize(){ | ||
| 454 | + $("."+this.localWebRtcVideoClass).css("width",this.localVideoWidth*this.videoScale); | ||
| 455 | + $("."+this.localWebRtcVideoClass).css("height",this.localVideoHeight*this.videoScale); | ||
| 456 | + | ||
| 457 | + $("."+this.hostWebRtcVideoClass).css("width",this.hostRemoteVideoWidth*this.videoScale); | ||
| 458 | + $("."+this.hostWebRtcVideoClass).css("height",this.hostRemoteVideoHeight*this.videoScale); | ||
| 459 | + | ||
| 460 | + $("."+this.normalWebRtcVideoClass).css("width",this.normalRemoteVideoWidth*this.videoScale); | ||
| 461 | + $("."+this.normalWebRtcVideoClass).css("height",this.normalRemoteVideoHeight*this.videoScale); | ||
| 462 | + | ||
| 463 | + //监课的不需要设置 | ||
| 464 | + //$("."+this.invisibleWebRtcVideoClass).css("width",this.localVideoWidth); | ||
| 465 | + //$("."+this.invisibleWebRtcVideoClass).css("height",this.localVideoHeight); | ||
| 466 | + } | ||
| 467 | + | ||
| 468 | + /* | ||
| 469 | + * 设置rtc视频的属性 | ||
| 470 | + * */ | ||
| 471 | + changeRtcVideoConfig(_params){ | ||
| 472 | + //{videoScale:1} | ||
| 473 | + if(!_params){ | ||
| 474 | + return; | ||
| 475 | + } | ||
| 476 | + let scale=parseInt(_params.videoScale)||1;//最小值只能为1,这个是按倍数缩放视频 | ||
| 477 | + if(this.videoScale==scale){ | ||
| 478 | + return; | ||
| 479 | + } | ||
| 480 | + this.videoScale=scale; | ||
| 481 | + loger.log("更新视频视图大小->videoScale:"+this.videoScale); | ||
| 482 | + /* this.localVideoWidth=this.localVideoWidth*this.videoScale; | ||
| 483 | + this.localVideoHeight=this.localVideoHeight*this.videoScale; | ||
| 484 | + | ||
| 485 | + this.hostRemoteVideoWidth=this.hostRemoteVideoWidth*this.videoScale; | ||
| 486 | + this.hostRemoteVideoHeight=this.hostRemoteVideoHeight*this.videoScale; | ||
| 487 | + | ||
| 488 | + this.normalRemoteVideoWidth=this.normalRemoteVideoWidth*this.videoScale; | ||
| 489 | + this.normalRemoteVideoHeight=this.normalRemoteVideoHeight*this.videoScale;*/ | ||
| 490 | + this.updateAllVideoSize(); | ||
| 491 | + | ||
| 492 | + } | ||
| 493 | + | ||
| 494 | + /* | ||
| 442 | * 设置本地回显视图 | 495 | * 设置本地回显视图 |
| 443 | * */ | 496 | * */ |
| 444 | setLoaclView(_params) { | 497 | setLoaclView(_params) { |
| @@ -448,6 +501,9 @@ class WebRtcApe extends Emiter { | @@ -448,6 +501,9 @@ class WebRtcApe extends Emiter { | ||
| 448 | this.localVideoWidth = parseInt(_params.width) || 320; | 501 | this.localVideoWidth = parseInt(_params.width) || 320; |
| 449 | this.localVideoHeight = parseInt(_params.height) || 240; | 502 | this.localVideoHeight = parseInt(_params.height) || 240; |
| 450 | this.nameDisplay = _params.nameDisplay || "block"; | 503 | this.nameDisplay = _params.nameDisplay || "block"; |
| 504 | + | ||
| 505 | + this.localVideoWidth=this.localVideoWidth; | ||
| 506 | + this.localVideoHeight=this.localVideoHeight; | ||
| 451 | } | 507 | } |
| 452 | 508 | ||
| 453 | /* | 509 | /* |
| @@ -459,6 +515,8 @@ class WebRtcApe extends Emiter { | @@ -459,6 +515,8 @@ class WebRtcApe extends Emiter { | ||
| 459 | this.hostRemoteStyle = _params.styleStr || ""; | 515 | this.hostRemoteStyle = _params.styleStr || ""; |
| 460 | this.hostRemoteVideoWidth = parseInt(_params.width) || 320; | 516 | this.hostRemoteVideoWidth = parseInt(_params.width) || 320; |
| 461 | this.hostRemoteVideoHeight = parseInt(_params.height) || 240; | 517 | this.hostRemoteVideoHeight = parseInt(_params.height) || 240; |
| 518 | + this.hostRemoteVideoWidth=this.hostRemoteVideoWidth; | ||
| 519 | + this.hostRemoteVideoHeight=this.hostRemoteVideoHeight; | ||
| 462 | } | 520 | } |
| 463 | 521 | ||
| 464 | /* | 522 | /* |
| @@ -470,6 +528,9 @@ class WebRtcApe extends Emiter { | @@ -470,6 +528,9 @@ class WebRtcApe extends Emiter { | ||
| 470 | this.normalRemoteStyle = _params.styleStr || ""; | 528 | this.normalRemoteStyle = _params.styleStr || ""; |
| 471 | this.normalRemoteVideoWidth = parseInt(_params.width) || 320; | 529 | this.normalRemoteVideoWidth = parseInt(_params.width) || 320; |
| 472 | this.normalRemoteVideoHeight = parseInt(_params.height) || 240; | 530 | this.normalRemoteVideoHeight = parseInt(_params.height) || 240; |
| 531 | + | ||
| 532 | + this.normalRemoteVideoWidth=this.normalRemoteVideoWidth; | ||
| 533 | + this.normalRemoteVideoHeight=this.normalRemoteVideoHeight; | ||
| 473 | } | 534 | } |
| 474 | 535 | ||
| 475 | /* | 536 | /* |
| @@ -1045,6 +1045,7 @@ message RCClassStatusInfoPdu { | @@ -1045,6 +1045,7 @@ message RCClassStatusInfoPdu { | ||
| 1045 | optional bool silence=24;//课堂禁言 | 1045 | optional bool silence=24;//课堂禁言 |
| 1046 | optional string silenceUsers=25;//课堂用户禁言状态列表 | 1046 | optional string silenceUsers=25;//课堂用户禁言状态列表 |
| 1047 | optional bool isEnableDraw=26;//课堂用户是否开启绘制权限 | 1047 | optional bool isEnableDraw=26;//课堂用户是否开启绘制权限 |
| 1048 | + optional uint32 videoScale=27;//视频显示的缩放倍数 | ||
| 1048 | } | 1049 | } |
| 1049 | 1050 | ||
| 1050 | message RCConferenceRecordRequestPdu { | 1051 | message RCConferenceRecordRequestPdu { |
-
请 注册 或 登录 后发表评论