The HTML page implements a simple WebRTC Client script to demonstrate the use of DSL's Websocket Server and WebRTC Sink APIs. The client can be used with the following Python examples.
Important Note: The current WebRTC implementation is based on the webrtcbin plugin only available with GStreamer 1.18 or later.
The javascript implements two browser window functions:
Opens a Websocket connection using the following configuration parameters
var config = { 'iceServers': [{ 'urls': 'stun:stun.l.google.com:19302'}] }
var wsHost = "localhost";
var wsPort = 60001;
var wsPath = "ws";
Closes the Websocket connection - before the browser window unloads - on window/tab close.
The script implements the following WebRTC signaling functions.
onLocalDescription
onIncomingSDP
onIncomingICE
onTrack
onIceCandidate
onDataChannel