/
broadcaster.html
43 lines (27 loc) · 953 Bytes
/
broadcaster.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
<html>
<head>
<title>FireCamera example</title>
<style>
body{font-family:Sans-Serif;}
canvas{position:absolute; left: -9999em;}
#imageToForm{width:100%;}
#preview{margin: 20px 0;}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://cdn.firebase.com/js/client/2.2.5/firebase.js"></script>
<script src="/v2/firecam.js"></script>
<script>
$(document).ready(function(){
document.broadcast = new FireCam('video')
document.broadcast.startBroadcasting()
$("#braodcastlink").text(document.broadcast.getWatchLink())
});
</script>
</head>
<body>
<pre>copy this into your watcher page url <code id="braodcastlink"></code></pre>
<video id="video"></video>
<!-- target for the canvas-->
<div id="canvasHolder"></div>
</body>
</html>