-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
58 lines (51 loc) · 1.82 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Default Meeting UI | Dyte UI Kit</title>
<head>
<!--
For the UI Kit and Web Core script tags,
make sure to use the latest versions in the URL when you're using this
-->
<!-- Import helper to load UI Kit components -->
<script type="module">
import { defineCustomElements } from 'https://cdn.jsdelivr.net/npm/@dytesdk/[email protected]/loader/index.es2017.js';
defineCustomElements();
</script>
<!-- Import Web Core via CDN too -->
<script src="https://cdn.dyte.in/core/dyte-1.15.0.js"></script>
</head>
</head>
<body>
<dyte-meeting id="my-meeting" show-setup-screen="true" />
<script>
const searchParams = new URL(window.location.href).searchParams;
const authToken = searchParams.get('authToken');
// pass an empty string when using v2 meetings
// for v1 meetings, you would need to pass the correct roomName here
const roomName = searchParams.get('roomName') || '';
if (!authToken) {
alert(
"An authToken wasn't passed, please pass an authToken in the URL query to join a meeting."
);
}
// Initialize a meeting
DyteClient.init({
authToken,
roomName,
modules: { devTools: { logs: true } }
}).then((meeting) => {
document.getElementById('my-meeting').meeting = meeting;
});
</script>
<script>
window.addEventListener('dyte.deviceEmulatorLoaded', () => {
navigator.mediaDevices.addEmulatedDevice('videoinput');
});
</script>
<script src="dist/index.iife.js"></script>
</body>
</html>