-
Notifications
You must be signed in to change notification settings - Fork 3
/
host.html
81 lines (77 loc) · 2.18 KB
/
host.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
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Shuteye.co - Private, browser-based, video conferencing</title>
<link rel="icon" type="image/png" href="/img/favicon.png" />
<link rel="stylesheet" href="/css/bootstrap.css" type="text/css">
<link rel="stylesheet" href="/css/shuteye.css" type="text/css">
<link rel="stylesheet" href="/css/font-awesome.min.css" type="text/css">
<style>
</style>
</head>
<body>
<div class="navbar">
<div class="navbar-inner">
<a class="brand" href="/" target="_blank">
SHUT
<i class="icon-eye-close"></i>
EYE
</a>
<ul class="nav">
<li>
<a href="/about" class="link">ABOUT</a>
</li>
<li>
<a href="http://blog.shuteye.co" class="link">BLOG</a>
</li>
<li>
<a href="#" id="invite-link" class="invite-link">INVITE</a>
</li>
</ul>
<form class="navbar-form pull-right" action="/new" method="get" target="_blank">
<button id="buy" class="btn btn-success">
Get More Sessions (<span id="sessions-left">{{sessionCount}}</span> Left)
</button>
</form>
</div>
</div>
<div class="row-fluid">
<div class="span12 text-center">
<span id="local"></span>
<span id="remote"></span>
</div>
</div>
<div class="navbar navbar-bottom">
<div id="others"></div>
</div>
<div id="invite-modal" class="modal hide fade" tabIndex="-1" role="dialog">
<div class="modal-body">
<p class="modal-text">Invite others to join this conversation by sending them the following URL</p>
<input class="modal-input" type="text" value="{{&join_url}}" readonly></input>
</div>
</div>
<script src="/js/jquery-1.10.2.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/socket.io/socket.io.js"></script>
<script src="/js/webrtc.js"></script>
<script>
$('#invite-link').on('click', function(e) {
e.preventDefault();
$('#invite-modal').modal('show');
});
$('.modal-input').click(function() {
this.select();
});
var rtc = new WebRTC({
localVideoEl: 'local',
remoteVideosEl: 'remote',
autoRequestMedia: true
});
rtc.on('readyToCall', function() {
rtc.joinRoom("{{roomName}}");
});
window.onbeforeunload = function() { rtc.leaveRoom(); }
</script>
</body>
</html>