Hey there…
I have a problem with the mediasoup-client device.load while providing routerRtpCapabilities. I got router capabilities with socket.io and passing it to the device.load and got caps in not an object error.
After read of code, i found that the parameter passed is undefined in the load function. As the parameter is not getting the real value of the capabilities.
thanks your answer,but the problem again.
My code is
const rtpCapabilities = JSON.parse(rtpCapabilities_json);
console.log(rtpCapabilities);
var caps = {rtpCapabilities: rtpCapabilities};
await device.load(caps);
The problem is, although I am not seeing any errors, and the object seems built correctly, Device.loaded returns false, so accessing any of those values is not possible.
Again, I ask for help, if this takes much longer I’m going to be forced to ditch media-soup as a platform and go for a simpler solution.
I did solve this eventually, I’m new to JS and haven’t used Async functions before in js. This was an issue with waiting for the device to load before doing the later stuffs, completely my fault and not mediasoup related.