张桐

增加学生未进入课堂 老师不能操作学生摄像头麦克 进入后显示学生名字

@@ -1242,6 +1242,7 @@ height: 1080px; @@ -1242,6 +1242,7 @@ height: 1080px;
1242 } 1242 }
1243 1243
1244 .stuVideo-video{ 1244 .stuVideo-video{
  1245 + display: none;
1245 position: absolute; 1246 position: absolute;
1246 left: 3px; 1247 left: 3px;
1247 bottom: -5px; 1248 bottom: -5px;
@@ -1268,7 +1269,7 @@ height: 1080px; @@ -1268,7 +1269,7 @@ height: 1080px;
1268 } 1269 }
1269 1270
1270 .stuVideo-videoNotClick{ 1271 .stuVideo-videoNotClick{
1271 - display: none; 1272 + /*display: none;*/
1272 position: absolute; 1273 position: absolute;
1273 left: 3px; 1274 left: 3px;
1274 bottom: -5px; 1275 bottom: -5px;
@@ -1280,7 +1281,7 @@ height: 1080px; @@ -1280,7 +1281,7 @@ height: 1080px;
1280 1281
1281 1282
1282 .stuVideo-voice{ 1283 .stuVideo-voice{
1283 - 1284 + display: none;
1284 position: absolute; 1285 position: absolute;
1285 left:23px; 1286 left:23px;
1286 bottom: 4px; 1287 bottom: 4px;
@@ -1311,7 +1312,7 @@ height: 1080px; @@ -1311,7 +1312,7 @@ height: 1080px;
1311 1312
1312 1313
1313 .stuVideo-voiceNotClick{ 1314 .stuVideo-voiceNotClick{
1314 - display: none; 1315 + /*display: none;*/
1315 position: absolute; 1316 position: absolute;
1316 left:23px; 1317 left:23px;
1317 bottom: 4px; 1318 bottom: 4px;
@@ -1373,6 +1374,16 @@ height: 1080px; @@ -1373,6 +1374,16 @@ height: 1080px;
1373 1374
1374 } 1375 }
1375 1376
  1377 +.curStuUserName{
  1378 + position: absolute;
  1379 + left: 47px;
  1380 + bottom: 5px;
  1381 + width: auto;
  1382 + height: 16px;
  1383 + color: #333333;
  1384 + font-size: 15px;
  1385 +}
  1386 +
1376 1387
1377 1388
1378 .teacherVideo-video{ 1389 .teacherVideo-video{
@@ -374,6 +374,7 @@ @@ -374,6 +374,7 @@
374 <div id="stuPlay"></div> 374 <div id="stuPlay"></div>
375 </div> 375 </div>
376 <img class="stuVideoBg"/> 376 <img class="stuVideoBg"/>
  377 + <div class="curStuUserName">学生未进入课堂</div>
377 <div id="stuVideo-video" class="stuVideo-video iconfont" title="发起学生视频">&#xe62e;</div> 378 <div id="stuVideo-video" class="stuVideo-video iconfont" title="发起学生视频">&#xe62e;</div>
378 <div id="stuVideo-videoBg" class="stuVideo-videoBg iconfont"></div> 379 <div id="stuVideo-videoBg" class="stuVideo-videoBg iconfont"></div>
379 <div id="stuVideo-videoNotClick" class="stuVideo-videoNotClick iconfont" title="当前不能点击">&#xe62e;</div> 380 <div id="stuVideo-videoNotClick" class="stuVideo-videoNotClick iconfont" title="当前不能点击">&#xe62e;</div>
@@ -880,6 +880,10 @@ if (callbackData.userRole=="normal"){ @@ -880,6 +880,10 @@ if (callbackData.userRole=="normal"){
880 $("#stuVideo-voice").css("display","none"); 880 $("#stuVideo-voice").css("display","none");
881 $("#teacherVideo-video").css("display","none"); 881 $("#teacherVideo-video").css("display","none");
882 $("#teacherVideo-voice").css("display","none"); 882 $("#teacherVideo-voice").css("display","none");
  883 + $(".curStuUserName").css("display","none");
  884 + $(".stuVideo-videoNotClick").css("display","none");
  885 + $(".stuVideo-voiceNotClick").css("display","none");
  886 +
883 887
884 888
885 } 889 }
@@ -34,6 +34,7 @@ $(function () { @@ -34,6 +34,7 @@ $(function () {
34 client.on(MessageTypes.VIDEO_UPDATE,_videoUpdate); 34 client.on(MessageTypes.VIDEO_UPDATE,_videoUpdate);
35 client.on(MessageTypes.AUDIO_UPDATE,_audioUpdate) 35 client.on(MessageTypes.AUDIO_UPDATE,_audioUpdate)
36 client.on(MessageTypes.CLASS_INSERT_ROSTER,userListUpdate) 36 client.on(MessageTypes.CLASS_INSERT_ROSTER,userListUpdate)
  37 + client.on(MessageTypes.CLASS_DELETE_ROSTER,userListLeave)
37 client.on(MessageTypes.VIDEO_BROADCAST,stuBroadcast) 38 client.on(MessageTypes.VIDEO_BROADCAST,stuBroadcast)
38 client.on(MessageTypes.AUDIO_BROADCAST,stuAudioBroadcast) 39 client.on(MessageTypes.AUDIO_BROADCAST,stuAudioBroadcast)
39 40
@@ -233,6 +234,8 @@ $(function () { @@ -233,6 +234,8 @@ $(function () {
233 }); 234 });
234 235
235 236
  237 +
  238 +
236 }); 239 });
237 240
238 241
@@ -340,17 +343,36 @@ function stuAudioBroadcast(callbackDate){ @@ -340,17 +343,36 @@ function stuAudioBroadcast(callbackDate){
340 //人员进入 343 //人员进入
341 function userListUpdate(callbackData) { 344 function userListUpdate(callbackData) {
342 345
343 - console.log("人员进入",callbackData);  
344 - if (classAllInfo.nodeId==callbackData.nodeId){ 346 + console.log("人员进入", callbackData);
  347 + if (classAllInfo.userRole=="host"){
  348 + if (classAllInfo.nodeId == callbackData.nodeId) {
345 $(".curUserName").html(callbackData.nodeData.name); 349 $(".curUserName").html(callbackData.nodeData.name);
346 - }else{  
347 - console.log("callbackData.nodeId================>",callbackData.nodeId)  
348 - stuNodeId=callbackData.nodeId;  
349 - } 350 + }else {
  351 + console.log("callbackData.nodeId================>", callbackData.nodeId)
  352 + stuNodeId = callbackData.nodeId;
350 353
  354 + $(".stuVideo-video").css("display","block");
  355 + $(".stuVideo-voice").css("display","block");
  356 + $(".stuVideo-videoNotClick").css("display","none");
  357 + $(".stuVideo-voiceNotClick").css("display","none");
  358 +
  359 + $(".curStuUserName").html(callbackData.nodeData.name);
  360 + }
  361 + }
351 362
352 } 363 }
  364 +//人员离开
  365 +function userListLeave(callbackData){
  366 + console.log("人员离开", callbackData);
  367 + if (classAllInfo.nodeId != callbackData.nodeId) {
  368 + $(".curStuUserName").html("学生已离开");
  369 + $(".stuVideo-video").css("display","none");
  370 + $(".stuVideo-voice").css("display","none");
  371 + $(".stuVideo-videoNotClick").css("display","block");
  372 + $(".stuVideo-voiceNotClick").css("display","block");
353 373
  374 + }
  375 +}
354 // 监听当前是否有视频流更新 376 // 监听当前是否有视频流更新
355 function _videoUpdate(callbackDate){ 377 function _videoUpdate(callbackDate){
356 console.log("videoUpdate==============>",callbackDate); 378 console.log("videoUpdate==============>",callbackDate);