正在显示
4 个修改的文件
包含
194 行增加
和
117 行删除
@@ -1267,8 +1267,20 @@ height: 1080px; | @@ -1267,8 +1267,20 @@ height: 1080px; | ||
1267 | background: url("../images/hangupHover.gif") no-repeat center center; | 1267 | background: url("../images/hangupHover.gif") no-repeat center center; |
1268 | } | 1268 | } |
1269 | 1269 | ||
1270 | +.stuVideo-videoNotClick{ | ||
1271 | + display: none; | ||
1272 | + position: absolute; | ||
1273 | + left: 3px; | ||
1274 | + bottom: -5px; | ||
1275 | + cursor: pointer; | ||
1276 | + color: #999; | ||
1277 | + margin: 0px 5px 0px 5px; | ||
1278 | + | ||
1279 | +} | ||
1280 | + | ||
1270 | 1281 | ||
1271 | .stuVideo-voice{ | 1282 | .stuVideo-voice{ |
1283 | + | ||
1272 | position: absolute; | 1284 | position: absolute; |
1273 | left:23px; | 1285 | left:23px; |
1274 | bottom: 4px; | 1286 | bottom: 4px; |
@@ -1298,6 +1310,20 @@ height: 1080px; | @@ -1298,6 +1310,20 @@ height: 1080px; | ||
1298 | } | 1310 | } |
1299 | 1311 | ||
1300 | 1312 | ||
1313 | +.stuVideo-voiceNotClick{ | ||
1314 | + display: none; | ||
1315 | + position: absolute; | ||
1316 | + left:23px; | ||
1317 | + bottom: 4px; | ||
1318 | + width: 16px; | ||
1319 | + height: 16px; | ||
1320 | + font-size: 16px; | ||
1321 | + cursor: pointer; | ||
1322 | + color: #999; | ||
1323 | + margin: 0px 5px 0px 5px; | ||
1324 | +} | ||
1325 | + | ||
1326 | + | ||
1301 | 1327 | ||
1302 | 1328 | ||
1303 | .teacherVideo { | 1329 | .teacherVideo { |
@@ -1336,6 +1362,19 @@ height: 1080px; | @@ -1336,6 +1362,19 @@ height: 1080px; | ||
1336 | width: 100%; | 1362 | width: 100%; |
1337 | } | 1363 | } |
1338 | 1364 | ||
1365 | +.curUserName{ | ||
1366 | + position: absolute; | ||
1367 | + left: 47px; | ||
1368 | + bottom: 5px; | ||
1369 | + width: auto; | ||
1370 | + height: 16px; | ||
1371 | + color: #333333; | ||
1372 | + font-size: 15px; | ||
1373 | + | ||
1374 | +} | ||
1375 | + | ||
1376 | + | ||
1377 | + | ||
1339 | .teacherVideo-video{ | 1378 | .teacherVideo-video{ |
1340 | position: absolute; | 1379 | position: absolute; |
1341 | left: 3px; | 1380 | left: 3px; |
@@ -1362,6 +1401,17 @@ height: 1080px; | @@ -1362,6 +1401,17 @@ height: 1080px; | ||
1362 | background: url("../images/hangupHover.gif") no-repeat center center; | 1401 | background: url("../images/hangupHover.gif") no-repeat center center; |
1363 | } | 1402 | } |
1364 | 1403 | ||
1404 | +.teacherVideo-videoNotClick{ | ||
1405 | + display: none; | ||
1406 | + position: absolute; | ||
1407 | + left: 3px; | ||
1408 | + bottom: -5px; | ||
1409 | + color: #999; | ||
1410 | + margin: 0px 5px 0px 5px; | ||
1411 | + | ||
1412 | +} | ||
1413 | + | ||
1414 | + | ||
1365 | 1415 | ||
1366 | .teacherVideo-voice{ | 1416 | .teacherVideo-voice{ |
1367 | position: absolute; | 1417 | position: absolute; |
@@ -1391,7 +1441,18 @@ height: 1080px; | @@ -1391,7 +1441,18 @@ height: 1080px; | ||
1391 | .teacherVideo-voiceBg:hover{ | 1441 | .teacherVideo-voiceBg:hover{ |
1392 | background: url("../images/hangupHover.gif") no-repeat center center; | 1442 | background: url("../images/hangupHover.gif") no-repeat center center; |
1393 | } | 1443 | } |
1444 | +.teacherVideo-voiceNotClick{ | ||
1445 | + display: none; | ||
1446 | + position: absolute; | ||
1447 | + left:23px; | ||
1448 | + bottom: 4px; | ||
1449 | + width: 16px; | ||
1450 | + height: 16px; | ||
1451 | + font-size: 16px; | ||
1452 | + color: #999; | ||
1453 | + margin: 0px 5px 0px 5px; | ||
1394 | 1454 | ||
1455 | +} | ||
1395 | 1456 | ||
1396 | 1457 | ||
1397 | 1458 |
@@ -16,8 +16,8 @@ | @@ -16,8 +16,8 @@ | ||
16 | <script type="text/javascript" src="js/xdyEvent.js"></script> | 16 | <script type="text/javascript" src="js/xdyEvent.js"></script> |
17 | <script type="text/javascript" src="js/drag.js"></script> | 17 | <script type="text/javascript" src="js/drag.js"></script> |
18 | 18 | ||
19 | - <!--<script type="text/javascript" src="js/McuClient.js?v=1.0.0303.10"></script>--> | ||
20 | - <script type="text/javascript" src="http://192.168.1.140/McuClient/McuClient.js?722898936"></script> | 19 | + <script type="text/javascript" src="js/McuClient.js?v=1.0.0303.10"></script> |
20 | + <!--<script type="text/javascript" src="http://192.168.1.140/McuClient/McuClient.js?722898936"></script>--> | ||
21 | <script type="text/javascript" src="js/jquery-1.11.3.min.js"></script> | 21 | <script type="text/javascript" src="js/jquery-1.11.3.min.js"></script> |
22 | 22 | ||
23 | <script type="text/javascript" src="src/main.js"></script> | 23 | <script type="text/javascript" src="src/main.js"></script> |
@@ -173,7 +173,6 @@ | @@ -173,7 +173,6 @@ | ||
173 | <li><span id="am-dropdown-content-span-1" class="am-dropdown-content-span iconfont"></span> | 173 | <li><span id="am-dropdown-content-span-1" class="am-dropdown-content-span iconfont"></span> |
174 | <button id="classes-status-1" type="button" | 174 | <button id="classes-status-1" type="button" |
175 | class="am-btn am-btn-primary am-dropdown-content-button" | 175 | class="am-btn am-btn-primary am-dropdown-content-button" |
176 | - data-am-modal="{target: '#begin-classes', closeViaDimmer: 0, width: 340, height: 172}" | ||
177 | href="#">开始上课 | 176 | href="#">开始上课 |
178 | </button> | 177 | </button> |
179 | </li> | 178 | </li> |
@@ -190,19 +189,6 @@ | @@ -190,19 +189,6 @@ | ||
190 | </ul> | 189 | </ul> |
191 | </div> | 190 | </div> |
192 | 191 | ||
193 | - <!--弹出层-正在上课--> | ||
194 | - <div class="am-modal am-modal-no-btn" tabindex="-1" id="begin-classes"> | ||
195 | - <div class="am-modal-dialog"> | ||
196 | - | ||
197 | - <p id="p-text" class="p-text">确定开始录制吗?</p> | ||
198 | - | ||
199 | - <div class="am-modal-confirm-cancel"> | ||
200 | - <button id="confirm" class="confirm" data-am-modal-close>确定</button> | ||
201 | - <button class="cancel" data-am-modal-close>取消</button> | ||
202 | - </div> | ||
203 | - | ||
204 | - </div> | ||
205 | - </div> | ||
206 | 192 | ||
207 | <!--弹出层-结束课堂--> | 193 | <!--弹出层-结束课堂--> |
208 | <div class="am-modal am-modal-no-btn" tabindex="-1" id="end-classes"> | 194 | <div class="am-modal am-modal-no-btn" tabindex="-1" id="end-classes"> |
@@ -388,10 +374,15 @@ | @@ -388,10 +374,15 @@ | ||
388 | <div id="stuPlay"></div> | 374 | <div id="stuPlay"></div> |
389 | </div> | 375 | </div> |
390 | <img class="stuVideoBg"/> | 376 | <img class="stuVideoBg"/> |
391 | - <div id="stuVideo-video" class="stuVideo-video iconfont"></div> | 377 | + <div id="stuVideo-video" class="stuVideo-video iconfont" title="发起学生视频"></div> |
392 | <div id="stuVideo-videoBg" class="stuVideo-videoBg iconfont"></div> | 378 | <div id="stuVideo-videoBg" class="stuVideo-videoBg iconfont"></div> |
393 | - <div id="stuVideo-voice" class="stuVideo-voice iconfont"></div> | 379 | + <div id="stuVideo-videoNotClick" class="stuVideo-videoNotClick iconfont" title="当前不能点击"></div> |
380 | + | ||
381 | + | ||
382 | + <div id="stuVideo-voice" class="stuVideo-voice iconfont" title="发起学生音频"></div> | ||
394 | <div id="stuVideo-voiceBg" class="stuVideo-voiceBg iconfont"></div> | 383 | <div id="stuVideo-voiceBg" class="stuVideo-voiceBg iconfont"></div> |
384 | + <div id="stuVideo-voiceNotClick" class="stuVideo-voiceNotClick iconfont" title="当前不能点击"></div> | ||
385 | + | ||
395 | <!--<span>lucy</span>--> | 386 | <!--<span>lucy</span>--> |
396 | </div> | 387 | </div> |
397 | <div class="teacherVideo"> | 388 | <div class="teacherVideo"> |
@@ -403,10 +394,14 @@ | @@ -403,10 +394,14 @@ | ||
403 | </div> | 394 | </div> |
404 | <img class="teacherVideoBg"/> | 395 | <img class="teacherVideoBg"/> |
405 | <img class="teacherVoicing"/> | 396 | <img class="teacherVoicing"/> |
406 | - <div id="teacherVideo-video" class="teacherVideo-video iconfont"></div> | 397 | + <div class="curUserName"></div> |
398 | + <div id="teacherVideo-video" class="teacherVideo-video iconfont" title="发起视频"></div> | ||
407 | <div id="teacherVideo-videoBg" class="teacherVideo-videoBg iconfont"></div> | 399 | <div id="teacherVideo-videoBg" class="teacherVideo-videoBg iconfont"></div> |
408 | - <div id="teacherVideo-voice" class="teacherVideo-voice iconfont"></div> | 400 | + <div id="teacherVideo-videoNotClick" class="teacherVideo-videoNotClick iconfont" title="当前不能点击"></div> |
401 | + | ||
402 | + <div id="teacherVideo-voice" class="teacherVideo-voice iconfont" title="发起音频"></div> | ||
409 | <div id="teacherVideo-voiceBg" class="teacherVideo-voiceBg iconfont"></div> | 403 | <div id="teacherVideo-voiceBg" class="teacherVideo-voiceBg iconfont"></div> |
404 | + <div id="teacherVideo-voiceNotClick" class="teacherVideo-voiceNotClick iconfont" title="当前不能点击"></div> | ||
410 | 405 | ||
411 | </div> | 406 | </div> |
412 | 407 | ||
@@ -842,54 +837,54 @@ | @@ -842,54 +837,54 @@ | ||
842 | var classesStatus2 = document.getElementById('classes-status-2'); | 837 | var classesStatus2 = document.getElementById('classes-status-2'); |
843 | 838 | ||
844 | var amDrospanIcon = document.getElementById('am-dropdown-content-span-1'); | 839 | var amDrospanIcon = document.getElementById('am-dropdown-content-span-1'); |
845 | - confirm.onclick = function changeStatus() { | ||
846 | - if (flag == '0') { | ||
847 | - flag++; | ||
848 | - console.log(flag); | ||
849 | - spaniconfont.innerHTML = ''; | ||
850 | - classnow.innerHTML = '直播中'; | ||
851 | - aStatus.innerHTML = '直播中'; | ||
852 | - aStatus.style.color = '#d95136'; | ||
853 | - ptext.innerHTML = '确定暂停录制吗' | ||
854 | - noStart.style.display = 'none'; | ||
855 | - oLive.style.display = 'block'; | ||
856 | - amDrospanIcon.innerHTML = ""; | ||
857 | - classesStatus1.innerHTML = '课间休息'; | ||
858 | - console.log(classesStatus1.innerHTML); | ||
859 | - classesStatus2.innerHTML = '结束课堂'; | ||
860 | - console.log(classesStatus2.innerHTML); | ||
861 | - | ||
862 | - | ||
863 | - } | ||
864 | - else if (flag == '1') { | ||
865 | - console.log(flag); | ||
866 | - ptext.innerHTML = '确定继续上课吗' | ||
867 | - spaniconfont.innerHTML = ''; | ||
868 | - classnow.innerHTML = '休息'; | ||
869 | - aStatus.innerHTML = '休息'; | ||
870 | - aStatus.style.color = '#333333'; | ||
871 | - noStart.style.display = 'block'; | ||
872 | - oLive.style.display = 'none'; | ||
873 | - amDrospanIcon.innerHTML = ""; | ||
874 | - classesStatus1.innerHTML = '继续上课'; | ||
875 | - console.log(classesStatus1.innerHTML); | ||
876 | - classesStatus2.innerHTML = '结束课堂'; | ||
877 | - console.log(classesStatus2.innerHTML); | ||
878 | - flag--; | ||
879 | - } | ||
880 | - | ||
881 | - | ||
882 | - } | ||
883 | - end.onclick = function endStatus() { | ||
884 | - spaniconfont.innerHTML = ''; | ||
885 | - classnow.innerHTML = '结束'; | ||
886 | - aStatus.innerHTML = '结束'; | ||
887 | - oLive.style.display = 'none'; | ||
888 | - spaniconfont.innerHTML = ''; | ||
889 | - noStart.innerHTML = ""; | ||
890 | - noStart.style.display = 'block'; | ||
891 | - aStatus.style.color = '#333333'; | ||
892 | - } | 840 | +// confirm.onclick = function changeStatus() { |
841 | +// if (flag == '0') { | ||
842 | +// flag++; | ||
843 | +// console.log(flag); | ||
844 | +// spaniconfont.innerHTML = ''; | ||
845 | +// classnow.innerHTML = '直播中'; | ||
846 | +// aStatus.innerHTML = '直播中'; | ||
847 | +// aStatus.style.color = '#d95136'; | ||
848 | +// ptext.innerHTML = '确定暂停录制吗' | ||
849 | +// noStart.style.display = 'none'; | ||
850 | +// oLive.style.display = 'block'; | ||
851 | +// amDrospanIcon.innerHTML = ""; | ||
852 | +// classesStatus1.innerHTML = '课间休息'; | ||
853 | +// console.log(classesStatus1.innerHTML); | ||
854 | +// classesStatus2.innerHTML = '结束课堂'; | ||
855 | +// console.log(classesStatus2.innerHTML); | ||
856 | +// | ||
857 | +// | ||
858 | +// } | ||
859 | +// else if (flag == '1') { | ||
860 | +// console.log(flag); | ||
861 | +// ptext.innerHTML = '确定继续上课吗' | ||
862 | +// spaniconfont.innerHTML = ''; | ||
863 | +// classnow.innerHTML = '休息'; | ||
864 | +// aStatus.innerHTML = '休息'; | ||
865 | +// aStatus.style.color = '#333333'; | ||
866 | +// noStart.style.display = 'block'; | ||
867 | +// oLive.style.display = 'none'; | ||
868 | +// amDrospanIcon.innerHTML = ""; | ||
869 | +// classesStatus1.innerHTML = '继续上课'; | ||
870 | +// console.log(classesStatus1.innerHTML); | ||
871 | +// classesStatus2.innerHTML = '结束课堂'; | ||
872 | +// console.log(classesStatus2.innerHTML); | ||
873 | +// flag--; | ||
874 | +// } | ||
875 | +// | ||
876 | +// | ||
877 | +// } | ||
878 | +// end.onclick = function endStatus() { | ||
879 | +// spaniconfont.innerHTML = ''; | ||
880 | +// classnow.innerHTML = '结束'; | ||
881 | +// aStatus.innerHTML = '结束'; | ||
882 | +// oLive.style.display = 'none'; | ||
883 | +// spaniconfont.innerHTML = ''; | ||
884 | +// noStart.innerHTML = ""; | ||
885 | +// noStart.style.display = 'block'; | ||
886 | +// aStatus.style.color = '#333333'; | ||
887 | +// } | ||
893 | 888 | ||
894 | 889 | ||
895 | </script> | 890 | </script> |
@@ -78,11 +78,14 @@ function listenClass() { | @@ -78,11 +78,14 @@ function listenClass() { | ||
78 | 78 | ||
79 | // // //点击开始上课 | 79 | // // //点击开始上课 |
80 | // | 80 | // |
81 | + // $("#classes-status-1").click(function (e){ | ||
82 | + // | ||
81 | // if($("#classes-status-1").html()=="开始上课"){ | 83 | // if($("#classes-status-1").html()=="开始上课"){ |
82 | - // $("#classes-status-1").click(function (e){ | ||
83 | - // client.sendStartClass(); | ||
84 | - // }); | 84 | + // client.sendStartClass(); |
85 | // } | 85 | // } |
86 | + // | ||
87 | + // }); | ||
88 | + | ||
86 | // if($("#classes-status-1").html()=="课间休息"){ | 89 | // if($("#classes-status-1").html()=="课间休息"){ |
87 | // $("#classes-status-1").click(function (e){ | 90 | // $("#classes-status-1").click(function (e){ |
88 | // client.sendPauseClass(); | 91 | // client.sendPauseClass(); |
@@ -42,6 +42,8 @@ $(function () { | @@ -42,6 +42,8 @@ $(function () { | ||
42 | //学生视频按钮点击 | 42 | //学生视频按钮点击 |
43 | $("#stuVideo-video").click(function (e) { | 43 | $("#stuVideo-video").click(function (e) { |
44 | console.log("stuVideo-video点击"); | 44 | console.log("stuVideo-video点击"); |
45 | + $(".stuVideo-voiceNotClick").css("display","block"); | ||
46 | + $(".stuVideo-voice").css("display","none"); | ||
45 | 47 | ||
46 | if (classAllInfo.userRole=="host"){ | 48 | if (classAllInfo.userRole=="host"){ |
47 | $(".stuVideoBg").css("display","none"); | 49 | $(".stuVideoBg").css("display","none"); |
@@ -63,6 +65,8 @@ $(function () { | @@ -63,6 +65,8 @@ $(function () { | ||
63 | 65 | ||
64 | //学生视频关闭按钮点击 | 66 | //学生视频关闭按钮点击 |
65 | $("#stuVideo-videoBg").click(function (e) { | 67 | $("#stuVideo-videoBg").click(function (e) { |
68 | + $(".stuVideo-voiceNotClick").css("display","none"); | ||
69 | + $(".stuVideo-voice").css("display","block"); | ||
66 | 70 | ||
67 | var paramInfo={ | 71 | var paramInfo={ |
68 | "actionType":2, | 72 | "actionType":2, |
@@ -80,8 +84,9 @@ $(function () { | @@ -80,8 +84,9 @@ $(function () { | ||
80 | 84 | ||
81 | //学生音频按钮点击 | 85 | //学生音频按钮点击 |
82 | $("#stuVideo-voice").click(function (e) { | 86 | $("#stuVideo-voice").click(function (e) { |
83 | - | ||
84 | console.log("stuVideo-voice点击"); | 87 | console.log("stuVideo-voice点击"); |
88 | + $(".stuVideo-videoNotClick").css("display","block"); | ||
89 | + $(".stuVideo-video").css("display","none"); | ||
85 | 90 | ||
86 | if (classAllInfo.userRole=="host"){ | 91 | if (classAllInfo.userRole=="host"){ |
87 | $(".stuVideoBg").css("display","none"); | 92 | $(".stuVideoBg").css("display","none"); |
@@ -107,6 +112,8 @@ $(function () { | @@ -107,6 +112,8 @@ $(function () { | ||
107 | }); | 112 | }); |
108 | //学生音频关闭按钮点击 | 113 | //学生音频关闭按钮点击 |
109 | $("#stuVideo-voiceBg").click(function(e){ | 114 | $("#stuVideo-voiceBg").click(function(e){ |
115 | + $(".stuVideo-videoNotClick").css("display","none"); | ||
116 | + $(".stuVideo-video").css("display","block"); | ||
110 | var paramInfo={ | 117 | var paramInfo={ |
111 | "actionType":2, | 118 | "actionType":2, |
112 | "toNodeId":stuNodeId, | 119 | "toNodeId":stuNodeId, |
@@ -118,24 +125,14 @@ $(function () { | @@ -118,24 +125,14 @@ $(function () { | ||
118 | $("#stuVideo-voiceBg").css("display","none"); | 125 | $("#stuVideo-voiceBg").css("display","none"); |
119 | } | 126 | } |
120 | 127 | ||
121 | - // if (classAllInfo.userRole=="normal"){ | ||
122 | - // $(".stuVideo-voice").css("display","none"); | ||
123 | - // $(".stuVideo-video").css("display","none"); | ||
124 | - // } | ||
125 | - | ||
126 | }); | 128 | }); |
127 | 129 | ||
128 | 130 | ||
129 | //老师视频按钮点击 | 131 | //老师视频按钮点击 |
130 | $("#teacherVideo-video").click(function (e) { | 132 | $("#teacherVideo-video").click(function (e) { |
131 | console.log("teacherVideo-video点击"); | 133 | console.log("teacherVideo-video点击"); |
132 | - $(".teacherVideo-voice").css("color","#cccccc"); | ||
133 | - // $(".teacherVideo-voice").unbind("click");//音频按钮不可点 | ||
134 | - | ||
135 | - // var teaVoiceDisplay= $(".teacherVideo-voiceBg").css("display"); | ||
136 | - // if(teaVoiceDisplay=="block"){ | ||
137 | - // $("#teacherVideo-voiceBg").trigger("click"); | ||
138 | - // } | 134 | + $(".teacherVideo-voice").css("display","none"); |
135 | + $(".teacherVideo-voiceNotClick").css("display","block"); | ||
139 | if (classAllInfo.userRole=="host"){ | 136 | if (classAllInfo.userRole=="host"){ |
140 | $(".teacherVideo-videoBg").css("display","block"); | 137 | $(".teacherVideo-videoBg").css("display","block"); |
141 | $(".teacherVideo-video").css("display","none"); | 138 | $(".teacherVideo-video").css("display","none"); |
@@ -143,7 +140,6 @@ $(function () { | @@ -143,7 +140,6 @@ $(function () { | ||
143 | $("#teacherVideo-voice").addClass("teacherVideo-voice"); | 140 | $("#teacherVideo-voice").addClass("teacherVideo-voice"); |
144 | $("#teacherVideo-voice").removeClass("teacherVideo-voiceBg"); | 141 | $("#teacherVideo-voice").removeClass("teacherVideo-voiceBg"); |
145 | $(".teacherVideoBg").css("display","none"); | 142 | $(".teacherVideoBg").css("display","none"); |
146 | - // $(".teacherVideo").css("background", "#CCCCCC"); | ||
147 | $(".teacherVideo-voice").css("bottom","4px"); | 143 | $(".teacherVideo-voice").css("bottom","4px"); |
148 | $(".teacherVoicing").css("display","none"); | 144 | $(".teacherVoicing").css("display","none"); |
149 | 145 | ||
@@ -156,7 +152,8 @@ $(function () { | @@ -156,7 +152,8 @@ $(function () { | ||
156 | //老师视频关闭按钮点击 | 152 | //老师视频关闭按钮点击 |
157 | $("#teacherVideo-videoBg").click(function (e) { | 153 | $("#teacherVideo-videoBg").click(function (e) { |
158 | 154 | ||
159 | - $(".teacherVideo-voice").css("color","#333333"); | 155 | + $(".teacherVideo-voice").css("display","block"); |
156 | + $(".teacherVideo-voiceNotClick").css("display","none"); | ||
160 | if(window.publishflash) { | 157 | if(window.publishflash) { |
161 | const stopInfo = JSON.stringify({ | 158 | const stopInfo = JSON.stringify({ |
162 | type: 5, | 159 | type: 5, |
@@ -190,10 +187,8 @@ $(function () { | @@ -190,10 +187,8 @@ $(function () { | ||
190 | //老师音频按钮点击 | 187 | //老师音频按钮点击 |
191 | $("#teacherVideo-voice").click(function (e) { | 188 | $("#teacherVideo-voice").click(function (e) { |
192 | console.log("teacherVideo-voice点击"); | 189 | console.log("teacherVideo-voice点击"); |
193 | - // var teaVideoDisplay= $(".teacherVideo-videoBg").css("display"); | ||
194 | - // if(teaVideoDisplay=="block"){ | ||
195 | - // | ||
196 | - // } | 190 | + $(".teacherVideo-video").css("display","none"); |
191 | + $(".teacherVideo-videoNotClick").css("display","block"); | ||
197 | 192 | ||
198 | if (classAllInfo.userRole=="host"){ | 193 | if (classAllInfo.userRole=="host"){ |
199 | $(".publish").css({"width":"240px","height":"180px"}); | 194 | $(".publish").css({"width":"240px","height":"180px"}); |
@@ -203,6 +198,7 @@ $(function () { | @@ -203,6 +198,7 @@ $(function () { | ||
203 | $(".teacherVideoBg").css("display","none"); | 198 | $(".teacherVideoBg").css("display","none"); |
204 | } | 199 | } |
205 | 200 | ||
201 | + | ||
206 | // /获取老师只推音频地址 | 202 | // /获取老师只推音频地址 |
207 | achieveTeaAudioStream(); | 203 | achieveTeaAudioStream(); |
208 | 204 | ||
@@ -211,6 +207,8 @@ $(function () { | @@ -211,6 +207,8 @@ $(function () { | ||
211 | $("#teacherVideo-voiceBg").click(function (e) { | 207 | $("#teacherVideo-voiceBg").click(function (e) { |
212 | 208 | ||
213 | console.log("teacherVideo-voice点击"); | 209 | console.log("teacherVideo-voice点击"); |
210 | + $(".teacherVideo-video").css("display","block"); | ||
211 | + $(".teacherVideo-videoNotClick").css("display","none"); | ||
214 | 212 | ||
215 | if (classAllInfo.userRole=="host"){ | 213 | if (classAllInfo.userRole=="host"){ |
216 | $(".publish").css({"width":"1px","height":"1px"}); | 214 | $(".publish").css({"width":"1px","height":"1px"}); |
@@ -237,21 +235,6 @@ $(function () { | @@ -237,21 +235,6 @@ $(function () { | ||
237 | 235 | ||
238 | }); | 236 | }); |
239 | 237 | ||
240 | -//老师音频点击事件 | ||
241 | -function teaAudioClick(){ | ||
242 | - console.log("teacherVideo-voice点击"); | ||
243 | - | ||
244 | - if (classAllInfo.userRole=="host"){ | ||
245 | - $(".publish").css({"width":"240px","height":"180px"}); | ||
246 | - $(".play").css({"width":"1px","height":"1px"}); | ||
247 | - $("#teacherVideo-voice").css("display","none"); | ||
248 | - $("#teacherVideo-voiceBg").css("display","block"); | ||
249 | - $(".teacherVideoBg").css("display","none"); | ||
250 | - } | ||
251 | - | ||
252 | - // /获取老师只推音频地址 | ||
253 | - achieveTeaAudioStream(); | ||
254 | -} | ||
255 | 238 | ||
256 | 239 | ||
257 | //监听学生视频更新 | 240 | //监听学生视频更新 |
@@ -359,7 +342,7 @@ function userListUpdate(callbackData) { | @@ -359,7 +342,7 @@ function userListUpdate(callbackData) { | ||
359 | 342 | ||
360 | console.log("人员进入",callbackData); | 343 | console.log("人员进入",callbackData); |
361 | if (classAllInfo.nodeId==callbackData.nodeId){ | 344 | if (classAllInfo.nodeId==callbackData.nodeId){ |
362 | - | 345 | + $(".curUserName").html(callbackData.nodeData.name); |
363 | }else{ | 346 | }else{ |
364 | console.log("callbackData.nodeId================>",callbackData.nodeId) | 347 | console.log("callbackData.nodeId================>",callbackData.nodeId) |
365 | stuNodeId=callbackData.nodeId; | 348 | stuNodeId=callbackData.nodeId; |
@@ -786,7 +769,7 @@ function achieveTeaAudioStream() { | @@ -786,7 +769,7 @@ function achieveTeaAudioStream() { | ||
786 | console.log(' [publish] native 2 js', msg); | 769 | console.log(' [publish] native 2 js', msg); |
787 | var _msg=JSON.parse(msg); | 770 | var _msg=JSON.parse(msg); |
788 | console.log("_msg===========>",_msg); | 771 | console.log("_msg===========>",_msg); |
789 | - if(_msg.data.result == 0){ | 772 | + if((_msg.data.result == 0)&&(_msg.data.type == 10)){ |
790 | //将之前底层取的推流结果传递给底层 | 773 | //将之前底层取的推流结果传递给底层 |
791 | var _successErrorResult= client.publishAudio(pushTeaAudioResult); | 774 | var _successErrorResult= client.publishAudio(pushTeaAudioResult); |
792 | console.log("_successErrorResult======>",_successErrorResult) | 775 | console.log("_successErrorResult======>",_successErrorResult) |
@@ -797,7 +780,11 @@ function achieveTeaAudioStream() { | @@ -797,7 +780,11 @@ function achieveTeaAudioStream() { | ||
797 | console.log("底层广播推流失败,关闭推流"); | 780 | console.log("底层广播推流失败,关闭推流"); |
798 | } | 781 | } |
799 | 782 | ||
800 | - }else { | 783 | + } else if((_msg.data.result == 0)&&(_msg.data.type == 5)){ |
784 | + console.log("5,flash把推老师音频流关闭"); | ||
785 | + | ||
786 | + } | ||
787 | + else { | ||
801 | console.error('publish error'); | 788 | console.error('publish error'); |
802 | } | 789 | } |
803 | } | 790 | } |
@@ -814,7 +801,7 @@ function achieveTeaAudioStream() { | @@ -814,7 +801,7 @@ function achieveTeaAudioStream() { | ||
814 | 801 | ||
815 | 802 | ||
816 | } | 803 | } |
817 | -//推老师音频 js2native | 804 | + //推老师音频 js2native |
818 | function publishTeaAudioURL(rtmpURL) { | 805 | function publishTeaAudioURL(rtmpURL) { |
819 | const msg = JSON.stringify({ | 806 | const msg = JSON.stringify({ |
820 | type: 10, | 807 | type: 10, |
@@ -828,7 +815,7 @@ function publishTeaAudioURL(rtmpURL) { | @@ -828,7 +815,7 @@ function publishTeaAudioURL(rtmpURL) { | ||
828 | console.log(publishflashAudio._js2native(msg)); | 815 | console.log(publishflashAudio._js2native(msg)); |
829 | } | 816 | } |
830 | 817 | ||
831 | - //获取老师推流音视频地址 | 818 | + //获取老师推音视频流地址 |
832 | function achieveTeaVideoStream(){ | 819 | function achieveTeaVideoStream(){ |
833 | $(".publish").css({"width":"240px","height":"180px"}); | 820 | $(".publish").css({"width":"240px","height":"180px"}); |
834 | $(".play").css({"width":"1px","height":"1px"}); | 821 | $(".play").css({"width":"1px","height":"1px"}); |
@@ -858,7 +845,8 @@ function achieveTeaVideoStream(){ | @@ -858,7 +845,8 @@ function achieveTeaVideoStream(){ | ||
858 | console.log(' [publish] native 2 js', msg); | 845 | console.log(' [publish] native 2 js', msg); |
859 | var _msg=JSON.parse(msg); | 846 | var _msg=JSON.parse(msg); |
860 | console.log("_msg===========>",_msg); | 847 | console.log("_msg===========>",_msg); |
861 | - if(_msg.data.result == 0){ | 848 | + |
849 | + if((_msg.data.result == 0)&&(_msg.data.type == 10)){ | ||
862 | //将之前底层取的推流结果传递给底层 | 850 | //将之前底层取的推流结果传递给底层 |
863 | console.log("之前的推流结果",pushTeaResult); | 851 | console.log("之前的推流结果",pushTeaResult); |
864 | var _successErrorResult= client.publishVideo(pushTeaResult); | 852 | var _successErrorResult= client.publishVideo(pushTeaResult); |
@@ -869,7 +857,11 @@ function achieveTeaVideoStream(){ | @@ -869,7 +857,11 @@ function achieveTeaVideoStream(){ | ||
869 | console.log("底层广播推流失败,关闭推流"); | 857 | console.log("底层广播推流失败,关闭推流"); |
870 | } | 858 | } |
871 | 859 | ||
872 | - }else { | 860 | + } |
861 | + else if ((_msg.data.result == 0)&&(_msg.data.type == 5)){ | ||
862 | + console.log("5,flash把老师的推音视频流关闭"); | ||
863 | + } | ||
864 | + else { | ||
873 | console.error('publish error'); | 865 | console.error('publish error'); |
874 | } | 866 | } |
875 | } | 867 | } |
@@ -901,7 +893,7 @@ function publishURL(rtmpURL) { | @@ -901,7 +893,7 @@ function publishURL(rtmpURL) { | ||
901 | 893 | ||
902 | 894 | ||
903 | 895 | ||
904 | - //获取播放音频地址 | 896 | + //获取老师播放音频流地址 |
905 | function achievePlayAudioStream(_pubResultObj){ | 897 | function achievePlayAudioStream(_pubResultObj){ |
906 | 898 | ||
907 | console.log("_pubResultObj==========>",_pubResultObj) | 899 | console.log("_pubResultObj==========>",_pubResultObj) |
@@ -916,6 +908,7 @@ function achievePlayAudioStream(_pubResultObj){ | @@ -916,6 +908,7 @@ function achievePlayAudioStream(_pubResultObj){ | ||
916 | var streamInfo=client.getAudioPlayPath(_paramInfo); | 908 | var streamInfo=client.getAudioPlayPath(_paramInfo); |
917 | console.log("result是=============>",streamInfo); | 909 | console.log("result是=============>",streamInfo); |
918 | $(".play").css({"width":"240px","height":"180px"}); | 910 | $(".play").css({"width":"240px","height":"180px"}); |
911 | + $(".publish").css({"width":"1px","height":"1px"}); | ||
919 | $(".teacherVideoBg").css("display","none"); | 912 | $(".teacherVideoBg").css("display","none"); |
920 | 913 | ||
921 | 914 | ||
@@ -937,15 +930,25 @@ function achievePlayAudioStream(_pubResultObj){ | @@ -937,15 +930,25 @@ function achievePlayAudioStream(_pubResultObj){ | ||
937 | playAudioURL(streamInfo.playUrl); | 930 | playAudioURL(streamInfo.playUrl); |
938 | }, | 931 | }, |
939 | function (msg) { | 932 | function (msg) { |
940 | - console.log(' [play] native 2 js', msg); | 933 | + console.log(' [playAudio] native 2 js', msg); |
934 | + var _msg=JSON.parse(msg); | ||
935 | + console.log("playAudio_msg===========>",_msg); | ||
936 | + if((_msg.data.result == 0)&&(_msg.data.type == 2)){ | ||
937 | + console.log("2,老师播音频流"); | ||
938 | + | ||
939 | + } | ||
940 | + else if ((_msg.data.result == 0)&&(_msg.data.type == 5)){ | ||
941 | + console.log("5,flash把老师的播音频流关闭"); | ||
942 | + } | ||
943 | + else { | ||
944 | + console.error('playAudio error'); | ||
945 | + } | ||
941 | } | 946 | } |
942 | ) | 947 | ) |
943 | } | 948 | } |
944 | else { | 949 | else { |
945 | playAudioURL(streamInfo.playUrl); | 950 | playAudioURL(streamInfo.playUrl); |
946 | } | 951 | } |
947 | - | ||
948 | - | ||
949 | } | 952 | } |
950 | 953 | ||
951 | function playAudioURL(rtmpURL){ | 954 | function playAudioURL(rtmpURL){ |
@@ -960,7 +963,7 @@ function playAudioURL(rtmpURL){ | @@ -960,7 +963,7 @@ function playAudioURL(rtmpURL){ | ||
960 | console.log(playflashAudio._js2native(msg)); | 963 | console.log(playflashAudio._js2native(msg)); |
961 | } | 964 | } |
962 | 965 | ||
963 | - //获取老师音视频播流地址 | 966 | + //获取老师播音视频流地址 |
964 | function achievePlayStream(_pubResultObj){ | 967 | function achievePlayStream(_pubResultObj){ |
965 | console.log("_pubResultObj==========>",_pubResultObj) | 968 | console.log("_pubResultObj==========>",_pubResultObj) |
966 | var _paramInfo={ | 969 | var _paramInfo={ |
@@ -974,6 +977,7 @@ function playAudioURL(rtmpURL){ | @@ -974,6 +977,7 @@ function playAudioURL(rtmpURL){ | ||
974 | var streamInfo=client.getVideoPlayPath(_paramInfo); | 977 | var streamInfo=client.getVideoPlayPath(_paramInfo); |
975 | console.log("result是=============>",streamInfo); | 978 | console.log("result是=============>",streamInfo); |
976 | $(".play").css({"width":"240px","height":"180px"}); | 979 | $(".play").css({"width":"240px","height":"180px"}); |
980 | + $(".publish").css({"width":"1px","height":"1px"}); | ||
977 | $(".teacherVideoBg").css("display","none"); | 981 | $(".teacherVideoBg").css("display","none"); |
978 | $(".teacherVideo-voice").css("bottom","4px"); | 982 | $(".teacherVideo-voice").css("bottom","4px"); |
979 | 983 | ||
@@ -993,6 +997,20 @@ function playAudioURL(rtmpURL){ | @@ -993,6 +997,20 @@ function playAudioURL(rtmpURL){ | ||
993 | }, | 997 | }, |
994 | function (msg) { | 998 | function (msg) { |
995 | console.log(' [play] native 2 js', msg); | 999 | console.log(' [play] native 2 js', msg); |
1000 | + var _msg=JSON.parse(msg); | ||
1001 | + console.log("play_msg===========>",_msg); | ||
1002 | + if((_msg.data.result == 0)&&(_msg.data.type == 2)){ | ||
1003 | + console.log("老师播流成功"); | ||
1004 | + | ||
1005 | + } | ||
1006 | + else if ((_msg.data.result == 0)&&(_msg.data.type == 5)){ | ||
1007 | + console.log("5,flash把老师的播音视频流关闭"); | ||
1008 | + } | ||
1009 | + else { | ||
1010 | + console.error('play error'); | ||
1011 | + } | ||
1012 | + | ||
1013 | + | ||
996 | } | 1014 | } |
997 | ) | 1015 | ) |
998 | } | 1016 | } |
-
请 注册 或 登录 后发表评论