-
Notifications
You must be signed in to change notification settings - Fork 2
/
app.html
executable file
·197 lines (155 loc) · 6.12 KB
/
app.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Project Wing</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Sumukh Sridhara">
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Le styles -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/css/bootstrap-responsive.min.css" rel="stylesheet">
<link href="assets/css/jigowatt.min.css" rel="stylesheet">
<link href="assets/css/goalhawkcustom.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="http://staging.tokbox.com/v0.91/js/TB.min.js"></script>
<script type="text/javascript">
var apiKey = '14255491';
var sessionId = '2_MX4xMjMyMDgxfjcyLjUuMTY3LjE0OH4yMDEyLTA0LTE1IDAwOjM1OjA1LjU0NTUwNyswMDowMH4wLjMxNjA0NjQ5NjQzNX4';
var token = 'devtoken';
TB.setLogLevel(TB.DEBUG);
var session = TB.initSession(sessionId);
session.addEventListener('sessionConnected', sessionConnectedHandler);
session.addEventListener('streamCreated', streamCreatedHandler);
session.connect(apiKey, token);
var publisher;
var publisher2;
function sessionConnectedHandler(event) {
publisher = session.publish('myPublisherDiv');
// Subscribe to streams that were in the session when we connected
subscribeToStreams(event.streams);
}
function streamCreatedHandler(event) {
// Subscribe to any new streams that are created
subscribeToStreams(event.streams);
}
function subscribeToStreams(streams) {
for (var i = 0; i < streams.length; i++) {
// Make sure we don't subscribe to ourself
if (streams[i].connection.connectionId == session.connection.connectionId) {
return;
}
// Create the div to put the subscriber element in to
var div = document.createElement('div');
div.setAttribute('id', 'stream' + streams[i].streamId);
console.log( document.getElementById('test2') );
// document.getElementById("test2")[0].appendChild('div'); //append new div to another
// $('#test2').append('div');
var pele = document.getElementById("test2");
pele.appendChild(div);
// Subscribe to the stream
session.subscribe(streams[i], div.id);
}
}
</script>
<!-- <link rel="shortcut icon" href="favicon.ico"> -->
</head>
<body>
<!-- Navigation
================================================== -->
<div class="navbar navbar-fixed-top">
<div class="navbar">
<div class="navbar-inner">
<div class="container-fluid">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="home.php">
<logo >Project Wing</logo> <!-- <img src="assets/i/ghlogo.png" width="90"> -->
</a>
<div class="nav-collapse">
<ul class="nav" id="findme">
<li><a href="home.php">Home</a></li>
<li><a href="#">Classes</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Blog</a></li>
</ul>
<ul class="nav pull-right">
<li><a href="#" class="signup-link"><strong>You are studying! </strong> » </a></li> <li><a href="#" class="signup-link"><strong> Invite</strong> your friends</a></li>
</ul>
</div>
</div>
</div><!-- /navbar-inner -->
</div><!-- /navbar -->
</div><!-- /navbar-wrapper -->
<!-- Main content================================================== -->
<div class="container-fluid">
<div class="row-fluid">
<div class="span3">
<div class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">People here</li>
<li class="active"><a href="#">Class Name</a></li>
<li><a href="#">Richie</a></li>
<li><a href="#">Sumukh</a></li>
<div id="myPublisherDiv"></div>
<div id="test2"></div>
</ul>
</div><!--/.well -->
</div><!--/span-->
<div class="span9">
<div class="row-fluid">
<div class="span6">
<h2>Your Space</h2>
<iframe src="http://willyou.typewith.me/p/lusdalasda" width="100%" height="600px" frameborder="0"></iframe>
</div><!--/span-->
<div class="span6">
<h2>The Classes Space</h2>
<iframe src="http://willyou.typewith.me/p/lusdalasda2" width="100%" height="600px" frameborder="0"></iframe>
</div><!--/span-->
</div><!--/span-->
</div><!--/row-->
</div><!--/span-->
</div><!--/row-->
</div>
<!-- Footer
================================================== -->
</div> <!-- /.span9 -->
</div> <!-- /.row-fluid -->
</body>
<footer>
<div class="footer">
<hr class="soften">
<div id="logo">
<a href="#">© <logo>Project Wing</logo> - The Big Hack - Cal</a>
</div>
<div id="Group2"><br> <a href="#privacy">Privacy </a> | <a href="#">Blog</a> </div>
</div>
</footer>
</div> <!-- /.container-fluid -->
</div> <!-- the wrapper layer -->
<!-- The javascript -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="assets/js/bootstrap.collapse.js"></script>
<script src="assets/js/bootstrap-modal.js"></script>
<script src="assets/js/bootstrap-dropdown.js"></script>
<script src="assets/js/bootstrap-button.js"></script>
<script src="assets/js/bootstrap-tab.js"></script>
<script src="assets/js/bootstrap-alert.js"></script>
<script src="assets/js/bootstrap-scrollspy.js"></script>
<script src="assets/js/bootstrap-popover.js"></script>
<script src="assets/js/jquery.jigowatt.js"></script>
</body>
</html>