张桐

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

... ... @@ -1242,6 +1242,7 @@ height: 1080px;
}
.stuVideo-video{
display: none;
position: absolute;
left: 3px;
bottom: -5px;
... ... @@ -1268,7 +1269,7 @@ height: 1080px;
}
.stuVideo-videoNotClick{
display: none;
/*display: none;*/
position: absolute;
left: 3px;
bottom: -5px;
... ... @@ -1280,7 +1281,7 @@ height: 1080px;
.stuVideo-voice{
display: none;
position: absolute;
left:23px;
bottom: 4px;
... ... @@ -1311,7 +1312,7 @@ height: 1080px;
.stuVideo-voiceNotClick{
display: none;
/*display: none;*/
position: absolute;
left:23px;
bottom: 4px;
... ... @@ -1373,6 +1374,16 @@ height: 1080px;
}
.curStuUserName{
position: absolute;
left: 47px;
bottom: 5px;
width: auto;
height: 16px;
color: #333333;
font-size: 15px;
}
.teacherVideo-video{
... ...
... ... @@ -374,6 +374,7 @@
<div id="stuPlay"></div>
</div>
<img class="stuVideoBg"/>
<div class="curStuUserName">学生未进入课堂</div>
<div id="stuVideo-video" class="stuVideo-video iconfont" title="发起学生视频">&#xe62e;</div>
<div id="stuVideo-videoBg" class="stuVideo-videoBg iconfont"></div>
<div id="stuVideo-videoNotClick" class="stuVideo-videoNotClick iconfont" title="当前不能点击">&#xe62e;</div>
... ...
... ... @@ -880,6 +880,10 @@ if (callbackData.userRole=="normal"){
$("#stuVideo-voice").css("display","none");
$("#teacherVideo-video").css("display","none");
$("#teacherVideo-voice").css("display","none");
$(".curStuUserName").css("display","none");
$(".stuVideo-videoNotClick").css("display","none");
$(".stuVideo-voiceNotClick").css("display","none");
}
... ...
... ... @@ -34,6 +34,7 @@ $(function () {
client.on(MessageTypes.VIDEO_UPDATE,_videoUpdate);
client.on(MessageTypes.AUDIO_UPDATE,_audioUpdate)
client.on(MessageTypes.CLASS_INSERT_ROSTER,userListUpdate)
client.on(MessageTypes.CLASS_DELETE_ROSTER,userListLeave)
client.on(MessageTypes.VIDEO_BROADCAST,stuBroadcast)
client.on(MessageTypes.AUDIO_BROADCAST,stuAudioBroadcast)
... ... @@ -233,6 +234,8 @@ $(function () {
});
});
... ... @@ -340,17 +343,36 @@ function stuAudioBroadcast(callbackDate){
//人员进入
function userListUpdate(callbackData) {
console.log("人员进入",callbackData);
if (classAllInfo.nodeId==callbackData.nodeId){
console.log("人员进入", callbackData);
if (classAllInfo.userRole=="host"){
if (classAllInfo.nodeId == callbackData.nodeId) {
$(".curUserName").html(callbackData.nodeData.name);
}else{
console.log("callbackData.nodeId================>",callbackData.nodeId)
stuNodeId=callbackData.nodeId;
}
}else {
console.log("callbackData.nodeId================>", callbackData.nodeId)
stuNodeId = callbackData.nodeId;
$(".stuVideo-video").css("display","block");
$(".stuVideo-voice").css("display","block");
$(".stuVideo-videoNotClick").css("display","none");
$(".stuVideo-voiceNotClick").css("display","none");
$(".curStuUserName").html(callbackData.nodeData.name);
}
}
}
//人员离开
function userListLeave(callbackData){
console.log("人员离开", callbackData);
if (classAllInfo.nodeId != callbackData.nodeId) {
$(".curStuUserName").html("学生已离开");
$(".stuVideo-video").css("display","none");
$(".stuVideo-voice").css("display","none");
$(".stuVideo-videoNotClick").css("display","block");
$(".stuVideo-voiceNotClick").css("display","block");
}
}
// 监听当前是否有视频流更新
function _videoUpdate(callbackDate){
console.log("videoUpdate==============>",callbackDate);
... ...