-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVideoChatTest.html
33 lines (28 loc) · 1.05 KB
/
VideoChatTest.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script src="https://static.opentok.com/v2/js/opentok.min.js"></script>
<script>
var apiKey = "45543712";
var sessionId = "1_MX40NTU0MzcxMn5-MTQ1OTcyMDYyNjg3OH5zRUplZkU5akNiRlE1VmpoL1lMSzFyNk1-UH4";
var token = "T1==cGFydG5lcl9pZD00NTU0MzcxMiZzaWc9ZDExMTQyMmY3YWU0YWNiZDA0MTVjY2FlMGJmMjY1N2JkNTVlMDQ4ZDpyb2xlPXB1Ymxpc2hlciZzZXNzaW9uX2lkPTFfTVg0ME5UVTBNemN4TW41LU1UUTFPVGN5TURZeU5qZzNPSDV6UlVwbFprVTVha05pUmxFMVZtcG9MMWxNU3pGeU5rMS1VSDQmY3JlYXRlX3RpbWU9MTQ1OTcyMDY0NSZub25jZT0wLjMxNzEwNzA3MzEzODE2NjkmZXhwaXJlX3RpbWU9MTQ1OTgwNzAyMiZjb25uZWN0aW9uX2RhdGE9";
var session = OT.initSession(apiKey, sessionId);
session.connect( token, function( err ) {
if(err) {
alert("fucked up!");
}
else {
session.publish();
}
});
session.on("streamCreated", function(event) {
session.subscribe(event.stream );
});
</script>
</body>
</html>