-
Notifications
You must be signed in to change notification settings - Fork 22
/
demo.html
53 lines (51 loc) · 2.37 KB
/
demo.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
<!DOCTYPE html>
<html ng-app="demo">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>OpenTok Whiteboard Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, maximum-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes" />
<script src="bower_components/jquery/dist/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="bower_components/angular/angular.min.js" type="text/javascript" charset="utf-8"></script>
<script src="bower_components/paper/dist/paper-core.min.js" type="text/javascript" charset="utf-8"></script>
<script src="//static.opentok.com/v2.6/js/opentok.js" type="text/javascript" charset="utf-8"></script>
<script src="bower_components/opentok-angular/opentok-angular.js" type="text/javascript" charset="utf-8"></script>
<script src="opentok-whiteboard.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="opentok-whiteboard.css" type="text/css" media="screen" charset="utf-8">
<script type="text/javascript" charset="utf-8">
// A bit cheeky: Forcing checkSystemRequirements to pass so that this works on mobile Safari
OT.checkSystemRequirements = function () {
return true;
};
angular.module('demo', ['opentok', 'opentok-whiteboard'])
.controller('DemoCtrl', ['$scope', 'OTSession', function ($scope, OTSession) {
$scope.connected = false;
OTSession.init('YOUR_API_KEY', 'YOUR_SESSION_ID', 'YOUR_TOKEN', function (err) {
if (!err) {
$scope.$apply(function () {
$scope.connected = true;
});
}
});
}]);
</script>
<style type="text/css" media="screen">
body {
margin: 0;
padding: 0;
}
ot-whiteboard {
display: block;
width: 1280px;
height: 720px;
background-color: #ccc;
position: absolute;
left: 0;
right: 0;
}
</style>
</head>
<body ng-controller="DemoCtrl">
<ot-whiteboard width="1280" height="720"></ot-whiteboard>
</body>
</html>