forked from butorenjin/easyrtc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo_screen_send.html
121 lines (110 loc) · 5.95 KB
/
demo_screen_send.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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!--skip-->
<title>EasyRTC Demo: Screen Sharing Sender</title>
<!--hide-->
<link rel="stylesheet" type="text/css" href="css/landing.css" />
<!-- Prettify Code -->
<script type="text/javascript" src="js/prettify/prettify.js"></script>
<script type="text/javascript" src="js/prettify/loadAndFilter.js"></script>
<script type="text/javascript" src="js/prettify/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="js/prettify/prettify.css" />
<!--show-->
<!-- Assumes global locations for socket.io.js and easyrtc.js -->
<script src="/socket.io/socket.io.js"></script>
<script type="text/javascript" src="/easyrtc/easyrtc.js"></script>
<script type="text/javascript" src="js/demo_screen_send.js"></script>
<!--hide-->
<!-- Styles used within the demo -->
<style type="text/css">
#demoContainer {
position:relative;
}
#connectControls {
float:left;
width:450px;
text-align:center;
border: 2px solid black;
}
#acceptCallBox {
display:none;
z-index:2;
position:absolute;
top:100px;
left:400px;
border:red solid 2px;
background-color:pink;
padding:15px;
}
</style>
<!--show-->
</head>
<body onload="initApp()">
<!--hide-->
<div id="container">
<div id="header">
<a href="index.html"><img id="logo_easyrtc" src="/easyrtc/img/easyrtc.png" alt="EasyRTC" style="" /></a>
</div>
<div id="menu"><a class="menu_link" href="index.html"><div class="menu_item">Local Demos</div></a><a class="menu_link" href="https://github.com/priologic/easyrtc/tree/master/docs"><div class="menu_item">Documentation</div></a><a class="menu_link" href="https://easyrtc.com/forum/"><div class="menu_item">Support: EasyRTC Forums</div></a><a class="menu_link" href="http://www.easyrtc.com/"><div class="menu_item">EasyRTC.com</div></a></div>
<div id="main">
<!-- Main Content -->
<h1>EasyRTC Demo: Screen share - Sender</h1>
<p>This application shares the screen(s) of it's host.</p>
<p style='color:red'> Currently this demo only runs in
Chrome. It must be hosted on an https server.
</p>
<hr />
<h2>The Demo</h2>
<!--show-->
<div id="demoContainer">
<div id="connectControls">
<span style="float:left">
Your name: <input type="text" id="userName" />
<input type="checkbox" id="shareAudio" /><label for="shareAudio"> Share audio</label><br>
</span>
<span style="float:left;clear:both">
<button id="connectButton" onclick="connect()">Connect to server</button>
<button id="disconnectButton" disabled="disabled" onclick="disconnect()">Disconnect from server</button><br>
</span>
<button id="hangupButton" disabled="disabled" onclick="hangup()" style="float:left;clear:both">Hangup</button><br>
<div id="iam" style="clear:both">Not yet connected...</div>
<br />
</div>
<div id="videos">
<audio id="callerAudio"></audio>
<div id="acceptCallBox"> <!-- Should be initially hidden using CSS -->
<div id="acceptCallLabel"></div>
<button id="callAcceptButton" >Accept</button> <button id="callRejectButton">Reject</button>
</div>
</div>
</div>
<!--hide-->
<br style="clear:both;" />
<p><em>Browser Note: Until there is better interoperability among browsers, both clients may need to be using the same browser type.</em></p>
<hr />
<h2>The Code</h2>
<h3>HTML</h3>
<pre id="prettyHTML" class="prettyprint linenums:1">
</pre>
<h3>JavaScript</h3>
<p>The contents of demo_audio_video.js:</p>
<pre id="prettyJS" class="prettyprint linenums:1">
</pre>
<!-- Runs the SyntaxHighlighter -->
<script type="text/javascript">
loadAndFilter(window.location.href, "prettyHTML",2 );
loadAndFilter(window.location.href.replace("/demos/", "/demos/js/").replace(/.html$/, ".js"), "prettyJS", 2);
</script>
<!-- End Main Content -->
</div>
<div id="footer">
<a href="http://www.skedans.com/?from=landing"><img id="logo_priologic" src="/easyrtc/img/skedans_logo.png" height="40" width="150" alt="Created By Skedans Systems, Inc." /></a>
<a href="http://www.easyrtc.com/?from=landing"><img id="logo_pb_easyrtc" src="/easyrtc/img/powered_by_easyrtc.png" height="60" width="200" alt="Powered By EasyRTC" /></a>
<p><em>© 2016 - Skedans Systems, Inc., All Rights Reserved.</em></p>
<p id="license">EasyRTC source code released under a BSD2 Lcense. <a href="https://github.com/priologic/easyrtc/blob/master/LICENSE">See LICENSE file in project folder</a> for details.</p>
</div>
</div>
<!--show-->
</body>
</html>