正在显示
3 个修改的文件
包含
26 行增加
和
9 行删除
| @@ -63,7 +63,7 @@ export default class MessageEntrance extends Emiter { | @@ -63,7 +63,7 @@ export default class MessageEntrance extends Emiter { | ||
| 63 | super(); | 63 | super(); |
| 64 | this.lastClassActiveTime=0;//最后一次课堂激活的时间戳 | 64 | this.lastClassActiveTime=0;//最后一次课堂激活的时间戳 |
| 65 | //sdk 信息 | 65 | //sdk 信息 |
| 66 | - GlobalConfig.sdkVersion = "v2.26.6.20171103"; | 66 | + GlobalConfig.sdkVersion = "v2.26.9.20171107"; |
| 67 | loger.warn("sdkVersion:" + GlobalConfig.sdkVersion); | 67 | loger.warn("sdkVersion:" + GlobalConfig.sdkVersion); |
| 68 | console.log("sdkVersion:" + GlobalConfig.sdkVersion); | 68 | console.log("sdkVersion:" + GlobalConfig.sdkVersion); |
| 69 | //设置 | 69 | //设置 |
| @@ -440,7 +440,7 @@ export default class MessageEntrance extends Emiter { | @@ -440,7 +440,7 @@ export default class MessageEntrance extends Emiter { | ||
| 440 | 440 | ||
| 441 | //执行离开课堂断开连接的流程 | 441 | //执行离开课堂断开连接的流程 |
| 442 | _runClassExit(_type) { | 442 | _runClassExit(_type) { |
| 443 | - if( GlobalConfig.classExit){ | 443 | + if( GlobalConfig.classExit==true){ |
| 444 | console.log("已经离开课堂"); | 444 | console.log("已经离开课堂"); |
| 445 | return; | 445 | return; |
| 446 | } | 446 | } |
| @@ -1697,9 +1697,15 @@ export default class MessageEntrance extends Emiter { | @@ -1697,9 +1697,15 @@ export default class MessageEntrance extends Emiter { | ||
| 1697 | loger.warn(GlobalConfig.getCurrentStatus()); | 1697 | loger.warn(GlobalConfig.getCurrentStatus()); |
| 1698 | return {"code": ApeConsts.RETURN_FAILED, "data": ""}; | 1698 | return {"code": ApeConsts.RETURN_FAILED, "data": ""}; |
| 1699 | } | 1699 | } |
| 1700 | + if(GlobalConfig.classExit==true){ | ||
| 1701 | + console.warn("停止上课->已经离开课堂"); | ||
| 1702 | + return; | ||
| 1703 | + } | ||
| 1700 | if (_confer_ape) { | 1704 | if (_confer_ape) { |
| 1701 | _confer_ape.closeClass(_param); | 1705 | _confer_ape.closeClass(_param); |
| 1702 | } | 1706 | } |
| 1707 | + GlobalConfig.classExit=true; | ||
| 1708 | + LogManager.IS_OPEN_SEND_LOG = false;//断开之后不再上报日志 | ||
| 1703 | } | 1709 | } |
| 1704 | 1710 | ||
| 1705 | // 离开课堂 {type:1} type=1被踢出课堂;type=0自己主动离开 | 1711 | // 离开课堂 {type:1} type=1被踢出课堂;type=0自己主动离开 |
| @@ -1708,7 +1714,10 @@ export default class MessageEntrance extends Emiter { | @@ -1708,7 +1714,10 @@ export default class MessageEntrance extends Emiter { | ||
| 1708 | loger.warn(GlobalConfig.getCurrentStatus()); | 1714 | loger.warn(GlobalConfig.getCurrentStatus()); |
| 1709 | return {"code": ApeConsts.RETURN_FAILED, "data": ""}; | 1715 | return {"code": ApeConsts.RETURN_FAILED, "data": ""}; |
| 1710 | } | 1716 | } |
| 1711 | - | 1717 | + if( GlobalConfig.classExit==true){ |
| 1718 | + console.log("已经离开课堂",_param); | ||
| 1719 | + return; | ||
| 1720 | + } | ||
| 1712 | //离开视频通话频道 | 1721 | //离开视频通话频道 |
| 1713 | /* if(GlobalConfig.deviceType==0||GlobalConfig.deviceType==3){ | 1722 | /* if(GlobalConfig.deviceType==0||GlobalConfig.deviceType==3){ |
| 1714 | if(_webRtc){ | 1723 | if(_webRtc){ |
| @@ -2540,7 +2549,7 @@ export default class MessageEntrance extends Emiter { | @@ -2540,7 +2549,7 @@ export default class MessageEntrance extends Emiter { | ||
| 2540 | //如果是主持人,那么需要判断一下文档模块同步的数据和从sass获取的文档数据是否相同,如果mcu服务器不存在的,需要上传 | 2549 | //如果是主持人,那么需要判断一下文档模块同步的数据和从sass获取的文档数据是否相同,如果mcu服务器不存在的,需要上传 |
| 2541 | if (GlobalConfig.docListPrepare && GlobalConfig.docListPrepare.length > 0) { | 2550 | if (GlobalConfig.docListPrepare && GlobalConfig.docListPrepare.length > 0) { |
| 2542 | //如果当前身份是老师或者当前课堂内只有一个人,有权限同步文档到MCU | 2551 | //如果当前身份是老师或者当前课堂内只有一个人,有权限同步文档到MCU |
| 2543 | - if (GlobalConfig.isHost || GlobalConfig.rosterNumber <= 1) { | 2552 | + if (GlobalConfig.isHost || GlobalConfig.rosterNumber <= 1&&GlobalConfig.deviceType!=3) { |
| 2544 | for (let i = 0; i < GlobalConfig.docListPrepare.length; i++) { | 2553 | for (let i = 0; i < GlobalConfig.docListPrepare.length; i++) { |
| 2545 | let value = GlobalConfig.docListPrepare[i]; | 2554 | let value = GlobalConfig.docListPrepare[i]; |
| 2546 | if (value) { | 2555 | if (value) { |
| @@ -13,7 +13,7 @@ import GlobalConfig from 'GlobalConfig'; | @@ -13,7 +13,7 @@ import GlobalConfig from 'GlobalConfig'; | ||
| 13 | import EngineUtils from 'EngineUtils'; | 13 | import EngineUtils from 'EngineUtils'; |
| 14 | import TimerCounter from "TimerCounter"; | 14 | import TimerCounter from "TimerCounter"; |
| 15 | import Sass from 'Sass'; | 15 | import Sass from 'Sass'; |
| 16 | - | 16 | +import LogManager from "LogManager"; |
| 17 | let loger = Loger.getLoger('ConferApe'); | 17 | let loger = Loger.getLoger('ConferApe'); |
| 18 | 18 | ||
| 19 | class ConferApe extends Ape { | 19 | class ConferApe extends Ape { |
| @@ -1063,9 +1063,13 @@ class ConferApe extends Ape { | @@ -1063,9 +1063,13 @@ class ConferApe extends Ape { | ||
| 1063 | //删除用户 | 1063 | //删除用户 |
| 1064 | rosterDelHandler(nodeId) { | 1064 | rosterDelHandler(nodeId) { |
| 1065 | if (GlobalConfig.nodeId == nodeId) { | 1065 | if (GlobalConfig.nodeId == nodeId) { |
| 1066 | - loger.log("自己离开课堂"); | ||
| 1067 | - // 自己退出 | ||
| 1068 | - this._emit(MessageTypes.CLASS_RUN_EXIT, {'type': 0}); | 1066 | + if(GlobalConfig.classExit==false){ |
| 1067 | + loger.log("自己离开课堂"); | ||
| 1068 | + // 自己退出 | ||
| 1069 | + this._emit(MessageTypes.CLASS_RUN_EXIT, {'type': 0}); | ||
| 1070 | + } | ||
| 1071 | + GlobalConfig.classExit=true; | ||
| 1072 | + LogManager.IS_OPEN_SEND_LOG=false; | ||
| 1069 | } else { | 1073 | } else { |
| 1070 | let user = this.rosters[nodeId]; | 1074 | let user = this.rosters[nodeId]; |
| 1071 | if (user) { | 1075 | if (user) { |
| @@ -496,9 +496,13 @@ class WebRtcApe extends Emiter { | @@ -496,9 +496,13 @@ class WebRtcApe extends Emiter { | ||
| 496 | } | 496 | } |
| 497 | publish(_params) { | 497 | publish(_params) { |
| 498 | if (!this.client || !this.localStream) { | 498 | if (!this.client || !this.localStream) { |
| 499 | + loger.warn("推流失败->未加入频道!"); | ||
| 500 | + return; | ||
| 501 | + } | ||
| 502 | + if (!this.localStream) { | ||
| 503 | + loger.warn("推流失败->本地流获取失败!"); | ||
| 499 | return; | 504 | return; |
| 500 | } | 505 | } |
| 501 | - | ||
| 502 | //老师-助教-主讲人-->设置旁路大于30秒没有推流,推流服务会停止,需要重设旁录和重加频道; | 506 | //老师-助教-主讲人-->设置旁路大于30秒没有推流,推流服务会停止,需要重设旁录和重加频道; |
| 503 | if(this.setConfigTimestamp>0&&GlobalConfig.isTeachOrAssistant){ | 507 | if(this.setConfigTimestamp>0&&GlobalConfig.isTeachOrAssistant){ |
| 504 | //如果间隔大于28秒并且没有推过流需要重新加入频道,推成功一次之后就不需要 | 508 | //如果间隔大于28秒并且没有推过流需要重新加入频道,推成功一次之后就不需要 |
-
请 注册 或 登录 后发表评论