-
Notifications
You must be signed in to change notification settings - Fork 0
/
host.html
49 lines (45 loc) · 1.58 KB
/
host.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
<html>
<head>
<title>Dolby.io Real-time Streaming - Webinar</title>
<script src="https://cdn.jsdelivr.net/npm/@millicast/sdk/dist/millicast.umd.min.js"></script>
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity=""
crossorigin="anonymous"
/>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/jsrender.min.js"></script>
<script src="shared.js"></script>
</head>
<body>
<div class="bg-dark text-white px-4 py-4">
<h1>Dolby.io Real-time Streaming - Webinar</h1>
</div>
<div class="px-4 mt-4">
<div class="mt-3">
<div class="shadow p-3 mb-5 bg-body rounded text-center">
<button onclick="participate(this)" style="height: 50px; width: 150px">
Participate
</button>
<ul class="list-group">
<li id="viewerCount" class="list-group-item"></li>
</ul>
<ul id="participants" class="list-group"></ul>
</div>
</div>
</div>
<script>
const urlParams = new URLSearchParams(window.location.search);
// Your Dolby.io stream credentials
const streamAccountId = "ACCOUNT_ID";
const streamName = "STREAM_NAME";
const publishToken = "PUBLISH_TOKEN";
const participantName = urlParams.get('name') ?? "";
async function participate(button) {
button.remove();
await startPublishing(publishToken, streamName, participantName);
await startListening(streamAccountId, streamName, participantName);
}
</script>
</body>
</html>