The Red5 Pro WebRTC SDK lets you add live streaming to any browser-based application without plugins. It uses WebRTC under the hood — with WHIP for publishing and WHEP for subscribing — to deliver sub-second latency audio and video directly in HTML5. Use it for video chat, interactive live broadcasts, online gaming, or any application that needs real-time peer-to-peer media in the browser.
Use cases
- Live broadcasting — publish a camera feed from a web page at sub-second latency
- Video chat — real-time two-way audio and video between participants
- Online gaming — low-latency video feeds for interactive experiences
- Remote monitoring — browser-based camera publish with lightweight subscribe playback
Installation
Key concepts
The SDK is built on the WHIP/WHEP protocol stack:
- WHIP (WebRTC-HTTP Ingestion Protocol) — used for publishing. Your browser sends an SDP offer to the server over HTTP, and the server negotiates the connection.
- WHEP (WebRTC-HTTP Egress Protocol) — used for subscribing. Your browser requests a stream from the server over HTTP and renders the incoming media.
Both protocols run over standard HTTPS, which means they work through firewalls and proxies that block raw WebSocket or RTP traffic.
Minimal publish example
The following example publishes a webcam stream to a Red5 Cloud deployment.
Minimal subscribe example
The following example subscribes to an existing stream and plays it in a <video> element.
Configuration options
Pass these properties in the config object to both WHIPClient and WHEPClient.
For Red5 Cloud deployments, use the Stream Manager hostname from your deployment’s Pub/Sub Details page as the host value. The SDK handles node resolution automatically.
TypeScript support
The SDK ships with TypeScript declarations. Import types directly:
Further resources