I’ve searched the forums as thoroughly as I can and am hoping this particular question has not been answered before
I’m currently trying to port an existing media server backend to mediasoup and the existing system runs in multiple regions. When a client connects to one of my existing media servers, it starts by generating an sdp offer, it sends the offer to my matcher service via an HTTPS request, which identifies the ideal region for the client’s room, asks the region directly to create a room and supply an sdp answer, and then responds to the client’s request with that answer. The client can then use the answer to open its webrtc connection directly with the media server and any future signaling for audio/video is done via a data channel.
This works great, but is incompatible with how mediasoup’s client libraries require the client to be the answerer for receive transports. I’d have to put in multiple requests to our matcher service which would be too expensive and is not designed for continuous signaling.
My original idea was to use the matcher signaling to establish a data channel via mediasoup, and then use that data channel for all signaling for the video send/receive transports. However, it looks like those also use separate DataConsumer / DataProducers.
So my question is: can I use a DataConsumer/DataProducer on the same transport with mediasoup-client in order to establish my signaling data channel?
I imagine the answer to that question will be “No.” - My follow-up question would be, would you recommend using vanilla webrtc for this data channel connection (as it seems the server doesn’t have this limitation), or should I just use a web socket and essentially create my own offer/answer protocol to establish the web socket connection securely and ensure only entitled clients can connect to room servers.
I prefer the webrtc datachannel approach because it uses the same protocol and I know that if the connection is established that future transports will also be able to connect, but I understand it might not be worth fighting to keep.