Hey!
Im trying to create a simple app where users can share their cameras and hear each other.
The audio works perfectly fine, but the video just doesn’t play. I’ve followed through all the instructions are the mediasoup docs (At least I very much hope so) but I still cant get the video to work.
Here is my client side:
const consumers = getConsumers()
let videoTrack: MediaStreamTrack | null = null
let audioTrack: MediaStreamTrack | null = null
for (const consumer of consumers) {
if (consumer.kind === 'video') {
videoTrack = consumer.track
await webRtcConnection.signallingChannel.resume(consumer.id)
} else {
audioTrack = consumer.track
}
}
# ... later on
peerVideo.srcObject = new MediaStream([ videoTrack ])
peerVideo.play()
peerAudio.srcObject = new MediaStream([ audioTrack ])
peerAudio.play()
Any help is greatly appreciated. Thanks in advance