WebRTC (Web Real-Time Communication) enables ultra-low-latency streaming directly from the browser with no encoder software required. WAVE’s WebRTC implementation delivers sub-second latency (typically 200-500ms) with adaptive bitrate and automatic quality adjustment.
WebRTC is ideal for scenarios where latency matters more than production polish:
For traditional one-to-many broadcasting where a few seconds of latency is acceptable, RTMP or SRT may be more appropriate due to their wider encoder compatibility.
When you start a WebRTC stream, your browser and the WAVE media server perform an ICE (Interactive Connectivity Establishment) negotiation to find the best network path between them. WAVE operates globally distributed STUN and TURN servers to ensure connectivity even behind corporate firewalls and symmetric NATs.
{% stepper %} {% step title=“Signaling” %} Your browser connects to the WAVE signaling server over a secure WebSocket. It sends an SDP (Session Description Protocol) offer describing the media tracks and supported codecs. {% /step %}
{% step title=“ICE negotiation” %} Both sides gather ICE candidates (network addresses) using STUN and TURN servers. WAVE’s media server selects the optimal candidate pair based on latency and reliability. {% /step %}
{% step title=“Media flow” %} Once the peer connection is established, audio and video flow directly from your browser to WAVE’s edge server over encrypted DTLS/SRTP. WAVE then transcodes and distributes the stream to viewers. {% /step %} {% /stepper %}
WAVE provides managed STUN and TURN infrastructure at no additional cost. The servers are automatically configured when you use the WAVE JavaScript SDK or the built-in browser streaming interface.
If you are building a custom integration with the WAVE API, use the following STUN/TURN configuration:
STUN server: stun:stun.wave.online:3478
TURN server: turn:turn.wave.online:3478
TURN (TLS): turns:turn.wave.online:5349
{% callout type=“warning” title=“Firewall configuration” %} If your network blocks UDP traffic, WebRTC falls back to TURN relay over TCP port 443. This adds approximately 50-100ms of latency. For the best experience, ensure UDP ports 10000-60000 are open for outbound traffic. {% /callout %}
Simulcast sends multiple quality layers simultaneously, allowing WAVE to serve each viewer the optimal resolution based on their bandwidth. This is recommended for streams with more than 50 concurrent viewers.
To enable Simulcast in the WAVE SDK:
const stream = await wave.createStream({
protocol: "webrtc",
simulcast: true,
layers: [
{ width: 1920, height: 1080, bitrate: 5000000 },
{ width: 1280, height: 720, bitrate: 2500000 },
{ width: 640, height: 360, bitrate: 800000 },
],
});
{% callout type=“info” title=“Automatic layer selection” %} When Simulcast is enabled, WAVE’s edge server automatically promotes or demotes viewers between quality layers based on real-time bandwidth estimation. No viewer action is required. {% /callout %}
{% platform os=“macos” %} On macOS, Safari requires the user to grant screen recording permission in System Settings > Privacy & Security > Screen & System Audio Recording if you want to share your screen via WebRTC. Camera and microphone permissions are requested in-browser. {% /platform %}
{% platform os=“windows” %} On Windows, ensure your browser has permission to access the camera and microphone in Settings > Privacy > Camera and Settings > Privacy > Microphone. Some enterprise group policies may block WebRTC entirely — contact your IT administrator if you encounter issues. {% /platform %}
{% platform os=“linux” %}
On Linux, WebRTC performance depends on your PulseAudio or PipeWire configuration. If you experience audio echo or feedback, ensure that monitor sources are not accidentally captured. Use pavucontrol to verify which audio devices your browser is using.
{% /platform %}
If your WebRTC stream fails to connect, the most common causes are:
turn.wave.online.{% troubleshooter issue=“webrtc-connection-failed” /%}
{% related-articles /%}