-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathindex.html
66 lines (65 loc) · 1.54 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
<!DOCTYPE html>
<html>
<head>
<title>Plain webRTC</title>
<style type="text/css">
.sent{
color:blue;
}
</style>
</head>
<body>
<div>
<input type="checkbox" id="enable_chat" onclick="enableChat()" checked> Enable chat
<span id=micused style="right:0;position:fixed;"></span>
</div>
<div>
<h4>LocalStream</h4>
<input type="checkbox" id="enableAudioFile">Audio File
<input type="file" id="streamAudioFile">
<br>
<!-- <input type="checkbox" id="enable_mic" checked>Microphone -->
</div>
<div>
<p>
<video width=250 id=local controls autoplay></video>
Local
<textarea rows="4" cols="50" id=localOffer></textarea>
<button id=localOfferSet>CreateOffer</button>
</p>
</div>
<div>
<p>
<video width=250 id=remote controls autoplay></video>
Remote
<textarea id="remoteOffer" rows="4" cols="50" placeholder="Paste remote SDP"></textarea>
<button id=remoteOfferGot>Answer</button>
</p>
</div>
<div id="chat" style="overflow:scroll;"></div>
<div>
<br><br>
<form action="" onsubmit="event.preventDefault();return sendMsg();">
<input id=sendTxt type="text" name="" placeholder="chat here" size="50">
<button type="submit">send</button>
</form>
</div>
<div>
<p>
File transfer:
</p>
<div>
<progress value="0" id="sendFileProg"></progress>
<input type="file" name="" id=fileTransfer>
<button type="submit" onclick="sendFile()">send</button>
</div>
<div>
<p>
<progress value="0" id="recFileProg"></progress>
<a href="" id=file_download></a>
</p>
</div>
</div>
<script src="js/plainwebrtc.js"></script>
</body>
</html>