Sharing WebRTC video to third parties with PlainTransport?

Hi everyone,

I am unfortunately struggling a bit with a very basic topic and was hoping I could get some help from the mediasoup community, as there are already great examples for something similar I am trying to achieve e.g. at mediasoup-demos/README.md at master · Kurento/mediasoup-demos (github.com)

My goal: Giving a third party access to a stream that is shared using the regular WebRTC connectivity as an RTP stream.

My current solution strategy:

  1. The third party can send a POST request to the SFU, telling it the video it wants, its IP and a port.
  2. I create a plainTransport for this third party with comedia and rtcpMux both being false
  3. Based on their information, I first get the producerId of the relevant video producer and create a corresponding consumer on this PlainTransport (paused: true)
  4. Using this and the given IP and port, I connect the PlainTransport
  5. Finally, I resume the consumer

My assumption would be that afterwards, mediasoup should send the RTP packages out to the given destination. However, monitoring this with Wireshark it looks like no packages are being sent to the given port, although I have no error logs and all my steps are successful.

Is there something wrong with my approach and I am misunderstanding/missing something critical, or should this setup already lead to packets being sent? Or is it somehow required to register a program on the port before anything is even attempted to be sent? I tried receiving the content with VLC, but the way I see it I would actually need to connect that to my local port after I already receive the packages, so I feel like I am doing something wrong way earlier.

Thanks a lot for any leads/help :).

Upon further investigation it actually looks like the approach is correct in general. The traffic was just blocked on my firewall and locally I am unable to receive the content through ffplay or similar mechanisms, probably some sort of SDP issue as ffplay complains requiring sdp for the specific rtp type otherwise (which at least indicates something is there that is in a correct format).