-
Notifications
You must be signed in to change notification settings - Fork 0
/
rtctest.html
29 lines (26 loc) · 1.38 KB
/
rtctest.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
---
layout: page
title: webRTC Test
---
<div id='setupBox'>
<p>This is a test of webRTC data channels that allows for texting with a friend.
You will need to share an "offer" with a friend (ironically via another messaging solution),
and they should share an "answer" with you or vise versa.
By sharing these two peices of information,
your browsers can find a peer to peer connection with one another to start a text chat</p>
<button onclick="rtc.getOffer()" type="button" name="getInfo">Get Offer</button>
<p>Copy and send offer/answer when it appears below to friend {bracket to bracket} </p>
<p id=offerAnswerResults> offer or answer to copy to friend will show up here</p>
<br>
<label for="offerAnswerInput">Paste offer or answer from friend here</label>
<textarea id="offerAnswerInput" rows="10" cols="80"></textarea>
<button onclick="rtc.offersAndAnswers()" type="button" name="connectFriend">submit offer or answer</button>
<br>
</div>
<h2 id='connectionMsg'></h2>
<div id='receiveBox'></div>
<textarea id="sendBox" rows="1" cols="80"></textarea>
<button onclick="app.sendMsg()" type="button" name="getInfo">Send Message</button>
<!--This was tested in Chrome, commenting in line below may increase compatibility-->
<!--<script src="https://webrtc.github.io/adapter/adapter-latest.js"></script>-->
<script type="text/javascript" src="{{ site.url }}/assets/js/rtctest.js"></script>