1.修复录制状态发生改变后音视频模块立即更新当前状态导致的数据状态不正确的问题;2.修复课堂模块数据中单个禁言字段的字符串和JSON转换问题
正在显示
4 个修改的文件
包含
25 行增加
和
6 行删除
此 diff 太大无法显示。
| @@ -34,7 +34,7 @@ import mdetect from "mdetect"; | @@ -34,7 +34,7 @@ import mdetect from "mdetect"; | ||
| 34 | import UTF8 from 'utf-8'; | 34 | import UTF8 from 'utf-8'; |
| 35 | 35 | ||
| 36 | let loger = Loger.getLoger('McuClient'); | 36 | let loger = Loger.getLoger('McuClient'); |
| 37 | -let _sdkInfo = { "version": "v1.41.0.20170708", "author": "www.3mang.com" }; | 37 | +let _sdkInfo = { "version": "v1.42.1.20170708", "author": "www.3mang.com" }; |
| 38 | 38 | ||
| 39 | //APE | 39 | //APE |
| 40 | let _sass; | 40 | let _sass; |
| @@ -67,6 +67,7 @@ export default class MessageEntrance extends Emiter { | @@ -67,6 +67,7 @@ export default class MessageEntrance extends Emiter { | ||
| 67 | loger.warn("当前设备是PC"); | 67 | loger.warn("当前设备是PC"); |
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | + this.classRecordStatusUpdateTimer=0;//课堂录制状态发生改变后同步当前所有模块数据的计时器 | ||
| 70 | //初始化状态 | 71 | //初始化状态 |
| 71 | this.isGetUserIpCallback = false; //是否获取IP信息返回 | 72 | this.isGetUserIpCallback = false; //是否获取IP信息返回 |
| 72 | this.isGetFastestMcuCallback = false; //是否MCU选点结束 | 73 | this.isGetFastestMcuCallback = false; //是否MCU选点结束 |
| @@ -356,7 +357,13 @@ export default class MessageEntrance extends Emiter { | @@ -356,7 +357,13 @@ export default class MessageEntrance extends Emiter { | ||
| 356 | 357 | ||
| 357 | //开启录制成功 | 358 | //开启录制成功 |
| 358 | _onClassRecordSuccess(_param) { | 359 | _onClassRecordSuccess(_param) { |
| 359 | - this.updaterRecordAllApeStatus(_param); | 360 | + clearTimeout(this.classRecordStatusUpdateTimer); |
| 361 | + let _this=this; | ||
| 362 | + this.classRecordStatusUpdateTimer=setTimeout(function(){ | ||
| 363 | + clearTimeout(this.classRecordStatusUpdateTimer); | ||
| 364 | + _this.updaterRecordAllApeStatus(_param); | ||
| 365 | + },2000); | ||
| 366 | + | ||
| 360 | } | 367 | } |
| 361 | 368 | ||
| 362 | //录制状态发送改变,更新所有模块的当前数据发送到MCU | 369 | //录制状态发送改变,更新所有模块的当前数据发送到MCU |
| @@ -1274,6 +1281,8 @@ export default class MessageEntrance extends Emiter { | @@ -1274,6 +1281,8 @@ export default class MessageEntrance extends Emiter { | ||
| 1274 | try { | 1281 | try { |
| 1275 | GlobalConfig.setClassStatusInfo(JSON.parse(_data.currentInfo)); | 1282 | GlobalConfig.setClassStatusInfo(JSON.parse(_data.currentInfo)); |
| 1276 | } catch (err) { | 1283 | } catch (err) { |
| 1284 | + loger.warn("从Sass获取的课堂数据JSON转换失败->"); | ||
| 1285 | + console.log("currentInfo",_data.currentInfo); | ||
| 1277 | GlobalConfig.setClassStatusInfo(_data.currentInfo); | 1286 | GlobalConfig.setClassStatusInfo(_data.currentInfo); |
| 1278 | } | 1287 | } |
| 1279 | loger.log(GlobalConfig.classStatusInfo); | 1288 | loger.log(GlobalConfig.classStatusInfo); |
| @@ -133,15 +133,19 @@ class GlobalConfig { | @@ -133,15 +133,19 @@ class GlobalConfig { | ||
| 133 | this.classStopTime = data.classStopTime || this.classStopTime; //最后一次停止的时间(点暂停或结束),每次发送数据都获取当前时间戳 | 133 | this.classStopTime = data.classStopTime || this.classStopTime; //最后一次停止的时间(点暂停或结束),每次发送数据都获取当前时间戳 |
| 134 | this.classTimestamp = data.classTimestamp || this.classTimestamp; //相对于点开始课堂的时间戳 | 134 | this.classTimestamp = data.classTimestamp || this.classTimestamp; //相对于点开始课堂的时间戳 |
| 135 | 135 | ||
| 136 | - // 全局禁言状态 | ||
| 137 | - this.silence = data.silence || false; | ||
| 138 | - this.silenceUsers = JSON.parse(data.silenceUsers || '{}'); | ||
| 139 | 136 | ||
| 140 | this.recordStatus = data.recordStatus || this.recordStatus; //当前录制状态 | 137 | this.recordStatus = data.recordStatus || this.recordStatus; //当前录制状态 |
| 141 | this.recordTimestamp = data.recordTimestamp || this.recordTimestamp; //相对于首次开始录制的时间戳 | 138 | this.recordTimestamp = data.recordTimestamp || this.recordTimestamp; //相对于首次开始录制的时间戳 |
| 142 | this.recordFileName = data.recordFileName || this.recordFileName; //录制的文件名 | 139 | this.recordFileName = data.recordFileName || this.recordFileName; //录制的文件名 |
| 143 | this.recordDownloadUrl = data.recordDownloadUrl || this.recordDownloadUrl; //下载地址 | 140 | this.recordDownloadUrl = data.recordDownloadUrl || this.recordDownloadUrl; //下载地址 |
| 144 | this.currentSceneTableId = data.currentSceneTableId || 0; //文档区域的模块显示 | 141 | this.currentSceneTableId = data.currentSceneTableId || 0; //文档区域的模块显示 |
| 142 | + | ||
| 143 | + // 全局禁言状态 | ||
| 144 | + this.silence = data.silence || false; | ||
| 145 | + this.silenceUsers =data.silenceUsers || {}; | ||
| 146 | + if((typeof this.silenceUsers =='string')&& this.silenceUsers .constructor==String){ | ||
| 147 | + this.silenceUsers={}; | ||
| 148 | + } | ||
| 145 | } | 149 | } |
| 146 | 150 | ||
| 147 | // 判断自己是否主持人角色 | 151 | // 判断自己是否主持人角色 |
| @@ -609,10 +609,16 @@ class ConferApe extends Ape { | @@ -609,10 +609,16 @@ class ConferApe extends Ape { | ||
| 609 | tableUpdateHandler(owner, itemIdx, itemData) { | 609 | tableUpdateHandler(owner, itemIdx, itemData) { |
| 610 | try { | 610 | try { |
| 611 | let model = this.unPackPdu(owner, itemIdx, itemData); | 611 | let model = this.unPackPdu(owner, itemIdx, itemData); |
| 612 | - loger.log('课堂数据更新->', model); | 612 | + console.log('课堂数据更新->', model); |
| 613 | 613 | ||
| 614 | //处理课堂更新的信息 | 614 | //处理课堂更新的信息 |
| 615 | if (model && model.classStatusInfo) { | 615 | if (model && model.classStatusInfo) { |
| 616 | + try{ | ||
| 617 | + model.classStatusInfo.silenceUsers=JSON.parse( model.classStatusInfo.silenceUsers); | ||
| 618 | + }catch (err){ | ||
| 619 | + | ||
| 620 | + } | ||
| 621 | + | ||
| 616 | GlobalConfig.setClassStatusInfo(model.classStatusInfo); | 622 | GlobalConfig.setClassStatusInfo(model.classStatusInfo); |
| 617 | 623 | ||
| 618 | if (model.classStatusInfo.isStopAllPublishMedia) { | 624 | if (model.classStatusInfo.isStopAllPublishMedia) { |
-
请 注册 或 登录 后发表评论