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:
<RTCView
mirror={true}
objectFit={'cover'}
streamURL={remoteStream.toURL()}
zOrder={1}
/>
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);
});
setLocalStream(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.