async function connectRecvTransport() {
await socket.emit('consume', {
rtpCapabilities: device.rtpCapabilities,
}, async ({params}) => {
if (params.error) {
console.log(params.error);
return;
}
console.log(typeof params)
consumer = await consumerTransport.consume({
id: params.id,
producerId: params.producerId,
kind: params.kind,
rtpParameters: params.rtpParameters,
});
const {track} = consumer;
remoteVideo.srcObject = new MediaStream([track]);
socket.emit("consumer-resume")
});
}
So! Here we have a bit of a weird problem, as you can see I am getting the error that params is not an object, even though when I check the type it is? Is this a mediasoup problem or on my side?