-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
160 lines (129 loc) · 4.47 KB
/
index.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
<?xml version="1.0" encoding="utf8"?>
<!DOCTYPE html>
<html>
<head>
<title>App Deployment</title>
<meta name="viewport" content="width=1024, user-scalable=no"/>
<link href="http://fonts.googleapis.com/css?family=Germania+One" rel="stylesheet" type="text/css"/>
<link href="http://fonts.googleapis.com/css?family=Droid+Sans:400,700" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" type="text/css" href="styles/global.css"/>
<link rel="stylesheet" href="styles/estro/estro.css" type="text/css"/>
<link rel="stylesheet" href="styles/deckjs/core.css" type="text/css"/>
<link rel="stylesheet" href="styles/deckjs/cube.css" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="/socket.io/socket.io.js"></script>
<script src="scripts/deckjs/deck.core.js"></script>
<script src="scripts/deckjs/deck.active.js"></script>
<script src="scripts/deckjs/modernizr.custom.js"></script>
<script type="text/javascript">
function getParameterByName(name)
{
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var regexS = "[\\?&]" + name + "=([^&#]*)";
var regex = new RegExp(regexS);
var results = regex.exec(window.location.search);
if(results == null)
return "";
else
return decodeURIComponent(results[1].replace(/\+/g, " "));
}
$(function() {
$.deck('.slide');
var following = false, broadcasting = false, masterSlide = -1, followLink = $("#FollowLink");
if (getParameterByName("broadcast") === "true") {
var result;
do {
result = prompt("Enter the broadcast password:");
if (result === "candies") {
setFollowing(false);
setBroadcasting(true);
break;
}
else {
alert("Incorrect broadcast password")
}
} while (result)
}
else {
setFollowing(true);
setBroadcasting(false);
}
function setFollowing(f) {
following = f;
followLink.text(f ? "Stop following" : "Follow").data("action", f ? "unfollow" : "follow");
}
function setBroadcasting(b) {
broadcasting = b;
console.log("Broadcasting: "+b)
if (b) {
followLink.hide();
}
else {
followLink.show();
}
}
$("#FollowLink").on("click", function() {
setFollowing($(this).data("action") === "follow");
return false;
})
var socket = io.connect('http://127.0.0.1:7565');
//var socket = io.connect('http://10.0.1.3:7565');
//var socket = io.connect('http://108.172.142.155:7565');
socket.on('deck.change', function (data) {
masterSlide = data.to;
if (following)
$.deck('go', data.to);
});
$(document).on('deck.change', function(event, from, to) {
if (broadcasting) {
console.log("Sending deck change")
socket.emit('deck.change', { from: from, to: to });
}
if (to !== masterSlide) {
setFollowing(false)
}
});
$(document).on('keydown', function(event) {
if (event.keyCode === 65) {
$(".XC").toggleClass("OnDemo")
}
})
window.URL = window.URL || window.webkitURL;
navigator.getUserMedia = navigator.webkitGetUserMedia || navigator.getUserMedia;
navigator.getUserMedia({video: true, audio: true}, function(stream) {
console.log("VIDYAS")
document.getElementById('Video').src = window.URL.createObjectURL(stream);
}, function() {
alert("failed")
})
});
</script>
</head>
<body style="height: 100%; overflow: hidden;">
<video autoplay="autoplay" id="Video" ></video>
<a href="#" id="FollowLink">Follow</a>
<div class="XC">
<div class="deck-container" style="width: 100%; height: 100%;">
<section class="title slide">
<div class="block">
<img src="images/icon.png" alt=""/>
<h1>Big Data</h1>
<span class="tag">Managing a lot of stuff.</span>
</div>
</section>
<section class="slide">
<div class="block">
<h1>Goals</h1>
</div>
</section>
<section class="slide">
<h1>Bare Metal</h1>
<img src="images/server.png" alt="Server"/>
</section>
</div>
<div class="demo" style="width: 100%; height: 100%; position: relative;">
<iframe src="http://home.izaakschroeder.com:9999/index.html" style="width: 100%; height: 100%; "></iframe>
</div>
</div>
</body>
</html>