* python3 -m pip install --user websockets
* run `python3 sendrecv/gst/webrtc-sendrecv.py ID` with the `id` from the browser. You will see state changes and an SDP exchange.
+> The python version currently requires the master branches from `gst-plugins-bad` and `gst-plugins-base`.
+
+<!---
+TODO: replace the note above when 1.16 is released
+-->
+
With all versions, you will see a bouncing ball + hear red noise in the browser, and your browser's webcam + mic in the gst app.
You can pass a --server argument to all versions, for example `--server=wss://127.0.0.1:8443`.
def send_sdp_offer(self, offer):
text = offer.sdp.as_text()
- print ('Sending offer:\n%s', text)
+ print ('Sending offer:\n%s' % text)
msg = json.dumps({'sdp': {'type': 'offer', 'sdp': text}})
loop = asyncio.new_event_loop()
loop.run_until_complete(self.conn.send(msg))
sdp = msg['sdp']
assert(sdp['type'] == 'answer')
sdp = sdp['sdp']
- print ('Received answer:\n%s', sdp)
+ print ('Received answer:\n%s' % sdp)
res, sdpmsg = GstSdp.SDPMessage.new_from_text(sdp)
answer = GstWebRTC.WebRTCSessionDescription.new(GstWebRTC.WebRTCSDPType.ANSWER, sdpmsg)
promise = Gst.Promise.new()