Basically when I try to consume over a consumerTransport, it gives the error
Producer 245e5f88-4509-4411-a8b0-7331d7acdc87 is closed: false
Producer transport c65146d8-c630-4108-adcf-dcda9fe6ea7b is closed: false
Router 4f4fff3d-73fd-4bb5-bec5-aa3a9f4bb07c is closed: false
Producer with id "245e5f88-4509-4411-a8b0-7331d7acdc87" not found
The main difference is that nothing seems to be closed, I’m logging this through the following code:
console.log(`Producer ${producer.id} is closed: ${producer.closed}`)
console.log(`Producer transport ${producerTransport.id} is closed: ${producerTransport.closed}`)
console.log(`Router ${router.id} is closed: ${router.closed}`)
console.log(error.message)
When trying to consume through the producerTransport it seems to always find the producer but returns a black image.
You’re likely not following proper asynchronous practice and/or utilizing queues to handle the order of operation.
I imagine this in a few steps:
Create Transport (Client)
Create Transport (Server)
Produce/Connect (Client)
Consume/Connect (Server)
You are likely doing all these out of order if the above async/queue practice is not appropriately applied.
So if the produced item is not yet produced by the server and the server is taking the next request to have this produced item to consume it you will error out each time but if you just waited it’d be there.
That example is not one I can help you with, or any as a matter of fact, I don’t use them but can suggest you rely on the official ones before a side-project first.
As for that second question, you can pre-load capabilities client sided there should be no issues but some may want dynamic ability correct; but idea there is as long as the requirements are of a match nothing should go wrong with that approach and you can go ahead and activate your mediasoup client device immediately.
It will be some issue in the code, you will have to check and test where the issue happens. You can try running the demo app to trace out the issue in code.