forked from tinkten7/FarmBuddy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
video.html
608 lines (589 loc) · 19.2 KB
/
video.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
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
<!DOCTYPE html>
<html>
<head>
<link
rel="shortcut icon"
href="https://videosdk.live/favicon/favicon.ico"
/>
<meta charset="UTF-8" />
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
crossorigin="anonymous"
/>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css"
/>
<link rel="stylesheet" href="video.css" />
<script
src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
crossorigin="anonymous"
></script>
<script
src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
crossorigin="anonymous"
></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
crossorigin="anonymous"
></script>
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
/>
<link href="video.css" rel="stylesheet" />
<title>JS-SDK | videosdk.live</title>
<style>
#screenShare {
/* margin-top: 20px; */
width: 80%;
}
audio {
display: none;
}
</style>
</head>
<body>
<!--home-page start-->
<div class="home-page" id="home-page">
<div class="flex" style="margin-top: 300px">
<div class="flex-container col-auto">
<center>
<button
class="btn btn-primary"
style="border-radius: 5px"
id="meetingJoinButton"
onclick="joinMeeting(true)"
>
Create Meeting
</button>
</center>
</div>
<div class="flex-container">
<center>
<br />
<!--<hr style="background-color: grey; width: 300px" />-->
<center style="color: grey">OR</center>
</center>
</div>
<div class="flex-container" style="margin-top: 25px">
<center>
<div class="col-auto" style="width: 500px; margin-left: 70px">
<div class="input-group mb-3">
<div class="input-group-prepend">
<div
class="input-group-text"
style="
background-color: #212032;
padding: 12px;
margin-top: -15px;
"
>
<img
src="./assets/icons/svg-path.svg"
height="25px"
width="25px"
/>
</div>
</div>
<input
type="text"
class="form-control"
id="joinMeetingId"
placeholder="Enter Meeting Code"
/>
<div class="input-group-append">
<button
class="btn btn-primary"
style="
border-radius: 5px;
margin-left: 7px;
margin-top: -5px;
height: 50px;
height: 40px;
"
id="meetingJoinButton"
onclick="validateMeeting()"
>
Join Meeting
</button>
</div>
</div>
</div>
</center>
</div>
</div>
</div>
<!--join page container start-->
<div
id="joinPage"
class="main-bg"
style="display: none; margin-left: -15px"
>
<div style="margin: auto; display: flex">
<!--join screen left grid start-->
<div
class="join-left"
style="
/* border: 1px solid black; */
width: 650px;
height: 350px;
margin-right: 30px;
margin-left: -160px;
position: relative;
"
>
<div class="video-view">
<video
class="video"
id="joinCam"
style="
position: absolute;
width: 100%;
height: 100%;
border-radius: 10px;
transform: rotate('90');
object-fit: cover;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19),
0 6px 6px rgba(0, 0, 0, 0.23);
"
></video>
<div class="input-group mb-3 video-content">
<button
style="border-radius: 20px; height: 50px; width: 50px"
id="camButton"
onclick="toggleWebCam()"
>
<i
class="bi bi-camera-video-fill"
style="color: black; font-size: 21px"
id="onCamera"
></i>
<i
class="bi bi-camera-video-off-fill"
style="color: black; font-size: 21px; display: none"
id="offCamera"
></i>
</button>
<button
style="
border-radius: 20px;
height: 50px;
width: 50px;
margin-left: 5px;
"
id="micButton"
onclick="toggleMic()"
>
<i
class="bi bi-mic-mute-fill"
style="color: black; font-size: 21px; display: inline-block"
id="muteMic"
></i>
<i
class="bi bi-mic-fill"
style="color: black; font-size: 21px; display: none"
id="unmuteMic"
></i>
</button>
</div>
</div>
</div>
<!--join screen right grid start-->
<div class="join-right" style="width: 350px">
<h1 style="text-align: center">JOIN PAGE</h1>
<div>
<div class="class-control row" style="margin-top: 120px">
<div class="col-1">
<img
src="./assets/icons/svg-path.svg"
height="25px"
width="25px"
/>
</div>
<div class="col-8">
<input
type="text"
id="joinMeetingName"
placeholder="Name Of Participant"
class="form-control"
/>
</div>
<div class="col-2" style="margin-top: -5px">
<button
id="meetingJoinButton"
onclick="joinMeeting()"
style="margin-left: 50px; width: 130px; border-radius: 5px"
class="btn btn-primary"
>
Join Meeting
</button>
</div>
</div>
</div>
</div>
<!--join screen right grid end-->
</div>
</div>
<!-- Common Functionalityes -->
<!--<div style="position: absolute; left: 5%; bottom: 20px">
<button class="btn primary text-white" id="startRecording-btn">
Start Recording
</button>
<button class="btn primary text-white" id="stopRecording-btn">
Stop Recording
</button>
<button class="btn primary text-white" id="mic-btn">Mute Mic</button>
<button class="btn primary text-white" id="cam-btn">Disable Cam</button>
<button class="btn primary text-white" id="ss-btn">
Share Entire Screen
</button>
<button
style="display: none"
class="btn primary text-white"
id="raiseHand-btn"
>
RaiseHand
</button>
<button class="btn primary text-white" id="leaveMeeting-btn">
Leave Meeting
</button>
<button class="btn primary text-white" id="endMeeting-btn">
End Meeting
</button>
</div>
Video Functionalities
<div style="position: absolute; left: 20%; bottom: 65px">
<button class="btn primary text-white" id="startVideo-btn">
start Video
</button>
<button class="btn primary text-white" id="stopVideo-btn">
Stop Video
</button>
<button class="btn primary text-white" id="pauseVideo-btn">
pause Video
</button>
<button class="btn primary text-white" id="resumeVideo-btn">
Resume Video
</button>
<button class="btn primary text-white" id="seekVideo-btn">
seek video
</button>
</div>
<div id="videoContainer"></div>
<div
class="screenshare-wrapper"
style="position: absolute; top: 10px; left: 50px; width: 88%; height: 80%"
>
<video id="screenShare"></video>
</div>
<div>
<video id="videoPlayback"></video>
</div>
<div
class="chat-wrapper"
style="
display: absolute;
/* background-color: red; */
height: 50%;
top: 50%;
width: 300px;
padding: 10px;
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
background-color: whitesmoke;
"
>
<div id="chats" style="height: 82%; overflow-y: scroll"></div>
chat message
<div style="display: flex">
<input
type="text"
required
id="inputMessage"
style="display: block; width: 90%"
/>
<button id="sendMessage-btn">Send Message</button>
</div>
</div>
<div
class="meetingId-wrapper"
style="position: absolute; z-index: 0; top: 0px; right: 100px"
>
<div
class="meetingId-container"
style="background-color: crimson; color: white; padding: 5px"
>
meetingId:
MEETING-ID=>
<div style="display: inline; color: black" id="meetingid"></div>
</div>
</div>
<div
class="participants-wrapper"
style="
position: absolute;
top: 10px;
right: 0px;
height: 50%;
overflow-y: scroll;
"
>
<h3>Participants List</h3>
<div id="participants"></div>
</div>-->
<!-- You can also require other files to run in this process -->
<!-- <script src="./renderer.js"></script> -->
<!-- <script src="./zujo-sdk-2.0.0.min.js"></script> -->
<div
class="grid-page flex-container"
id="gridPpage"
style="display: none; position: relative"
>
<div
class="row"
style="height: 70px; width: 100%; border-bottom: 1px solid grey"
>
<div
class="col-3 d-flex justify-content-start"
style="margin-top: 19px"
>
<input
type="text"
style="background-color: #212032"
class="form-control navbar-brand"
id="meetingid"
readonly
/>
<button
id="btnCopy"
type="button"
class="btn btn-outline-light"
style="height: fit-content; position: relative"
onclick="copyMeetingCode()"
>
<span class="material-icons"> content_copy </span>
<div class="copyContent">Copy Meeting Code</div>
</button>
</div>
<div
class="col-9"
style="margin-top: 13px; position: static; align-content: right"
>
<div class="d-flex justify-content-end">
<button
type="button"
id="btnStartRecording"
class="btn btn-outline-light"
>
<span class="material-icons"> radio_button_checked </span>
</button>
<button
type="button"
style="display: none"
id="btnStopRecording"
class="btn btn-light"
>
<span class="material-icons"> radio_button_checked </span>
</button>
<button
type="button"
id="btnRaiseHand"
class="btn btn-outline-light ms-1"
>
<span class="material-icons"> front_hand </span>
</button>
<span class="vertical-line"></span>
<!-- main page toggle mic-->
<div
class="btn-group"
id="main-pg-mute-mic"
style="display: inline-block"
>
<button
type="button"
class="btn btn-outline-light dropdown-toggle ms-1"
aria-haspopup="true"
aria-expanded="false"
>
<span class="material-icons"> mic_off </span>
</button>
</div>
<div
class="btn-group"
id="main-pg-unmute-mic"
style="display: none"
>
<button
type="button"
class="btn btn-outline-light dropdown-toggle ms-1"
aria-haspopup="true"
aria-expanded="false"
>
<span class="material-icons"> mic </span>
</button>
<!--<div class="dropdown-menu" style="background-color: #212032">
<a class="dropdown-item" href="#"
>Default-Microphone Array(Realtek(R) Audio)</a
>
<a class="dropdown-item" href="#"
>Communications-Microphone Array(Realtek(R) Audio)</a
>
<a class="dropdown-item" href="#"
>Microphone Array(Realtek(R) Audio)</a
>
</div>-->
</div>
<!--main page toggle web-cam-->
<div
class="btn-group"
id="main-pg-cam-off"
style="display: inline-block"
>
<button
type="button"
class="btn btn-outline-light dropdown-toggle ms-1"
aria-haspopup="true"
aria-expanded="false"
>
<span class="material-icons"> videocam_off</span>
</button>
</div>
<div class="btn-group" id="main-pg-cam-on" style="display: none">
<button
type="button"
class="btn btn-outline-light dropdown-toggle ms-1"
aria-haspopup="true"
aria-expanded="false"
id="videoCamOn"
>
<span class="material-icons"> videocam </span>
</button>
<!--<div class="dropdown-menu" style="background-color: #212032">
<a class="dropdown-item" href="#">Integrated Camera</a>
<a class="dropdown-item" href="#">OBS Virtual Camera</a>
</div>-->
</div>
<!--screen share-->
<button
type="button"
id="btnScreenShare"
class="btn btn-outline-light ms-1"
>
<span class="material-icons"> screen_share </span>
</button>
<span class="vertical-line"></span>
<!--participants-->
<button
type="button"
class="btn btn-outline-light ms-1"
onclick="openParticipantWrapper()"
>
<span class="material-icons"> people </span>
</button>
<!--chat-->
<button
type="button"
class="btn btn-outline-light ms-1"
onclick="openChatWrapper()"
>
<span class="material-icons"> chat </span>
</button>
<span class="vertical-line"></span>
<!--call end-->
<div class="btn-group">
<button
type="button"
class="btn btn-danger dropdown-toggle ms-1"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
>
<span class="material-icons"> call_end </span>
</button>
<div
class="dropdown-menu"
style="
background-color: #212032;
color: white;
margin-left: -80px;
"
>
<a class="dropdown-item" id="endCall">End Call</a>
<a class="dropdown-item" id="leaveCall">Leave Meeting</a>
</div>
</div>
</div>
</div>
</div>
<video
id="videoScreenShare"
></video>
<div class="row" id="videoContainer"></div>
</div>
<!--raise hand pop-up-->
<div
id="contentRaiseHand"
class="alert alert-info col-2"
style="
left: 10;
bottom: 0;
position: absolute;
height: 60px;
display: none;
"
role="alert"
></div>
<!--participant wrapper-->
<div class="participant-wrapper" id="participants">
<div class="participant-wrapper-header text-light">
<span
class="closebtn"
id="ParticipantsCloseBtn"
onclick="closeParticipantWrapper()"
>×</span
>
<h5 id="totalParticipants"></h5>
</div>
<hr class="border-light rounded 3" />
<div
id="participantsList"
class="participant-wrapper-content text-light"
></div>
</div>
<!--chat wrapper-->
<div class="chat-wrapper" id="chatModule">
<div class="chat-wrapper-header text-light">
<span class="closebtn" id="chatCloseBtn" onclick="closeChatWrapper()"
>×</span
>
<h5 id="chatHeading">Let's Chat!</h5>
</div>
<hr class="border-light rounded 3" />
<div
id="chatArea"
class="chat-wrapper-content text-light"
style="overflow-y: scroll"
></div>
<div class="message-box input-group mb-2">
<input
type="text"
id="txtChat"
="form-control"
placeholder="Message..."
/>
<div id="btnSend" class="input-group-append">
<button class="btn btn-primary">Send</button>
</div>
</div>
</div>
<script src="video.js"></script>
<script src="https://sdk.videosdk.live/js-sdk/0.0.54/videosdk.js"></script>
<script src="config.example.js"></script>
</body>
<div id="viewer"></div>
</html>