From 099d2c02e1f0ca27bdeb0f81c43ed92f8d8ecd27 Mon Sep 17 00:00:00 2001 From: Filipi Fuchter Date: Mon, 14 Apr 2025 10:41:39 -0300 Subject: [PATCH] Fixing the voice agent example to always create the video transceiver. --- examples/p2p-webrtc/voice-agent/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/p2p-webrtc/voice-agent/index.html b/examples/p2p-webrtc/voice-agent/index.html index dea1bbccf..0692f5b7c 100644 --- a/examples/p2p-webrtc/voice-agent/index.html +++ b/examples/p2p-webrtc/voice-agent/index.html @@ -40,7 +40,9 @@ const createSmallWebRTCConnection = async (audioTrack) => { const pc = new RTCPeerConnection() pc.ontrack = e => audioEl.srcObject = e.streams[0] + // SmallWebRTCTransport expects to receive both transceivers pc.addTransceiver(audioTrack, { direction: 'sendrecv' }) + pc.addTransceiver('video', { direction: 'sendrecv' }) await pc.setLocalDescription(await pc.createOffer()) //await waitForIceGatheringComplete(pc) const offer = pc.localDescription