API REFERENCE · LIVE STREAMING
WHEP playback (WebRTC)
Each dubbed feed is a standard WHEP subscription: each speaker's translated voice on the original video, one endpoint per language.
01.One endpoint per language
Every output created with protocol: "whep" carries its own whep_url in the session response (Create a session). Any standard WHEP player subscribes to it -- the exchange mirrors WHIP: POST an SDP offer, receive the answer, media flows.
02.Play it in a browser
const pc = new RTCPeerConnection();
pc.addTransceiver("video", { direction: "recvonly" });
pc.addTransceiver("audio", { direction: "recvonly" });
pc.ontrack = (e) => {
document.querySelector("video#es").srcObject = e.streams[0];
};
const offer = await pc.createOffer();
await pc.setLocalDescription(offer);
const res = await fetch(
"https://live.thefamiliarlab.com/whep/live_77aq2c/es",
{
method: "POST",
headers: { "Content-Type": "application/sdp" },
body: offer.sdp,
},
);
await pc.setRemoteDescription({ type: "answer", sdp: await res.text() });That is the whole client: a viewer picks Spanish, you open the Spanish whep_url, the dubbed stream plays in the <video> tag. One RTCPeerConnection per language a viewer watches. Connectivity is standard ICE, with TURN over TLS provided for networks that block UDP -- viewers behind corporate firewalls need no configuration.
03.What each feed carries
- The translated voice for everyone on camera, each speaker in their own voice, on the original video.
- The scene intact: music and ambience pass through untouched.
- A steady delay behind the original -- constant per session, so overlays and chat can be offset once (Timing & behavior).
04.Access
The API is enterprise-only: private access under a Studio contract, with volume pricing, raised limits, and a named point of contact for the integration. Book a call and your key is issued with the contract.