2017-10-21 14:27:29 +00:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<!--
|
|
|
|
|
vim: set sts=2 sw=2 et :
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Demo Javascript app for negotiating and streaming a sendrecv webrtc stream
|
|
|
|
|
with a GStreamer app. Runs only in passive mode, i.e., responds to offers
|
|
|
|
|
with answers, exchanges ICE candidates, and streams.
|
|
|
|
|
|
|
|
|
|
Author: Nirbheek Chauhan <nirbheek@centricular.com>
|
|
|
|
|
-->
|
|
|
|
|
<html>
|
|
|
|
|
<head>
|
2020-04-15 08:08:40 +00:00
|
|
|
|
<meta charset="utf-8"/>
|
2018-03-31 16:54:15 +00:00
|
|
|
|
<style>
|
|
|
|
|
.error { color: red; }
|
|
|
|
|
</style>
|
2017-10-21 14:27:29 +00:00
|
|
|
|
<script src="https://webrtc.github.io/adapter/adapter-latest.js"></script>
|
|
|
|
|
<script src="webrtc.js"></script>
|
|
|
|
|
<script>
|
|
|
|
|
window.onload = websocketServerConnect;
|
|
|
|
|
</script>
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
<body>
|
2019-04-12 07:35:38 +00:00
|
|
|
|
<div><video id="stream" autoplay playsinline>Your browser doesn't support video</video></div>
|
2017-10-21 14:27:29 +00:00
|
|
|
|
<div>Status: <span id="status">unknown</span></div>
|
2018-09-21 13:03:43 +00:00
|
|
|
|
<div><textarea id="text" cols=40 rows=4></textarea></div>
|
2020-11-27 09:16:52 +00:00
|
|
|
|
<br/>
|
|
|
|
|
<div>
|
|
|
|
|
<label for="peer-connect">Enter peer id</label>
|
|
|
|
|
<input id="peer-connect" type="text" name="text">
|
2021-02-09 09:46:11 +00:00
|
|
|
|
<input id="peer-connect-button" onclick="onConnectClicked();" type="button" value="Connect">
|
2021-02-09 09:58:57 +00:00
|
|
|
|
<!-- Request the peer to send the offer by sending the OFFER_REQUEST message.
|
|
|
|
|
Same as the --remote-offerer flag in the sendrecv C example -->
|
|
|
|
|
<input id="remote-offerer" type="checkbox" autocomplete="off"><span>Remote offerer</span>
|
2020-11-27 09:16:52 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
2017-10-21 14:27:29 +00:00
|
|
|
|
<div>Our id is <b id="peer-id">unknown</b></div>
|
2018-03-31 19:37:51 +00:00
|
|
|
|
<br/>
|
|
|
|
|
<div>
|
|
|
|
|
<div>getUserMedia constraints being used:</div>
|
|
|
|
|
<div><textarea id="constraints" cols=40 rows=4></textarea></div>
|
|
|
|
|
</div>
|
2017-10-21 14:27:29 +00:00
|
|
|
|
</body>
|
|
|
|
|
</html>
|