forked from miguelpdl/WebRTC-codelab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathobjectives.html
68 lines (54 loc) · 3.04 KB
/
objectives.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
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<title> Stream arbitrary data with RTCDataChannel </title>
<link rel="stylesheet" href="./style/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="./style/clarity.css" type="text/css">
<link rel="stylesheet" href="./style/highlight.css">
<script src="./style/highlight.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<div class="container-fluid">
<!----------------------------------------------------------------------------------------->
<style> body { padding-top: 60px; } </style> <div class="navbar navbar-fixed-top">
<p id="title">Stream arbitrary data with RTCDataChannel </p>
<div class="navbar-inner">
<ul class="nav">
<li class="active"><a href="objectives.html">Objectives</a></li>
<li><a href="step01.html">01</a></li>
<li><a href="step02.html">02</a></li>
<li><a href="step03.html">03</a></li>
<li><a href="step04.html">04</a></li>
<li><a href="step05.html">05</a></li>
<li><a href="step06.html">06</a></li>
<li><a href="step07.html">07</a></li>
</ul>
<p class="navbar-text pull-right"> <a href="http://miguelpdl.github.io/WebRTC-codelab/"> WebRTC Code Lab</a> </p>
</div>
</div>
<!----------------------------------------------------------------------------------------->
<h2 id="stream-arbitrary-data-with-rtcdatachannel">Stream arbitrary data with RTCDataChannel</h2>
<p>The purpose of this session is to use the <a href="http://dev.w3.org/2011/webrtc/editor/webrtc.html#peer-to-peer-data-api">WebRTC API RTCDataChannel</a> to send text between two textareas on the same page.</p>
<p>In the session we shall set up a connection between two peers on the same page using the the RTCPeerConnection API just like the previous session and we shall send text between them, again of limited use, but a good way for understanding how RTCDataChannel works.</p>
<ul>
<li>Create a new HTML5 document. (Yes another new one just to be safe).</li>
<li>Add two text areas and associated buttons.</li>
<li>Add JavaScript to the script element on the HTML5 page, to enable the WebRTC API RTCDataChannel.</li>
<li>View your page from <em>localhost</em>.</li>
<li>Bonus points of the session.</li>
</ul>
<!----------------------------------------------------------------------------------------->
<div id="footer">
<p id="footertext">
Prepared by Miguel Ponce de Leon ([email protected]). Except where otherwise noted, this content is licensed under a
<a class="externalLink" href="http://creativecommons.org/licenses/by-nc/3.0/"
title="External link to http://creativecommons.org/licenses/by-nc/3.0/"
target="_blank">Creative Commons Attribution-NonCommercial 3.0 License
</a>
</p>
</div>
</div>
</body>
</html>