forked from aullman/OpenTok-Angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo.html
More file actions
52 lines (50 loc) · 2.51 KB
/
demo.html
File metadata and controls
52 lines (50 loc) · 2.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
<!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"
apiKey="<%=apiKey%>"
props="{style: {nameDisplayMode: 'off'}, resolution: '1280x720', frameRate: 30}">
</ot-publisher>
</ot-layout>
</ot-session>
<script src="//static.opentok.com/webrtc/v2.2/js/TB.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: '1127',
sessionId: '2_MX4xMTI3fn5GcmkgQXByIDA0IDAzOjMyOjUwIFBEVCAyMDE0fjAuNjkxOTA4OX5-',
token: 'T1==cGFydG5lcl9pZD0xMTI3JnNpZz04Nzk2ZjY2NTRmOWYwNDk4ODlhZmQxYWViODIyNWFiMGQ5MDQyNDEzOmV4cGlyZV90aW1lPTEzOTkxNTI3NzAmbm9uY2U9MjQ4OTQ5JmNyZWF0ZV90aW1lPTEzOTY2MDc1NzAmcm9sZT1tb2RlcmF0b3Imc2Vzc2lvbl9pZD0yX01YNHhNVEkzZm41R2Nta2dRWEJ5SURBMElEQXpPak15T2pVd0lGQkVWQ0F5TURFMGZqQXVOamt4T1RBNE9YNS0='
});
</script>
</body>
</html>