batondocs← SiteSign in
Integrations/mediasoup

mediasoup

mediasoup relays its own media server-side, but client transports still use a browser RTCPeerConnection — pass iceServers when you create the send/recv transport.

client.js (mediasoup-client)
const { iceServers } = await fetch("/api/ice").then(r => r.json());

const sendTransport = device.createSendTransport({
  ...serverTransportParams,
  iceServers,
  iceTransportPolicy: "all"
});

Apply the same options to createRecvTransport. Use iceTransportPolicy: "relay" temporarily to confirm the relay path works end to end.