API REFERENCE · LIVE STREAMING
WHEP playback (WebRTC)
The planned playback leg (experimental): each dubbed feed as a standard WHEP subscription, 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 will be able to subscribe 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 planned client: a viewer picks Spanish, you open the Spanish whep_url, one RTCPeerConnection per language watched. Connectivity is standard ICE, with TURN over TLS to be provided for networks that block UDP, so viewers behind corporate firewalls need no configuration.
03.What each feed will carry
- 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 constant per-session offset from the source, 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, ProRes masters on request, and a named point of contact. Book a call and your key is issued with the contract.