-
Notifications
You must be signed in to change notification settings - Fork 0
/
TestVideo.html
439 lines (399 loc) · 17.4 KB
/
TestVideo.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
<!DOCTYPE html>
<!-- saved from url=(0055)https://yxdh.github.io/jscapture/pluginO/videoConf.html -->
<html lang="en"><head width="920" height="600"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="msapplication-tap-highlight" content="no">
<title>正在视频通话</title>
<link rel="stylesheet" type="text/css" href="./TestVideo_files/reset.css"> <!--通用-->
<link rel="stylesheet" type="text/css" href="./TestVideo_files/common.css"> <!--通用-->
<link rel="stylesheet" type="text/css" href="./TestVideo_files/video.css"> <!--视频-->
<link rel="stylesheet" type="text/css" href="./TestVideo_files/powerange.css"> <!--音量-->
<script type="text/javascript" src="./TestVideo_files/jQuery-2.1.4.min.js"></script>
<script type="text/javascript" src="./TestVideo_files/iscroll-5.1.3.min.js"></script> <!--滚动条-->
<script type="text/javascript" src="./TestVideo_files/powerange.min.js"></script> <!--音量-->
<script type="text/javascript" src="./TestVideo_files/application.js"></script>
<script>
//左侧视频的高度:宽/高=1.333333
function autoHeight() {
var h100 = $(".vdo_l").height(); //100%
var h = h100 / 4 - 1; //25%-1px,获取单个视频的高度
var w = h * 1.33333; //视频的宽度
$(".vdo_lD").css({width:w,height:h}); //左侧视频的宽 高
$(".vdo_r").css({left:w+1}); //右侧视频定位左侧距离
}
var imgData = null;
$(function(){
autoHeight();
$(window).resize(autoHeight);
var parm = {"userUniId":"[email protected]"};
try {
window.lxpc.exebusinessaction('extend', 'InitFinished', '0', JSON.stringify(parm), 0, function (status, jsondata, targ) {
if (status == 0) {
} else {
console.log(status)
}
})
} catch (e) {
e.message
}
TitleTools();
try {
window.URL = window.URL || window.webkitURL;
navigator.getUserMedia = navigator.webkitGetUserMedia || navigator.getUserMedia;
var parm = {"userUniId":"[email protected]"};
window.lxpc.exebusinessaction('VideoConf', 'GetVideoImg', 'PROCEXPL', JSON.stringify(parm), 0, function (status, result, targ) {
if (status == 0) {
console.log('=======================' + result + '==')
navigator.getUserMedia({
audio: false,
video: {
mandatory: {
chromeMediaSource: 'desktop',
chromeMediaSourceId: 'window:' + result + ':0',
minWidth: 400,
minHeight: 300,
maxWidth: 4000,
maxHeight: 3000
},
optional: []
}
}, function(stream) {
document.getElementById('videoSnapDiv1').innerHTML = '<video id="videoSnap1" class="vdo_l_video" autoplay/>';
document.getElementById('videoSnap1').onload = function(e) {
window.URL.revokeObjectURL(document.getElementById('videoSnap1').src); // 清除释放
};
document.getElementById('videoSnap1').src = window.URL.createObjectURL(stream);
document.getElementById('videoDiv').innerHTML = '<video id="video" autoplay/>';
document.getElementById('video').onload = function(e) {
window.URL.revokeObjectURL(document.getElementById('video').src); // 清除释放
};
document.getElementById('video').src = window.URL.createObjectURL(stream);
}, function() {
console.log('Error, Screen stream is not available.')
})
} else {
console.log(status)
}
})
} catch (e) {
console.log(e.message)
}
})
$(function(){
//右侧成员列表 显示/隐藏
$(".vdo_btn_member").click(function(){
var opacity =$('.vdo_rList').css('opacity');
if(opacity == '0'){
$(".vdo_rList").css({opacity:"1",right: "0"})
$(this).addClass("on");
}else{
$(".vdo_rList").css({opacity:"0",right: "-246px"})
$(this).removeClass("on");
}
})
//主持人-右侧参会人员tab切换
$(".vdo_rL_tTab a").each(function(index){
$(this).click(function(){
//右侧 默认(背景图标)
$(".vdo_rL_tCon").addClass("disN")
$(".vdo_rL_tCon:eq("+index+")").removeClass("disN")
$(".vdo_rL_tTab a").removeClass("on")
$(this).addClass("on")
})
})
//主持人-点击右侧按钮
//麦克风
$(".vdo_rL_aMute").click(function () {
if($(this).is('.on')){
$(this).removeClass('on');
$(this).attr("title","点击禁言");
}else{
$(this).addClass('on');
$(this).attr("title","恢复通话");
}
})
//摄像头
$(".vdo_rL_aVideo").click(function () {
if($(this).is('.on')){
$(this).removeClass('on');
$(this).attr("title","关闭视频");
}else{
$(this).addClass('on');
$(this).attr("title","打开视频");
}
})
//底部图标
//麦克风
$(".vdo_btn_mic").click(function () {
if($(this).is('.on')){
$(this).removeClass('on');
$(this).attr("title","关闭麦克风");
}else{
$(this).addClass('on');
$(this).attr("title","恢复麦克风");
}
})
//摄像头
$(".vdo_btn_camera").click(function () {
if($(this).is('.on')){
$(this).removeClass('on');
$(this).attr("title","关闭摄像头");
}else{
$(this).addClass('on');
$(this).attr("title","恢复摄像头");
}
})
//静音/免提
$(".vdo_btn_mute").click(function () {
if($(this).is('.on')){
$(this).removeClass('on');
$(this).attr("title","点击静音");
}else{
$(this).addClass('on');
$(this).attr("title","恢复扬声器");
}
})
})
//退出
$(function(){
$(".vdo_btn_quit").click(function(){
$(this).parents(".vdo_main").remove();
try {
window.lxpc.closewnd();
}
catch (e) {
console.log(e.message)
}
})
})
//设置
$(function(){
$(".vdo_btn_set").click(function(){
$(".vdo_set").show();
})
$(".vdo_set_close").click(function(){
$(this).parents(".vdo_set").remove();
})
})
//虚拟下拉列表-"麦克风选择"
$(function(){
document.onclick = function(){
$(".vdo_drop_ModifyThe").removeClass("vdo_drop_aB")
$(".vdo_drop_list").hide();
};
selectEvent(".vdo_drop_M1",true);
selectEvent(".vdo_drop_l1",false);
ui_select_load(".vdo_drop_l1 li",".vdo_drop_M1 span");
})
function ui_select_load(Obj,Obj1){
$(Obj).click(function(){
var s_txt = $(this).text();
$(Obj1).html(s_txt);
$(this).parent(".vdo_drop_l1").hide();
$(".vdo_drop_M1").removeClass("vdo_drop_aB")
})
}
function selectEvent(slt,isTrue){
$(slt).click(function(event){
var e=window.event || event;
if(e.stopPropagation){
e.stopPropagation();
}else{
e.cancelBubble = true;
}
if(isTrue==true){
$(".vdo_drop_list").not($(this).siblings()).hide();
$(".vdo_drop_ModifyThe").not($(this)).removeClass("vdo_drop_aB");
$(slt).siblings().toggle();
$(slt).toggleClass("vdo_drop_aB")
}
});
}
//虚拟下拉列表-"扬声器选择"
$(function(){
selectEvent2(".vdo_drop_M2",true);
selectEvent2(".vdo_drop_l2",false);
ui_select_load2(".vdo_drop_l2 li",".vdo_drop_M2 span");
})
function ui_select_load2(Obj,Obj1){
$(Obj).click(function(){
var s_txt = $(this).text();
$(Obj1).html(s_txt);
$(this).parent(".vdo_drop_l2").hide();
$(".vdo_drop_M2").removeClass("vdo_drop_aB")
})
}
function selectEvent2(slt,isTrue){
$(slt).click(function(event){
var e=window.event || event;
if(e.stopPropagation){
e.stopPropagation();
}else{
e.cancelBubble = true;
}
if(isTrue==true){
$(".vdo_drop_list").not($(this).siblings()).hide();
$(".vdo_drop_ModifyThe").not($(this)).removeClass("vdo_drop_aB");
$(slt).siblings().toggle();
$(slt).toggleClass("vdo_drop_aB")
}
});
}
//滚动条
$(function(){
loaded();
})
function loaded() {
var option = {
probeType: 2,
scrollbars: "custom",
mouseWheel: true,
bounce: false,
interactiveScrollbars: true,
shrinkScrollbars: 'scale',
preventDefault: false
};
var myscroll = new IScroll('#wrapper', option);
var myscroll2 = new IScroll('#wrapper2', option);
var myscroll3 = new IScroll('#wrapper3', option);
var myscroll4 = new IScroll('#wrapper4', option);
}
</script>
</head>
<body>
<!--视频-->
<div class="vdo_main">
<nav class="top_title">
<span>正在视频通话</span>
<ul class="tool">
<li class="Winmin"></li>
<li class="Winmax"></li>
<li class="Winclose"></li>
</ul>
</nav>
<div class="vdo_con">
<div class="vdo_l" id="wrapper">
<div class="scroll" style="transition-timing-function: cubic-bezier(0.1, 0.57, 0.1, 1); transition-duration: 0ms; transform: translate(0px, 0px) translateZ(0px);">
<div class="vdo_lD" style="width: 279.999px; height: 210px;">
<div class="vdo_l_video" id="videoSnapDiv1" style="background:#383838;"></div><!--视频-->
<div class="vdo_lD_b">我</div>
</div>
<div class="vdo_lD" style="width: 279.999px; height: 210px;">
<div class="vdo_l_video" id="videoSnapDiv2" style="background:#383838;"></div><!--视频-->
<div class="vdo_lD_b">李成伟</div>
</div>
<div class="vdo_lD" style="width: 279.999px; height: 210px;">
<div class="vdo_l_video" id="videoSnapDiv3" style="background:#383838;"></div><!--视频-->
<div class="vdo_lD_b">莉莉</div>
<i class="vdo_l_mute"></i> <!--静音图标-->
</div>
<div class="vdo_lD" style="width: 279.999px; height: 210px;">
<div class="vdo_l_video" id="videoSnapDiv4" style="background:#383838;"></div><!--视频-->
<div class="vdo_lD_b">莉莉</div>
<i class="vdo_l_mute"></i> <!--静音图标-->
</div>
<div class="vdo_lD" style="width: 279.999px; height: 210px;">
<div class="vdo_l_video" id="videoSnapDiv5" style="background:#383838;"></div><!--视频-->
<div class="vdo_lD_b">莉莉</div>
<i class="vdo_l_mute"></i> <!--静音图标-->
</div>
<div class="vdo_lD" style="width: 279.999px; height: 210px;">
<div class="vdo_l_video" style="background:#383838;"><!--视频-->
<div class="vdo_lBg_btn"></div>
</div>
<div class="vdo_lD_b">莉莉</div>
<i class="vdo_l_mute"></i> <!--静音图标-->
</div>
<div class="vdo_lD" style="width: 279.999px; height: 210px;">
<div class="vdo_l_voice"> <!--语音-->
<div class="vdo_lBg_btn"></div>
</div>
<i class="vdo_l_mute"></i> <!--静音图标-->
<div class="vdo_lD_b"><span>语音中</span>巍巍</div>
</div>
</div>
<div class="iScrollVerticalScrollbar iScrollLoneScrollbar" style="overflow: hidden;"><div class="iScrollIndicator" style="transition-duration: 0ms; display: block; height: 471px; transform: translate(0px, 0px) translateZ(0px); transition-timing-function: cubic-bezier(0.1, 0.57, 0.1, 1);"></div></div></div>
<div class="vdo_r" style="left: 280.999px;">
<!--视频占位-->
<div class="vdo_l_video" id="videoDiv"></div>
<div class="vdo_r_t">
<h3>赵晨威</h3>
<p>企业安全-产品部</p>
<div><i class="vdo_l_mute"></i></div>
</div>
<div class="vdo_rList">
<!--参会人员-->
<div class="PA42">
<div class="vdo_rL_tTit">已加入(5)</div>
</div>
<div class="vdo_rL_tabC">
<div class="vdo_rL_tCon" id="wrapper4">
<div class="scroll">
<ul class="vdo_rL_list">
<li><span class="vdo_rL_lBtn2"><i class="vdo_rL_iMute" title="音频已被开启"></i><i class="vdo_rL_iVideo" title="视频已被开启"></i></span><img src="./TestVideo_files/card_icon.png"><p>莉莉(主持人)</p></li>
<li><span class="vdo_rL_lBtn2"><i class="vdo_rL_iMute" title="音频已被开启"></i><i class="vdo_rL_iVideo on" title="主持人未开启视频"></i></span><img src="./TestVideo_files/card_icon.png"><p>李成伟</p></li>
<li><span class="vdo_rL_lBtn2"><i class="vdo_rL_iMute on" title="主持人未开启音频"></i><i class="vdo_rL_iVideo" title="视频已被开启"></i></span><img src="./TestVideo_files/card_icon.png"><p>赵晨威</p></li>
<li><span class="vdo_rL_lBtn2"><i class="vdo_rL_iMute on" title="主持人未开启音频"></i><i class="vdo_rL_iVideo on" title="主持人未开启视频"></i></span><img src="./TestVideo_files/card_icon.png"><p>王月</p></li>
<li><span class="vdo_rL_lBtn2"><i class="vdo_rL_iMute on" title="主持人未开启音频"></i><i class="vdo_rL_iVideo on" title="主持人未开启视频"></i></span><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcBAMAAAARwc9rAAAAMFBMVEUAAAAup+Uwp+UwqeYzqugwqeYvp+X///8zqeWS0fHq9vye1vI4q+ad1fI5q+YAAACC8hevAAAABnRSTlMA8+ygLaGlGEdtAAAA50lEQVR42mNkYBYOYCAO/D5/gZFFyYGBWPDnHtM/4lUzsDxgDBMgXjnDX+bXGqQoZwogQTUDKxMDSWBU+ajyIa2cBYmtKnMBiwrmuD7sputcwJrhluJwzAccGRSH8gukKR+N1VHlpKZ3MFA8B6aU3xFnuh+EekqkYzZBKGkiHXNfEEy9GznhzoA99DFM10PmPCbomEvIHFliw50Be+iPhvtouI8qJ0q5AXYlzDiUC5Cm/ApW45mtkTiMaaPRNKp8VDkOwPyYlM7zbyYFktzCdIYU5XuZmT8Sb/6f/8z/Pj0k1vW/z58AAJlUNBybTBN8AAAAAElFTkSuQmCC"><p>巍巍</p></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="vdo_btn">
<div class="vdo_btn_c"><a href="javascript:;" class="vdo_btn_mic" id="vdo_btn_mic" title="关闭麦克风"><i></i></a><a href="javascript:;" class="vdo_btn_camera" title="关闭摄像头"><i></i></a><span class="volume_con"><a href="javascript:;" class="vdo_btn_mute" title="点击静音"><i></i></a>
<div class="volume_div">
<div class="vdo_btn_muteIpt"><em class="volume_btn volume_plus"></em><div class="slider-wrapper vertical-wrapper"><input type="text" class="js-vertical" style="display: none;"><span class="range-bar vertical"><span class="range-handle" style="bottom: 0px;"></span><span class="range-min">0</span><span class="range-max">100</span><span class="range-quantity" style="height: 0px;"></span></span></div><em class="volume_btn volume_minus"></em></div>
</div></span><a href="javascript:;" class="vdo_btn_set" title="设置"><i></i></a><a href="javascript:;" class="vdo_btn_member on"><i></i><em>5/6</em></a></div>
<div class="vdo_btn_r"><span class="vdo_btn_duration">03:54</span><a href="javascript:;" class="vdo_btn_quit"><i></i>退出</a></div>
</div>
</div>
<!--设置-弹出框-->
<div class="vdo_set">
<h4 class="vdo_set_title"><a href="javascript:;" class="vdo_set_close"></a>设置</h4>
<div class="vdo_set_con">
<div class="vdo_set_list">
<div class="vdo_set_li">
<label class="vdo_set_l">摄像头选择</label>
<div class="fl">
<div class="vdo_drop"><div title="没有录音设备" class="vdo_drop_ModifyThe vdo_drop_MNo"><i></i><span>没有录音设备</span></div>
</div>
</div>
<div class="clear"></div>
</div>
<div class="vdo_set_li">
<label class="vdo_set_l">麦克风选择</label>
<div class="fl">
<div class="vdo_drop"><div title="Windows默认设备" class="vdo_drop_ModifyThe vdo_drop_M1"><i></i><span>Windows默认设备</span></div>
<ul class="vdo_drop_list vdo_drop_l1">
<li title="Windows默认设备">Windows默认设备</li>
<li title="扬声器(Realtek High Ddfinition Audio)">扬声器<i class="vdo_drop_lI">(Realtek High Ddfinition Audio)</i></li>
<li title="禁用">禁用</li>
</ul>
</div>
</div>
<div class="clear"></div>
</div>
<div class="vdo_set_li">
<label class="vdo_set_l">扬声器选择</label>
<div class="fl">
<div class="vdo_drop"><div title="Windows默认设备" class="vdo_drop_ModifyThe vdo_drop_M2"><i></i><span>Windows默认设备</span></div>
<ul class="vdo_drop_list vdo_drop_l2">
<li title="Windows默认设备">Windows默认设备</li>
<li title="扬声器(Realtek High Ddfinition Audio)">扬声器<i class="vdo_drop_lI">(Realtek High Ddfinition Audio)</i></li>
<li title="禁用">禁用</li>
</ul>
</div>
</div>
<div class="clear"></div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
//音量
var vert = document.querySelector('.js-vertical');
var initVert = new Powerange(vert, { start: 80, vertical: true });
</script>
</body></html>