Unified Plan - can't see video

I can hear audio on both devices but can’t see video on either device. I have set zOrder properly, so that’s not the issue. My ICE connections are all successful, my connectionstatechange listener shows the connection state as connected.

I think i’m just adding the wrong thing to RTCView streamURL:


I add local stream by doing the following:

const stream = await mediaDevices.getUserMedia({
   audio: true,
   video: true

// add tracks to peer connection stream
stream.getTracks().forEach(track => {
   peerConnection.addTrack(track, stream);


I set the remote streams for each device by doing the following:

peerConnection.addEventListener('track', event => {
   if (event?.streams) {
      setRemoteStream(new MediaStream(event.streams[0]));

Am i adding the wrong thing to setRemoteStream in the event listener above?
Any help would be greatly appreciated.

Thank you.

Have you tried to replace
setRemoteStream(new MediaStream(event.streams[0]));

@nickmccomb Can you share full example here? I have similar problems.