-
Notifications
You must be signed in to change notification settings - Fork 0
/
remote.html
32 lines (24 loc) · 1.03 KB
/
remote.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
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<title>Debating Timer Remote</title>
</head>
<body>
<div class="container" style="margin-top: 15px;">
<button id="play-pause" class="btn btn-default btn-lg btn-block" title="Play"><span class="glyphicon glyphicon-play"></span><span class="glyphicon glyphicon-pause"></span></button>
<button id="reset" class="btn btn-default btn-lg btn-block" title="Reset"><span class="glyphicon glyphicon-refresh"></span></button>
</div>
<script src="/socket.io/socket.io.js"></script>
<script>
var socket = io('http://'+window.location.hostname);
document.querySelector('#play-pause').onclick = function(){
socket.emit('play-pause');
}
document.querySelector('#reset').onclick = function(){
socket.emit('reset');
}
</script>
</body>
</html>