-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
57 lines (46 loc) · 1.51 KB
/
index.html
File metadata and controls
57 lines (46 loc) · 1.51 KB
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
<!doctype html>
<html lang="en-GB">
<head>
<meta charset="utf-8">
<style>
body {
background: #fafafa;
}
</style>
</head>
<body>
<div style="height: 30rem; width: 40rem">
<div id="call-composite" style="height: 100%; width: 100%"></div>
</div>
<div id="demo"></div>
<template id="demo-template">
<acs-real-call-provider>
<acs-microphone-button></acs-microphone-button>
</acs-real-call-provider>
</template>
<script fetchpriority="high"
src="https://github.com/Azure/communication-ui-library/releases/latest/download/callComposite.js"></script>
<script type="module">
// Import all web component defs.
import '../dist/esbuild/index.js';
const USER_ID = 'PLACEHOLDER';
const TOKEN = 'PLACEHOLDER';
// `callComposite` is defined by the cjs module from communication-ui-library.
// eslint-disable-next-line no-undef
const callAdapter = await callComposite.loadCallComposite(
{
groupId: '85057ec2-b9db-4099-8c2f-e9fddbf4593f',
displayName: 'ThereAreSoManyMe',
userId: { communicationUserId: USER_ID },
token: TOKEN,
},
document.querySelector('#call-composite')
);
const clone = document.querySelector('#demo-template').content.cloneNode(true);
document.querySelector('#demo').appendChild(clone);
// Can only find the tag after it's been added to the main DOM.
const provider = document.querySelector('acs-real-call-provider');
provider.adapter = callAdapter;
</script>
</body>
</html>