forked from aullman/OpenTok-Angular
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
51 lines (49 loc) · 2.14 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
<!DOCTYPE html>
<html ng-app="demo">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>OpenTok-Angular Demo</title>
<style type="text/css" media="screen">
ot-publisher,ot-subscriber,ot-layout {
display: block;
overflow: hidden;
}
ot-layout {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
</style>
</head>
<body>
<div ng-controller="MyCtrl">
<ot-layout props="{animate:true}">
<ot-subscriber ng-repeat="stream in streams"
stream="stream"
props="{style: {nameDisplayMode: 'off'}}">
</ot-subscriber>
<ot-publisher id="publisher"
props="{style: {nameDisplayMode: 'off'}, resolution: '1280x720', frameRate: 30}">
</ot-publisher>
</ot-layout>
</div>
<script src="//static.opentok.com/v2/js/opentok.min.js" type="text/javascript" charset="utf-8"></script>
<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/opentok-layout-js/opentok-layout.js" type="text/javascript" charset="utf-8"></script>
<script src="opentok-angular.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
angular.module('demo', ['opentok'])
.controller('MyCtrl', ['$scope', 'OTSession', 'apiKey', 'sessionId', 'token', function($scope, OTSession, apiKey, sessionId, token) {
OTSession.init(apiKey, sessionId, token);
$scope.streams = OTSession.streams;
}]).value({
apiKey: 'YOUR_APIKEY',
sessionId: 'YOUR_SESSION_ID',
token: 'YOUR_TOKEN'
});
</script>
</body>
</html>