How to add media stream to a producer

This simply mean the media is not flowing, which suggests that there is some configuration issue on your side. Have you tried it without docker? If no then do it, it will simplify things for you. Free yourself from the complexity of this docket setup for the moment.

Also try running mediasoup demo on your local system and see what you are doing wrong.

Not at all, i don’t ignore what you are telling me.
Maybe if you provide me with some exemple ?

Yes sorry, each time i try without docker i have other issues i resolved by setting up a docker.
I will resolve that and try without docker

This is what I said. You have just send some webrtc-internals of some producer. You have ignored the other bullets.

1/ I created a listener when i create a transport like this:

transport.on("icestatechange", (iceState) => {
    console.log(`ICE state changed to ${iceState}`);
});

This is my log:

ICE state changed to connected
ICE state changed to completed
ICE state changed to disconnected

If i do a connection, the connection is making.
Then the connection is working.
Then if i disconnect it disconnect.
But nothing when the consumer connect to it.

2/ Ensure you don’t create the mediasoup side Consumer in paused mode.
The media stream is not paused i did “play()” on my video element, but maybe i have to do something similar on the consumer and not the video element itself ?
But my media track is muted to true, i tried to change it to false in consumer side but it stay at true.

3/ Checks stats periodically via consumer.getStats() or via chrome://webrtc-internals.
It’s what i did in my previous comment, it’s what my producer was ssending.
Do you see something abnormal ?
For me it seems ok.

The consumer (client-side) receives what the producer are sending from the server, not directly from the producer. Why are looking at the producer’s webrtc-internals? That’s another connection.

To be sure producer is well sending the media track, but it seems ok from producer side and consumer side.
I tried to run my server on local without docker but i have other error, i think it’s because i am running on windows and it could be case sensitive.
I have this error:

Node NOT Exiting...
uncaughtException
./node_modules\mediasoup\worker\out\Release\mediasoup-worker ENOENT

So i will stay with docker i guess, but it can bring issue, maybe my issue come from there like we said.
But i have so much problem without docker…

When i check the consumer side, in inbound-rtp i have nothing, i guess it’s not normal ?

I tried to change my muted from true to false, but it’s not working like that

I have a question, is it possible to know wich port is using a transport ?
Maybe if 2 transports is not using the same port it can’t be reached ?

This is a probator - a technical record, created by mediasoup client for its own purposes. Look for the inbound-rtp’s where mid is a number.

It is in the very same statistics. Expand local-candidate or remote-candidate - there is an address and a port.

i have nothing for the outbount in consumer side.
It’s what you asked ?

Producer side is sendiong media stream when i check the outbound-rtp:

So the issue come from the server who’s not sending the media or an issue in my consumer for me.
Can you confirm me that ?

btw i am thinking, do i still need stun and turn server in client side even if i am using my sfu server ?

Producer seems ok, you have some issue with consumer side. If producer is sending the data correctly then it means there is no connection problem. You might not be consuming correctly.

Make sure you are not consuming and producing on the same transport, you should either produce or consume.

Make sure the producer id you are sending to server, device rtp capabilities are correct.
You should consume from the same router on which producer resides.

There is a canConsume() method on server which tells whether we can consume a producer or not.

No if you don’t want to use your custom stun/turn server on your side especially turn server.

maybe i see where the problem can come from.
For a producer, i can’t and don’t have to use the createWebRtcTransport method for a consumer but for a producer it’s ok ?

I used createWebRtcTransport for producer and consumer for creating my transport.
Am i right ?
I don’t know if the problem can come from there.

On server side ‘createWebrtcTransport’ is used to create transport for both producer, consumer.
On client side ‘createRecvTransport’ is used to create transport for consumer and ‘createSendTransport’ is used to create transport for producer.

One thing remains common which is you can’t produce and consume together on one single transport they are one way either produce or consume.

Yes so everything looks fine in my code.
I was thinking maybe i had to use createPlainTransport instead of createWebRtcTransport.