gstreamer/webrtc/sendrecv/js/index.html
Nirbheek Chauhan f8cbae9d6e sendrecv: Implement remote-offerer option for JS example
Now you can check the "Remote offerer" checkbox in the JS example to
force the peer to send the SDP offer. This involved implementing
support for receiving the OFFER_REQUEST message in the C example.

As a side-effect of this, the C example will no longer send
OFFER_REQUEST automatically when the --our-id option is passed. It
will only do so when the --remote-offerer option is explicitly passed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/31>
2021-02-10 16:23:40 +05:30

46 lines
1.5 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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>
<meta charset="utf-8"/>
<style>
.error { color: red; }
</style>
<script src="https://webrtc.github.io/adapter/adapter-latest.js"></script>
<script src="webrtc.js"></script>
<script>
window.onload = websocketServerConnect;
</script>
</head>
<body>
<div><video id="stream" autoplay playsinline>Your browser doesn't support video</video></div>
<div>Status: <span id="status">unknown</span></div>
<div><textarea id="text" cols=40 rows=4></textarea></div>
<br/>
<div>
<label for="peer-connect">Enter peer id</label>
<input id="peer-connect" type="text" name="text">
<input id="peer-connect-button" onclick="onConnectClicked();" type="button" value="Connect">
<!-- 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>
</div>
<div>Our id is <b id="peer-id">unknown</b></div>
<br/>
<div>
<div>getUserMedia constraints being used:</div>
<div><textarea id="constraints" cols=40 rows=4></textarea></div>
</div>
</body>
</html>