forked from diorahman/appearin-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
27 lines (26 loc) · 894 Bytes
/
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
<!DOCTYPE html>
<html>
<head>
<title>Testing</title>
<script src="bin/appearin-sdk.bundle.js"></script>
</head>
<body>
<p id="compatible"></p>
<p id="random"></p>
<p id="generated"></p>
<iframe width="800" height="640" id="iframe"></iframe>
<iframe width="800" height="640" id="iframeId"></iframe>
<script>
var api = new AppearIn();
var webrtcCompatible = document.getElementById("compatible");
var randomRoomNameElement = document.getElementById("random");
var iframe = document.getElementById("iframe");
webrtcCompatible.innerHTML = "Is WebRTC compatible: " + api.isWebRtcCompatible();
api.getRandomRoomName().then(function (roomName) {
randomRoomNameElement.innerHTML = "Random room name: " + roomName;
api.addRoomToIframe(iframe, roomName);
api.addRoomToElementById("iframeId", roomName + "2");
});
</script>
</body>
</html>