1.增加课堂当前文件模块当前显示的模块id currentSceneTableId字段,增加接口sceneTableChange来更改课堂状态中的currentSceneTableId字段
正在显示
5 个修改的文件
包含
41 行增加
和
4 行删除
此 diff 太大无法显示。
| @@ -32,7 +32,7 @@ import QuestionApe from 'apes/QuestionApe'; | @@ -32,7 +32,7 @@ import QuestionApe from 'apes/QuestionApe'; | ||
| 32 | import UTF8 from 'utf-8'; | 32 | import UTF8 from 'utf-8'; |
| 33 | 33 | ||
| 34 | let loger = Loger.getLoger('McuClient'); | 34 | let loger = Loger.getLoger('McuClient'); |
| 35 | -let _sdkInfo = {"version": "v1.34.2.20170615", "author": "www.3mang.com"}; | 35 | +let _sdkInfo = {"version": "v1.35.0.20170616", "author": "www.3mang.com"}; |
| 36 | 36 | ||
| 37 | //APE | 37 | //APE |
| 38 | let _sass; | 38 | let _sass; |
| @@ -154,6 +154,7 @@ export default class MessageEntrance extends Emiter { | @@ -154,6 +154,7 @@ export default class MessageEntrance extends Emiter { | ||
| 154 | this.changeHandUpStatus = this._changeHandUpStatus.bind(this);//自己切换举手状态 | 154 | this.changeHandUpStatus = this._changeHandUpStatus.bind(this);//自己切换举手状态 |
| 155 | this.controlHandUpStatus = this._controlHandUpStatus.bind(this);//控制别人的举手状态 | 155 | this.controlHandUpStatus = this._controlHandUpStatus.bind(this);//控制别人的举手状态 |
| 156 | 156 | ||
| 157 | + this.sceneTableChange = this._sceneTableChange.bind(this);//控制别人的举手状态 | ||
| 157 | 158 | ||
| 158 | //录制回放 | 159 | //录制回放 |
| 159 | this.initRecordPlayback = this._initRecordPlayback.bind(this); | 160 | this.initRecordPlayback = this._initRecordPlayback.bind(this); |
| @@ -944,6 +945,7 @@ export default class MessageEntrance extends Emiter { | @@ -944,6 +945,7 @@ export default class MessageEntrance extends Emiter { | ||
| 944 | 945 | ||
| 945 | 946 | ||
| 946 | joinClassSuccessCallBackData.ssTunnelAppURL = GlobalConfig.ssTunnelAppURL; | 947 | joinClassSuccessCallBackData.ssTunnelAppURL = GlobalConfig.ssTunnelAppURL; |
| 948 | + joinClassSuccessCallBackData.currentSceneTableId=GlobalConfig.currentSceneTableId;//文档区域的模块显示 | ||
| 947 | 949 | ||
| 948 | loger.log('加入课堂成功->'); | 950 | loger.log('加入课堂成功->'); |
| 949 | loger.log(joinClassSuccessCallBackData); | 951 | loger.log(joinClassSuccessCallBackData); |
| @@ -1133,7 +1135,17 @@ export default class MessageEntrance extends Emiter { | @@ -1133,7 +1135,17 @@ export default class MessageEntrance extends Emiter { | ||
| 1133 | _confer_ape.updateDeviceInfo(_param); | 1135 | _confer_ape.updateDeviceInfo(_param); |
| 1134 | } | 1136 | } |
| 1135 | } | 1137 | } |
| 1136 | - | 1138 | + //文档-媒体共享-屏幕共享模块切换 |
| 1139 | + _sceneTableChange(_param){ | ||
| 1140 | + if (!_mcu.connected) { | ||
| 1141 | + loger.warn(GlobalConfig.getCurrentStatus()); | ||
| 1142 | + return {"code": ApeConsts.RETURN_FAILED, "data": ""}; | ||
| 1143 | + } | ||
| 1144 | + if (_confer_ape) { | ||
| 1145 | + _confer_ape.sceneTableChange(_param); | ||
| 1146 | + } | ||
| 1147 | + } | ||
| 1148 | + //举手状态控制 | ||
| 1137 | _controlHandUpStatus(_param){ | 1149 | _controlHandUpStatus(_param){ |
| 1138 | if (!_mcu.connected) { | 1150 | if (!_mcu.connected) { |
| 1139 | loger.warn(GlobalConfig.getCurrentStatus()); | 1151 | loger.warn(GlobalConfig.getCurrentStatus()); |
| @@ -1143,6 +1155,7 @@ export default class MessageEntrance extends Emiter { | @@ -1143,6 +1155,7 @@ export default class MessageEntrance extends Emiter { | ||
| 1143 | _confer_ape.controlHandUpStatus(_param); | 1155 | _confer_ape.controlHandUpStatus(_param); |
| 1144 | } | 1156 | } |
| 1145 | } | 1157 | } |
| 1158 | + //举手状态切换 | ||
| 1146 | _changeHandUpStatus(_param){ | 1159 | _changeHandUpStatus(_param){ |
| 1147 | if (!_mcu.connected) { | 1160 | if (!_mcu.connected) { |
| 1148 | loger.warn(GlobalConfig.getCurrentStatus()); | 1161 | loger.warn(GlobalConfig.getCurrentStatus()); |
| @@ -1784,7 +1797,7 @@ export default class MessageEntrance extends Emiter { | @@ -1784,7 +1797,7 @@ export default class MessageEntrance extends Emiter { | ||
| 1784 | joinClassSuccessCallBackData.videoQuality = GlobalConfig.videoQuality; | 1797 | joinClassSuccessCallBackData.videoQuality = GlobalConfig.videoQuality; |
| 1785 | 1798 | ||
| 1786 | joinClassSuccessCallBackData.ssTunnelAppURL = GlobalConfig.ssTunnelAppURL; | 1799 | joinClassSuccessCallBackData.ssTunnelAppURL = GlobalConfig.ssTunnelAppURL; |
| 1787 | - | 1800 | + joinClassSuccessCallBackData.currentSceneTableId=GlobalConfig.currentSceneTableId;//文档区域的模块显示 |
| 1788 | loger.log(joinClassSuccessCallBackData); | 1801 | loger.log(joinClassSuccessCallBackData); |
| 1789 | //和加入课堂成功使用同样的消息处理 | 1802 | //和加入课堂成功使用同样的消息处理 |
| 1790 | this._emit(MessageTypes.CLASS_JOIN_SUCCESS, joinClassSuccessCallBackData); | 1803 | this._emit(MessageTypes.CLASS_JOIN_SUCCESS, joinClassSuccessCallBackData); |
| @@ -57,6 +57,7 @@ class GlobalConfig { | @@ -57,6 +57,7 @@ class GlobalConfig { | ||
| 57 | classInfo.gop=this.gop; | 57 | classInfo.gop=this.gop; |
| 58 | classInfo.videoQuality=this.videoQuality; | 58 | classInfo.videoQuality=this.videoQuality; |
| 59 | classInfo.ssTunnelAppURL = this.ssTunnelAppURL; | 59 | classInfo.ssTunnelAppURL = this.ssTunnelAppURL; |
| 60 | + classInfo.currentSceneTableId=this.currentSceneTableId;//文档区域的模块显示 | ||
| 60 | return classInfo; | 61 | return classInfo; |
| 61 | 62 | ||
| 62 | } | 63 | } |
| @@ -87,6 +88,8 @@ class GlobalConfig { | @@ -87,6 +88,8 @@ class GlobalConfig { | ||
| 87 | classStatusInfo.serverTimestamp=this.serverTimestamp;//当前的系统时间戳 | 88 | classStatusInfo.serverTimestamp=this.serverTimestamp;//当前的系统时间戳 |
| 88 | classStatusInfo.activeDocId=this.activeDocId;//当前激活的文档ID | 89 | classStatusInfo.activeDocId=this.activeDocId;//当前激活的文档ID |
| 89 | classStatusInfo.activeDocCurPage=this.activeDocCurPage;//当前激活的文档的当前页 | 90 | classStatusInfo.activeDocCurPage=this.activeDocCurPage;//当前激活的文档的当前页 |
| 91 | + | ||
| 92 | + classStatusInfo.currentSceneTableId=this.currentSceneTableId;//文档区域的模块显示 | ||
| 90 | return classStatusInfo; | 93 | return classStatusInfo; |
| 91 | } | 94 | } |
| 92 | //设置当前的课堂状态的信息 | 95 | //设置当前的课堂状态的信息 |
| @@ -129,6 +132,7 @@ class GlobalConfig { | @@ -129,6 +132,7 @@ class GlobalConfig { | ||
| 129 | this.recordTimestamp=data.recordTimestamp||this.recordTimestamp;//相对于首次开始录制的时间戳 | 132 | this.recordTimestamp=data.recordTimestamp||this.recordTimestamp;//相对于首次开始录制的时间戳 |
| 130 | this.recordFileName=data.recordFileName||this.recordFileName;//录制的文件名 | 133 | this.recordFileName=data.recordFileName||this.recordFileName;//录制的文件名 |
| 131 | this.recordDownloadUrl=data.recordDownloadUrl||this.recordDownloadUrl;//下载地址 | 134 | this.recordDownloadUrl=data.recordDownloadUrl||this.recordDownloadUrl;//下载地址 |
| 135 | + this.currentSceneTableId=data.currentSceneTableId||0;//文档区域的模块显示 | ||
| 132 | } | 136 | } |
| 133 | 137 | ||
| 134 | // 判断自己是否主持人角色 | 138 | // 判断自己是否主持人角色 |
| @@ -416,6 +420,7 @@ GlobalConfig.activeDocCurPage=1;//当前激活的文档的当前页 | @@ -416,6 +420,7 @@ GlobalConfig.activeDocCurPage=1;//当前激活的文档的当前页 | ||
| 416 | GlobalConfig.activeMediaId=0;//当前显示的媒体文件的id | 420 | GlobalConfig.activeMediaId=0;//当前显示的媒体文件的id |
| 417 | GlobalConfig.activeMediaSeek=1;//当前的媒体文件的播放进度seek点 | 421 | GlobalConfig.activeMediaSeek=1;//当前的媒体文件的播放进度seek点 |
| 418 | 422 | ||
| 423 | +GlobalConfig.currentSceneTableId=0;//文档区域的当前模块id显示的模块 0=文档模块、1=屏幕共享、2=媒体共享 | ||
| 419 | 424 | ||
| 420 | GlobalConfig.classAllParam={};//Sass直接返回的所有课堂信息(最全) | 425 | GlobalConfig.classAllParam={};//Sass直接返回的所有课堂信息(最全) |
| 421 | GlobalConfig.classDetail={};//Sass直接返回的当前课堂基本信息 | 426 | GlobalConfig.classDetail={};//Sass直接返回的当前课堂基本信息 |
| @@ -424,7 +424,25 @@ class ConferApe extends Ape { | @@ -424,7 +424,25 @@ class ConferApe extends Ape { | ||
| 424 | } | 424 | } |
| 425 | this.updateUserInfo(); | 425 | this.updateUserInfo(); |
| 426 | } | 426 | } |
| 427 | + //课堂的场景模块发送改变 | ||
| 428 | + sceneTableChange(_param){ | ||
| 429 | + if(GlobalConfig.isRecordPlayBack){ | ||
| 430 | + return; | ||
| 431 | + } | ||
| 432 | + loger.log('切换文档-媒体-屏幕模块切换->',_param); | ||
| 433 | + //如果是host身份 | ||
| 434 | + if (GlobalConfig.isHost) { | ||
| 435 | + if(_param){ | ||
| 436 | + GlobalConfig.currentSceneTableId=parseInt(_param.currentSceneTableId)||0;//当前场景显示的模块 0=文档模块、1=屏幕共享、2=媒体共享 | ||
| 437 | + //保存数据到Sass | ||
| 438 | + this._emit(MessageTypes.CLASS_STATUS_INFO_CHANGE); | ||
| 439 | + //同步消息给其他人 | ||
| 440 | + this.sendUpdaterClassStatusInfo({"actionType": 1,isStopAllPublishMedia:false}); | ||
| 441 | + } | ||
| 442 | + } | ||
| 427 | 443 | ||
| 444 | + | ||
| 445 | + } | ||
| 428 | //更新课堂信息 | 446 | //更新课堂信息 |
| 429 | sendUpdaterClassStatusInfo(_param) { | 447 | sendUpdaterClassStatusInfo(_param) { |
| 430 | //{"actionType": 1,isStopAllPublishMedia:false} //actionType课堂状态 isStopAllPublishMedia是否停止当前的所有推流 | 448 | //{"actionType": 1,isStopAllPublishMedia:false} //actionType课堂状态 isStopAllPublishMedia是否停止当前的所有推流 |
| @@ -915,7 +933,7 @@ class ConferApe extends Ape { | @@ -915,7 +933,7 @@ class ConferApe extends Ape { | ||
| 915 | classStatusInfo.activeDocId = GlobalConfig.activeDocId;//当前激活的文档id | 933 | classStatusInfo.activeDocId = GlobalConfig.activeDocId;//当前激活的文档id |
| 916 | classStatusInfo.activeDocCurPage = GlobalConfig.activeDocCurPage;//当前激活的文档的当前页 | 934 | classStatusInfo.activeDocCurPage = GlobalConfig.activeDocCurPage;//当前激活的文档的当前页 |
| 917 | classStatusInfo.isStopAllPublishMedia=_param.isStopAllPublishMedia||false; | 935 | classStatusInfo.isStopAllPublishMedia=_param.isStopAllPublishMedia||false; |
| 918 | - | 936 | + classStatusInfo.currentSceneTableId=GlobalConfig.currentSceneTableId; |
| 919 | //loger.log("classStatusInfo--->", classStatusInfo); | 937 | //loger.log("classStatusInfo--->", classStatusInfo); |
| 920 | 938 | ||
| 921 | /* | 939 | /* |
| @@ -989,6 +989,7 @@ message RCClassStatusInfoPdu { | @@ -989,6 +989,7 @@ message RCClassStatusInfoPdu { | ||
| 989 | optional uint32 active_doc_id=20;//当前激活的文档id | 989 | optional uint32 active_doc_id=20;//当前激活的文档id |
| 990 | optional uint32 active_doc_cur_page=21;//当前激活的文档的当前页 | 990 | optional uint32 active_doc_cur_page=21;//当前激活的文档的当前页 |
| 991 | optional bool isStopAllPublishMedia=22;//是否停止推流 | 991 | optional bool isStopAllPublishMedia=22;//是否停止推流 |
| 992 | + optional uint32 currentSceneTableId=23;//文档区域的当前模块id | ||
| 992 | } | 993 | } |
| 993 | 994 | ||
| 994 | message RCConferenceRecordRequestPdu { | 995 | message RCConferenceRecordRequestPdu { |
-
请 注册 或 登录 后发表评论