forked from samdutton/simpl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
94 lines (76 loc) · 2.94 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
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
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Simplest possible examples of HTML, CSS and JavaScript." />
<meta name="author" content="//samdutton.com">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<meta itemprop="name" content="simpl.info: simplest possible examples of HTML, CSS and JavaScript">
<meta itemprop="image" content="/images/icons/icon192.png">
<meta name="mobile-web-app-capable" content="yes">
<meta id="theme-color" name="theme-color" content="#fff">
<base target="_blank">
<title>RTCDataChannel</title>
<link rel="stylesheet" href="../css/main.css" />
<style>
button {
margin: 0 1em 0 0;
width: 5.2em;
}
div#buttons {
margin: 0 0 1.7em 0;
}
div#send {
float: left;
margin: 0 3em 1em 0;
}
div#sendReceive {
margin: 0 0 1em 0;
}
h1 {
margin: 0 0 1em 0;
}
h2 {
margin: 0 0 0.5em 0;
}
textarea {
color: #444;
font-family: 'Courier New', monospace;
font-size: 1em;
height: 7.0em;
padding: 0.5em;
}
</style>
</head>
<body>
<div id="container">
<div id="highlight">
<p>New codelab: <a href="https://codelabs.developers.google.com/codelabs/webrtc-web">Realtime communication with WebRTC</a></p>
</div>
<h1><a href="../index.html" title="simpl.info home page">simpl.info</a> RTCDataChannel</h1>
<!-- <p class="borderBelow">Check out the complete set of WebRTC demos at <a href="https://webrtc.github.io/samples/" title="WebRTC samples GitHub Pages">webrtc.github.io/samples</a>.</p>
-->
<div id="buttons">
<button id="startButton">Start</button>
<button id="sendButton">Send</button>
<button id="closeButton">Stop</button>
</div>
<div id="sendReceive">
<div id="send">
<h2>Send</h2>
<textarea id="dataChannelSend" disabled placeholder="Press Start, enter some text, then press Send."></textarea>
</div>
<div id="receive">
<h2>Receive</h2>
<textarea id="dataChannelReceive" disabled></textarea>
</div>
</div>
<p>View the console to see logging.</p>
<p>The <code>RTCPeerConnection</code> objects <code>localPeerConnection</code> and <code>remotePeerConnection</code> are in global scope, so you can inspect them in the console as well.</p>
<p>Code in this example used by kind permission of Vikas Marwaha.</p>
<p>For more information about PeerConnection, see <a href="http://www.html5rocks.com/en/tutorials/webrtc/basics/#toc-rtcdatachannel" title="RTCDataChannel section of HTML5 Rocks article about WebRTC">Getting Started With WebRTC</a>.</p>
<script src="js/main.js"></script>
<a href="https://github.com/samdutton/simpl/blob/gh-pages/rtcdatachannel" title="View source for this page on GitHub" id="viewSource">View source on GitHub</a>
</div>
<script src="../js/lib/ga.js"></script>
</body>
</html>