正在显示
4 个修改的文件
包含
138 行增加
和
75 行删除
| @@ -291,6 +291,15 @@ height: 1080px; | @@ -291,6 +291,15 @@ height: 1080px; | ||
| 291 | .am-dropdown-content-li-rest{ | 291 | .am-dropdown-content-li-rest{ |
| 292 | display: none; | 292 | display: none; |
| 293 | } | 293 | } |
| 294 | + .am-dropdown-content-li-stop-gray{ | ||
| 295 | + display: none; | ||
| 296 | + color: #999999; | ||
| 297 | + cursor: default; | ||
| 298 | + } | ||
| 299 | + #classes-status-gray{ | ||
| 300 | + color: #999999; | ||
| 301 | + cursor: default; | ||
| 302 | + } | ||
| 294 | 303 | ||
| 295 | 304 | ||
| 296 | 305 | ||
| @@ -1304,11 +1313,29 @@ height: 1080px; | @@ -1304,11 +1313,29 @@ height: 1080px; | ||
| 1304 | font-size: 15px; | 1313 | font-size: 15px; |
| 1305 | 1314 | ||
| 1306 | } | 1315 | } |
| 1316 | +.curStuUserTip{ | ||
| 1317 | + position: absolute; | ||
| 1318 | + left: 70px; | ||
| 1319 | + bottom: 40px; | ||
| 1320 | + width: auto; | ||
| 1321 | + height: 16px; | ||
| 1322 | + color: #333333; | ||
| 1323 | + font-size: 15px; | ||
| 1324 | +} | ||
| 1325 | +.curTeaUserTip{ | ||
| 1326 | + position: absolute; | ||
| 1327 | + left: 70px; | ||
| 1328 | + bottom: 40px; | ||
| 1329 | + width: auto; | ||
| 1330 | + height: 16px; | ||
| 1331 | + color: #333333; | ||
| 1332 | + font-size: 15px; | ||
| 1333 | +} | ||
| 1307 | 1334 | ||
| 1308 | .curStuUserName{ | 1335 | .curStuUserName{ |
| 1309 | position: absolute; | 1336 | position: absolute; |
| 1310 | - left: 68px; | ||
| 1311 | - bottom: 40px; | 1337 | + left: 47px; |
| 1338 | + bottom: 5px; | ||
| 1312 | width: auto; | 1339 | width: auto; |
| 1313 | height: 16px; | 1340 | height: 16px; |
| 1314 | color: #333333; | 1341 | color: #333333; |
| @@ -160,6 +160,7 @@ | @@ -160,6 +160,7 @@ | ||
| 160 | id="span-iconfont" class="span-classes iconfont"></span><span id="class-now">未开始</span> | 160 | id="span-iconfont" class="span-classes iconfont"></span><span id="class-now">未开始</span> |
| 161 | </button> | 161 | </button> |
| 162 | <ul class="am-dropdown-content"> | 162 | <ul class="am-dropdown-content"> |
| 163 | + | ||
| 163 | <li class="am-dropdown-content-li-begin"><span id="am-dropdown-content-span-1" class="am-dropdown-content-span iconfont"></span> | 164 | <li class="am-dropdown-content-li-begin"><span id="am-dropdown-content-span-1" class="am-dropdown-content-span iconfont"></span> |
| 164 | <button id="classes-status-begin" type="button" | 165 | <button id="classes-status-begin" type="button" |
| 165 | class="am-btn am-btn-primary am-dropdown-content-button" | 166 | class="am-btn am-btn-primary am-dropdown-content-button" |
| @@ -178,6 +179,13 @@ | @@ -178,6 +179,13 @@ | ||
| 178 | href="#">继续上课 | 179 | href="#">继续上课 |
| 179 | </button> | 180 | </button> |
| 180 | </li> | 181 | </li> |
| 182 | + <li id="am-dropdown-content-li-stop-gray" class="am-dropdown-content-li-stop-gray stopGray"><span class="am-dropdown-content-span iconfont"></span> | ||
| 183 | + <button id="classes-status-gray" type="button" | ||
| 184 | + class="am-btn am-btn-primary am-dropdown-content-button" | ||
| 185 | + | ||
| 186 | + href="#">结束课堂 | ||
| 187 | + </button> | ||
| 188 | + </li> | ||
| 181 | 189 | ||
| 182 | <li class="am-dropdown-content-li-stop"><span class="am-dropdown-content-span iconfont"></span> | 190 | <li class="am-dropdown-content-li-stop"><span class="am-dropdown-content-span iconfont"></span> |
| 183 | <button id="classes-status-2" type="button" | 191 | <button id="classes-status-2" type="button" |
| @@ -353,7 +361,8 @@ | @@ -353,7 +361,8 @@ | ||
| 353 | <div id="stuPlay"></div> | 361 | <div id="stuPlay"></div> |
| 354 | </div> | 362 | </div> |
| 355 | <img class="stuVideoBg"/> | 363 | <img class="stuVideoBg"/> |
| 356 | - <div class="curStuUserName">学生未进入课堂</div> | 364 | + <div class="curStuUserTip">学生未进入课堂</div> |
| 365 | + <div class="curStuUserName"></div> | ||
| 357 | <div id="stuVideo-video" class="stuVideo-video iconfont" title="发起学生视频"></div> | 366 | <div id="stuVideo-video" class="stuVideo-video iconfont" title="发起学生视频"></div> |
| 358 | <div id="stuVideo-videoBg" class="stuVideo-videoBg iconfont"></div> | 367 | <div id="stuVideo-videoBg" class="stuVideo-videoBg iconfont"></div> |
| 359 | <div id="stuVideo-videoNotClick" class="stuVideo-videoNotClick iconfont" title="当前不能点击"></div> | 368 | <div id="stuVideo-videoNotClick" class="stuVideo-videoNotClick iconfont" title="当前不能点击"></div> |
| @@ -365,7 +374,7 @@ | @@ -365,7 +374,7 @@ | ||
| 365 | 374 | ||
| 366 | </div> | 375 | </div> |
| 367 | <div class="teacherVideo"> | 376 | <div class="teacherVideo"> |
| 368 | - <div class="publish" style="position:absolute;top: 0; width:240px;height:180px"> | 377 | + <div class="publish" style="position:absolute;top: 0; width:240px;height:180px; -webkit-transform:scale(1.25);"> |
| 369 | <div id="publish"></div> | 378 | <div id="publish"></div> |
| 370 | </div> | 379 | </div> |
| 371 | <div class="play" style="position:absolute;top: 0; width:240px;height:180px"> | 380 | <div class="play" style="position:absolute;top: 0; width:240px;height:180px"> |
| @@ -373,6 +382,7 @@ | @@ -373,6 +382,7 @@ | ||
| 373 | </div> | 382 | </div> |
| 374 | <img class="teacherVideoBg"/> | 383 | <img class="teacherVideoBg"/> |
| 375 | <img class="teacherVoicing"/> | 384 | <img class="teacherVoicing"/> |
| 385 | + <div class="curTeaUserTip">老师未进入课堂</div> | ||
| 376 | <div class="curUserName"></div> | 386 | <div class="curUserName"></div> |
| 377 | <div id="teacherVideo-video" class="teacherVideo-video iconfont" title="发起视频"></div> | 387 | <div id="teacherVideo-video" class="teacherVideo-video iconfont" title="发起视频"></div> |
| 378 | <div id="teacherVideo-videoBg" class="teacherVideo-videoBg iconfont"></div> | 388 | <div id="teacherVideo-videoBg" class="teacherVideo-videoBg iconfont"></div> |
| @@ -49,10 +49,12 @@ function mainTimeStamp() { | @@ -49,10 +49,12 @@ function mainTimeStamp() { | ||
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | $(function () { | 51 | $(function () { |
| 52 | + | ||
| 52 | initEngine();//加载MCUClientEngine; | 53 | initEngine();//加载MCUClientEngine; |
| 53 | listenClass(); //监听事件 | 54 | listenClass(); //监听事件 |
| 54 | loading(); | 55 | loading(); |
| 55 | urlParamsJudge();//对地址栏参数的数据进行判断 | 56 | urlParamsJudge();//对地址栏参数的数据进行判断 |
| 57 | + | ||
| 56 | }); | 58 | }); |
| 57 | 59 | ||
| 58 | function initEngine(){ | 60 | function initEngine(){ |
| @@ -73,7 +75,7 @@ function listenClass() { | @@ -73,7 +75,7 @@ function listenClass() { | ||
| 73 | if(client){ | 75 | if(client){ |
| 74 | // client.on(MessageTypes.UPDATE_CLASS_TIMER,updateClassTime);// 监听会议时间更新 | 76 | // client.on(MessageTypes.UPDATE_CLASS_TIMER,updateClassTime);// 监听会议时间更新 |
| 75 | 77 | ||
| 76 | - client.on(MessageTypes.CLASS_UPTATE_STATUS,classUpdateStatus);//监听会议状态更新 | 78 | + client.on(MessageTypes.CLASS_UPTATE_STATUS,classUpdateStatus);//监听课堂状态更新 |
| 77 | client.on(MessageTypes.CHAT_RECEIVE,chatReceive); //监听到聊天信息 | 79 | client.on(MessageTypes.CHAT_RECEIVE,chatReceive); //监听到聊天信息 |
| 78 | client.on(MessageTypes.WHITEBOARD_ANNOTATION_UPDATE,whiteboardUpdate);//监听白板更新 | 80 | client.on(MessageTypes.WHITEBOARD_ANNOTATION_UPDATE,whiteboardUpdate);//监听白板更新 |
| 79 | client.on(MessageTypes.DOC_DELETE,docDelete);//监听删除文档 | 81 | client.on(MessageTypes.DOC_DELETE,docDelete);//监听删除文档 |
| @@ -950,6 +952,8 @@ function classJoinSuccess(callbackData){ | @@ -950,6 +952,8 @@ function classJoinSuccess(callbackData){ | ||
| 950 | $("#teacherVideo-video").css("display","none"); | 952 | $("#teacherVideo-video").css("display","none"); |
| 951 | $("#teacherVideo-voice").css("display","none"); | 953 | $("#teacherVideo-voice").css("display","none"); |
| 952 | $(".curStuUserName").css("display","none"); | 954 | $(".curStuUserName").css("display","none"); |
| 955 | + $(".curStuUserTip").css("display","none"); | ||
| 956 | + | ||
| 953 | $(".stuVideo-videoNotClick").css("display","none"); | 957 | $(".stuVideo-videoNotClick").css("display","none"); |
| 954 | $(".stuVideo-voiceNotClick").css("display","none"); | 958 | $(".stuVideo-voiceNotClick").css("display","none"); |
| 955 | } | 959 | } |
| @@ -969,6 +973,45 @@ function layoutView( ) { | @@ -969,6 +973,45 @@ function layoutView( ) { | ||
| 969 | "display":"block" | 973 | "display":"block" |
| 970 | }); | 974 | }); |
| 971 | 975 | ||
| 976 | + //加入课堂成功后,点击开始上课 | ||
| 977 | + $("#classes-status-begin").click(function () { | ||
| 978 | + $(".am-dropdown-content-li-stop-gray").css("display","none"); | ||
| 979 | + $(".am-dropdown-content-li-stop").css("display","block"); | ||
| 980 | + | ||
| 981 | + $(".am-dropdown-content-li-begin").css("display","none"); | ||
| 982 | + $(".am-dropdown-content-li-pause").css("display","block"); | ||
| 983 | + $(".span-classes").html(""); | ||
| 984 | + $("#class-now").html("直播中"); | ||
| 985 | + client.sendStartClass(); | ||
| 986 | + }); | ||
| 987 | + //暂停课堂 | ||
| 988 | + $("#classes-status-pause").click(function () { | ||
| 989 | + $(".span-classes").html(""); | ||
| 990 | + $("#class-now").html("休息中"); | ||
| 991 | + $(".am-dropdown-content-li-pause").css("display","none"); | ||
| 992 | + $(".am-dropdown-content-li-rest").css("display","block"); | ||
| 993 | + client.sendPauseClass(); | ||
| 994 | + | ||
| 995 | + }); | ||
| 996 | + //结束课堂,课堂的状态还原为未开始状态,所有人都要离开课堂。 | ||
| 997 | + $("#end").click(function () { | ||
| 998 | + $(".box").css("display", "none"); | ||
| 999 | + client.sendCloseClass(); | ||
| 1000 | + }); | ||
| 1001 | + //退出,但不结束课堂,是当前这个人退出 | ||
| 1002 | + $("#end-no-exit").click(function () { | ||
| 1003 | + client.leaveClass(); | ||
| 1004 | + $(".box").css("display", "none"); | ||
| 1005 | + }); | ||
| 1006 | + //继续上课 | ||
| 1007 | + $("#classes-status-rest").click(function () { | ||
| 1008 | + client.sendStartClass(); | ||
| 1009 | + $(".am-dropdown-content-li-rest").css("display","none"); | ||
| 1010 | + $(".am-dropdown-content-li-pause").css("display","block"); | ||
| 1011 | + $(".span-classes").html(""); | ||
| 1012 | + $("#class-now").html("直播中"); | ||
| 1013 | + | ||
| 1014 | + }); | ||
| 972 | 1015 | ||
| 973 | 1016 | ||
| 974 | 1017 | ||
| @@ -1151,83 +1194,37 @@ function whiteboardUpdate(callbackData) { | @@ -1151,83 +1194,37 @@ function whiteboardUpdate(callbackData) { | ||
| 1151 | // function updateClassTime(callbackData){ | 1194 | // function updateClassTime(callbackData){ |
| 1152 | // | 1195 | // |
| 1153 | // } | 1196 | // } |
| 1154 | -//监听会议状态更新 | 1197 | +//监听课堂状态更新 |
| 1155 | function classUpdateStatus(callbackData) { | 1198 | function classUpdateStatus(callbackData) { |
| 1156 | - console.log("监听会议状态更新======>",callbackData); | 1199 | + console.log("监听课堂状态更新======>",callbackData); |
| 1157 | 1200 | ||
| 1158 | //当前课堂的状态0(未开始) 、1(已经开始) 2(暂停中) | 1201 | //当前课堂的状态0(未开始) 、1(已经开始) 2(暂停中) |
| 1159 | if(callbackData.classStatus==0){ | 1202 | if(callbackData.classStatus==0){ |
| 1160 | //加入课堂成功后,点击开始上课 | 1203 | //加入课堂成功后,点击开始上课 |
| 1161 | - $("#classes-status-begin").click(function () { | 1204 | + $(".stopGray").css("display","block"); |
| 1205 | + $(".am-dropdown-content-li-stop").css("display","none"); | ||
| 1162 | 1206 | ||
| 1163 | - $(".am-dropdown-content-li-begin").css("display","none"); | ||
| 1164 | - $(".am-dropdown-content-li-pause").css("display","block"); | ||
| 1165 | - $(".span-classes").html(""); | ||
| 1166 | - $("#class-now").html("直播中"); | ||
| 1167 | - client.sendStartClass(); | ||
| 1168 | - | ||
| 1169 | - | ||
| 1170 | - }); | ||
| 1171 | - }else if (callbackData.classStatus==1){ | 1207 | + } |
| 1208 | + if (callbackData.classStatus==1){ | ||
| 1172 | $(".span-classes").html(""); | 1209 | $(".span-classes").html(""); |
| 1173 | $("#class-now").html("直播中"); | 1210 | $("#class-now").html("直播中"); |
| 1174 | $(".am-dropdown-content-li-pause").css("display","block"); | 1211 | $(".am-dropdown-content-li-pause").css("display","block"); |
| 1175 | 1212 | ||
| 1176 | $(".am-dropdown-content-li-begin").css("display","none"); | 1213 | $(".am-dropdown-content-li-begin").css("display","none"); |
| 1177 | 1214 | ||
| 1178 | - //暂停课堂 | ||
| 1179 | - $("#classes-status-pause").click(function () { | ||
| 1180 | - $(".span-classes").html(""); | ||
| 1181 | - $("#class-now").html("休息中"); | ||
| 1182 | - $(".am-dropdown-content-li-pause").css("display","none"); | ||
| 1183 | - $(".am-dropdown-content-li-rest").css("display","block"); | ||
| 1184 | - client.sendPauseClass(); | ||
| 1185 | - | ||
| 1186 | - }); | 1215 | + $(".am-dropdown-content-li-stop").css("display","block"); |
| 1216 | + $(".am-dropdown-content-li-stop-gary").css("display","none"); | ||
| 1187 | 1217 | ||
| 1188 | 1218 | ||
| 1189 | - //结束课堂,课堂的状态还原为未开始状态,所有人都要离开课堂。 | ||
| 1190 | - $("#end").click(function () { | ||
| 1191 | - $(".box").css("display", "none"); | ||
| 1192 | - client.sendCloseClass(); | ||
| 1193 | - }); | ||
| 1194 | - //退出,但不结束课堂,是当前这个人退出 | ||
| 1195 | - $("#end-no-exit").click(function () { | ||
| 1196 | - client.leaveClass(); | ||
| 1197 | - $(".box").css("display", "none"); | ||
| 1198 | - }); | ||
| 1199 | - | ||
| 1200 | - }else if (callbackData.classStatus==2){ | 1219 | + } |
| 1220 | + if (callbackData.classStatus==2){ | ||
| 1201 | 1221 | ||
| 1202 | $(".span-classes").html(""); | 1222 | $(".span-classes").html(""); |
| 1203 | $("#class-now").html("休息中"); | 1223 | $("#class-now").html("休息中"); |
| 1204 | $(".am-dropdown-content-li-begin").css("display","none"); | 1224 | $(".am-dropdown-content-li-begin").css("display","none"); |
| 1205 | $(".am-dropdown-content-li-rest").css("display","block"); | 1225 | $(".am-dropdown-content-li-rest").css("display","block"); |
| 1206 | - | ||
| 1207 | - | ||
| 1208 | - //继续上课 | ||
| 1209 | - $("#classes-status-rest").click(function () { | ||
| 1210 | - client.sendStartClass(); | ||
| 1211 | - $(".am-dropdown-content-li-rest").css("display","none"); | ||
| 1212 | - $(".am-dropdown-content-li-pause").css("display","block"); | ||
| 1213 | - $(".span-classes").html(""); | ||
| 1214 | - $("#class-now").html("直播中"); | ||
| 1215 | - | ||
| 1216 | - }); | ||
| 1217 | - | ||
| 1218 | - //结束课堂,课堂的状态还原为未开始状态,所有人都要离开课堂。 | ||
| 1219 | - $("#end").click(function () { | ||
| 1220 | - $(".box").css("display", "none"); | ||
| 1221 | - client.sendCloseClass(); | ||
| 1222 | - }); | ||
| 1223 | - //退出,但不结束课堂,是当前这个人退出 | ||
| 1224 | - $("#end-no-exit").click(function () { | ||
| 1225 | - client.leaveClass(); | ||
| 1226 | - $(".box").css("display", "none"); | ||
| 1227 | - }); | ||
| 1228 | - | ||
| 1229 | - }else{ | ||
| 1230 | - | 1226 | + $(".am-dropdown-content-li-stop").css("display","block"); |
| 1227 | + $(".am-dropdown-content-li-stop-gary").css("display","none"); | ||
| 1231 | } | 1228 | } |
| 1232 | 1229 | ||
| 1233 | 1230 | ||
| @@ -1269,11 +1266,13 @@ function GetUrlParam() { | @@ -1269,11 +1266,13 @@ function GetUrlParam() { | ||
| 1269 | 1266 | ||
| 1270 | //将用户名和密码提交给底层 | 1267 | //将用户名和密码提交给底层 |
| 1271 | function onJoinClass(userName, password) { | 1268 | function onJoinClass(userName, password) { |
| 1269 | + | ||
| 1272 | //加入课堂的信息 | 1270 | //加入课堂的信息 |
| 1273 | var classInfo = {}; | 1271 | var classInfo = {}; |
| 1274 | if (classInfo) { | 1272 | if (classInfo) { |
| 1275 | classInfo.userName = userName; | 1273 | classInfo.userName = userName; |
| 1276 | classInfo.password = password; | 1274 | classInfo.password = password; |
| 1275 | + classInfo.autoLogin=classParamInfo.m; | ||
| 1277 | client.joinClass(classInfo,classJoinSuccess); | 1276 | client.joinClass(classInfo,classJoinSuccess); |
| 1278 | } else { | 1277 | } else { |
| 1279 | console.log("error"); | 1278 | console.log("error"); |
| @@ -1326,7 +1325,7 @@ function urlParamsJudge(){ | @@ -1326,7 +1325,7 @@ function urlParamsJudge(){ | ||
| 1326 | classParamInfo.userId=classLoadInfo.userId; //第三方用户id | 1325 | classParamInfo.userId=classLoadInfo.userId; //第三方用户id |
| 1327 | classParamInfo.userType=classLoadInfo.userType; //用户的身份 默认1 | 1326 | classParamInfo.userType=classLoadInfo.userType; //用户的身份 默认1 |
| 1328 | classParamInfo.userName=classLoadInfo.userName; //第三方用户名称 | 1327 | classParamInfo.userName=classLoadInfo.userName; //第三方用户名称 |
| 1329 | - // classParamInfo.passWord=classLoadInfo.passWord; //用户密码 | 1328 | + classParamInfo.m=classLoadInfo.m; //m |
| 1330 | 1329 | ||
| 1331 | console.log("传给底层,进行初始化的数据"); | 1330 | console.log("传给底层,进行初始化的数据"); |
| 1332 | console.log(classParamInfo); | 1331 | console.log(classParamInfo); |
| @@ -1354,7 +1353,7 @@ function getURLParams(){ | @@ -1354,7 +1353,7 @@ function getURLParams(){ | ||
| 1354 | classLoadInfo.userType=parseInt(classUrlParam.userType)||1; | 1353 | classLoadInfo.userType=parseInt(classUrlParam.userType)||1; |
| 1355 | classLoadInfo.userId=classUrlParam.userId?classUrlParam.userId:"0"; | 1354 | classLoadInfo.userId=classUrlParam.userId?classUrlParam.userId:"0"; |
| 1356 | classLoadInfo.portal=classLoadInfo.portalIP+":"+classLoadInfo.portalPort; | 1355 | classLoadInfo.portal=classLoadInfo.portalIP+":"+classLoadInfo.portalPort; |
| 1357 | - // classLoadInfo.passWord=classUrlParam.passWord||""; | 1356 | + classLoadInfo.m=classUrlParam.m||""; |
| 1358 | 1357 | ||
| 1359 | console.log(classLoadInfo); | 1358 | console.log(classLoadInfo); |
| 1360 | return classLoadInfo; | 1359 | return classLoadInfo; |
| @@ -347,7 +347,9 @@ function userListUpdate(callbackData) { | @@ -347,7 +347,9 @@ function userListUpdate(callbackData) { | ||
| 347 | console.log("人员进入", callbackData); | 347 | console.log("人员进入", callbackData); |
| 348 | if (classAllInfo.userRole=="host"){ | 348 | if (classAllInfo.userRole=="host"){ |
| 349 | if (classAllInfo.nodeId == callbackData.nodeId) { | 349 | if (classAllInfo.nodeId == callbackData.nodeId) { |
| 350 | + | ||
| 350 | $(".curUserName").html(callbackData.nodeData.name); | 351 | $(".curUserName").html(callbackData.nodeData.name); |
| 352 | + $(".curTeaUserTip").css("display","none"); | ||
| 351 | }else { | 353 | }else { |
| 352 | console.log("callbackData.nodeId================>", callbackData.nodeId) | 354 | console.log("callbackData.nodeId================>", callbackData.nodeId) |
| 353 | stuNodeId = callbackData.nodeId; | 355 | stuNodeId = callbackData.nodeId; |
| @@ -356,15 +358,23 @@ function userListUpdate(callbackData) { | @@ -356,15 +358,23 @@ function userListUpdate(callbackData) { | ||
| 356 | $(".stuVideo-voice").css("display","block"); | 358 | $(".stuVideo-voice").css("display","block"); |
| 357 | $(".stuVideo-videoNotClick").css("display","none"); | 359 | $(".stuVideo-videoNotClick").css("display","none"); |
| 358 | $(".stuVideo-voiceNotClick").css("display","none"); | 360 | $(".stuVideo-voiceNotClick").css("display","none"); |
| 359 | - | 361 | + $(".curStuUserName").css("display","block"); |
| 360 | $(".curStuUserName").html(callbackData.nodeData.name); | 362 | $(".curStuUserName").html(callbackData.nodeData.name); |
| 363 | + $(".curStuUserTip").css("display","none"); | ||
| 364 | + | ||
| 361 | } | 365 | } |
| 362 | } | 366 | } |
| 363 | if (classAllInfo.userRole=="normal"){ | 367 | if (classAllInfo.userRole=="normal"){ |
| 364 | if (classAllInfo.nodeId == callbackData.nodeId) { | 368 | if (classAllInfo.nodeId == callbackData.nodeId) { |
| 365 | console.log("callbackData.nodeId=====normal===========>", callbackData.nodeId); | 369 | console.log("callbackData.nodeId=====normal===========>", callbackData.nodeId); |
| 366 | stuNodeId = callbackData.nodeId; | 370 | stuNodeId = callbackData.nodeId; |
| 371 | + $(".curStuUserName").css("display","block"); | ||
| 372 | + $(".curStuUserName").html(callbackData.nodeData.name); | ||
| 367 | }else{ | 373 | }else{ |
| 374 | + $(".curTeaUserTip").css("display","none"); | ||
| 375 | + $(".curUserName").css("display","block"); | ||
| 376 | + | ||
| 377 | + $(".curUserName").html(callbackData.nodeData.name); | ||
| 368 | teaNodeId=callbackData.nodeId; | 378 | teaNodeId=callbackData.nodeId; |
| 369 | console.log("callbackData.nodeId=====teaNodeIdnormal===========>", teaNodeId,callbackData.nodeId) | 379 | console.log("callbackData.nodeId=====teaNodeIdnormal===========>", teaNodeId,callbackData.nodeId) |
| 370 | 380 | ||
| @@ -375,14 +385,28 @@ function userListUpdate(callbackData) { | @@ -375,14 +385,28 @@ function userListUpdate(callbackData) { | ||
| 375 | } | 385 | } |
| 376 | //人员离开 | 386 | //人员离开 |
| 377 | function userListLeave(callbackData){ | 387 | function userListLeave(callbackData){ |
| 388 | + console.log(teaNodeId,stuNodeId); | ||
| 378 | console.log("人员离开", callbackData); | 389 | console.log("人员离开", callbackData); |
| 379 | - if (classAllInfo.nodeId != callbackData.nodeId) { | ||
| 380 | - $(".curStuUserName").html("学生已离开"); | ||
| 381 | - $(".stuVideo-video").css("display","none"); | ||
| 382 | - $(".stuVideo-voice").css("display","none"); | ||
| 383 | - $(".stuVideo-videoNotClick").css("display","block"); | ||
| 384 | - $(".stuVideo-voiceNotClick").css("display","block"); | 390 | + console.log(classAllInfo.nodeId,callbackData.nodeId); |
| 391 | + if (callbackData.nodeId==stuNodeId){ | ||
| 392 | + if (classAllInfo.userRole=="host"){ | ||
| 393 | + $(".curStuUserTip").html("学生已离开课堂"); | ||
| 394 | + $(".curStuUserTip").css("display","block"); | ||
| 395 | + $(".curStuUserName").css("display","none"); | ||
| 396 | + $(".stuVideo-video").css("display","none"); | ||
| 397 | + $(".stuVideo-voice").css("display","none"); | ||
| 398 | + $(".stuVideo-videoNotClick").css("display","block"); | ||
| 399 | + $(".stuVideo-voiceNotClick").css("display","block"); | ||
| 400 | + } | ||
| 401 | + } | ||
| 402 | + if(callbackData.nodeId==teaNodeId){ | ||
| 403 | + if (classAllInfo.userRole=="normal"){ | ||
| 404 | + $(".curTeaUserTip").html("老师已离开课堂"); | ||
| 405 | + $(".curTeaUserTip").css("display","block"); | ||
| 406 | + $(".curUserName").css("display","none"); | ||
| 385 | 407 | ||
| 408 | + | ||
| 409 | + } | ||
| 386 | } | 410 | } |
| 387 | } | 411 | } |
| 388 | // 监听当前是否有视频流更新 | 412 | // 监听当前是否有视频流更新 |
| @@ -851,7 +875,7 @@ function publishTeaAudioURL(rtmpURL) { | @@ -851,7 +875,7 @@ function publishTeaAudioURL(rtmpURL) { | ||
| 851 | 875 | ||
| 852 | //获取老师推音视频流地址 | 876 | //获取老师推音视频流地址 |
| 853 | function achieveTeaVideoStream(){ | 877 | function achieveTeaVideoStream(){ |
| 854 | - $(".publish").css({"width":"240px","height":"180px"}); | 878 | + // $(".publish").css({"width":"240px","height":"180px"}); |
| 855 | $(".play").css({"width":"1px","height":"1px"}); | 879 | $(".play").css({"width":"1px","height":"1px"}); |
| 856 | var paramInfo={ | 880 | var paramInfo={ |
| 857 | "type": "flash" | 881 | "type": "flash" |
| @@ -864,8 +888,8 @@ function achieveTeaVideoStream(){ | @@ -864,8 +888,8 @@ function achieveTeaVideoStream(){ | ||
| 864 | if(! window.publishflash) { | 888 | if(! window.publishflash) { |
| 865 | flashvideo( | 889 | flashvideo( |
| 866 | 'publish', | 890 | 'publish', |
| 867 | - '100%', | ||
| 868 | - '100%', | 891 | + '400', |
| 892 | + '300', | ||
| 869 | function (error, publishflash) { | 893 | function (error, publishflash) { |
| 870 | if (error) { | 894 | if (error) { |
| 871 | return console.error(error); | 895 | return console.error(error); |
| @@ -916,6 +940,8 @@ function publishURL(rtmpURL) { | @@ -916,6 +940,8 @@ function publishURL(rtmpURL) { | ||
| 916 | type: 10, | 940 | type: 10, |
| 917 | videoId: publishflashVideoId, | 941 | videoId: publishflashVideoId, |
| 918 | data: { | 942 | data: { |
| 943 | + vwidth:240, | ||
| 944 | + vheight:180, | ||
| 919 | video:true, | 945 | video:true, |
| 920 | audio:true, | 946 | audio:true, |
| 921 | url: rtmpURL | 947 | url: rtmpURL |
| @@ -923,6 +949,7 @@ function publishURL(rtmpURL) { | @@ -923,6 +949,7 @@ function publishURL(rtmpURL) { | ||
| 923 | }); | 949 | }); |
| 924 | console.log("publishflashVideoId======>",publishflashVideoId); | 950 | console.log("publishflashVideoId======>",publishflashVideoId); |
| 925 | console.log(publishflash._js2native(msg)); | 951 | console.log(publishflash._js2native(msg)); |
| 952 | + | ||
| 926 | } | 953 | } |
| 927 | 954 | ||
| 928 | 955 |
-
请 注册 或 登录 后发表评论