Broadcast live from the browser using WebRTC and the Livepeer Broadcast component or custom WHIP.
In-browser broadcasting sends live video from the user’s device to Livepeer over WebRTC (e.g. WHIP), without OBS. It is optimized for low latency by default.
Flow
Create a stream via the API and get a stream key.
Open a WebRTC connection to Livepeer ingest using that key (STUN/TURN required).
Capture camera, microphone, and/or screen in the browser and send over WebRTC.
Viewers watch via the stream playback ID in the Livepeer Player.
Using the Broadcast component
With @livepeer/react, use the Broadcast primitives and the stream ingest URL:
import * as Broadcast from "@livepeer/react/broadcast";import { getIngest } from "@livepeer/react/external";const streamKey = "your-stream-key";export function DemoBroadcast() { return ( <Broadcast.Root ingestUrl={getIngest(streamKey)}> <Broadcast.Container> <Broadcast.Video title="Live stream" /> <Broadcast.Controls> <Broadcast.EnabledTrigger /> </Broadcast.Controls> </Broadcast.Container> </Broadcast.Root> );}