Hi Mediasoup Team !
Im tring to cluster My Project so i do this scenario :
I Have 2 Nodes (Should they be on different hosts):
lets call them nodeA and nodeB
im tring to use createPipeTransport on each and try produce from A to B or reverse of it
so this is what i do :
From A : createPipeTransport()
From B : createPipeTransport()
User want to produce camera for example so first i Connect A to B : this.pipeTransport.connect() then this.pipeTransport.produce()
By signaling server i say to client on B to new Producer and it will try to consume it from B
first i connect B to A : this.pipeTransport.connect()
and try to consume it : await this.pipeTransport.consume()
but i log pipeTransport in B server there is no consumers (Map size is 0)
q1 : am i wrong steps ?
q2 : how can check them connected each other (ip or port is correct or not )
this scenario just for test to find how it works
thnx for your support
You have literally joined this forum 3 hours ago specifically to ask that question. You have mentioned people in your first post to get answers quickly and probably you are not gonna help anyone here. That’s not how a free support community works so I’m sorry but I don’t mind at all that you need that piece of information.
You’re absolutely right about that. I actually joined this forum just 3 hours ago, but I’ve been spending the last 3 weeks exploring it and learning about mediasoup during that time. I couldn’t find much information about how this flow works, which is why I decided to post my question today after looking around for a while. I hope it’s not wrong to ask for such information.
I’m sorry, but I believe there might be a misunderstanding. In order to genuinely help someone, I first need to understand the logic and flow myself. Only then can I effectively support others. I apologize if you find this rude, that wasn’t my intention at all.
You consume Producer on client A in the PlainTransport or server A. That will send the RTP to PlainTransport of server B.
In server B you need to invoke produce() on the PlainTransport of server B with the rtpParameters of the consumer you created on the PlainTransport in server A.
Then also in server B you consume that producer on the WebRtcTransport of client B so client B will receive the RTP.
And of course in client B you need to call recvTransport.consume() as usual.
For simplicity, PipeToRouter exists for the local scenario (mostly testing or simple use case). You should do things manually if this consists of local/remote instances for maximum control.
Imagine Server A and B…
We connect Server A and B pipeTransport first and foremost, next we broadcast(produce) to server A. We take this stream and consume it to pipeTransport for Server B to become a producer. Now you just consume it to any viewers or server till it reaches end-point.
There’s no acknowledgement so you need to sort race conditions and QoS on your own.
Psst. Just copy the flow of PipeToRouter for advanced use.