Ok, so here's the conclusions,
RTP Forward for me at least is not working when I make use of the new API if I forward a stream that comes from Firefox (or some mobile devices) but it works if it comes from chrome.
If I switch and make use of the old api (on the same janus build), it works always.
I tried to read the code of the videoroom plugin but I'm getting lost and can't find what's causing that issue.
This is the request we use for forwarding with the new API:
***********************************
request: "rtp_forward",
room: this.videoRoomId,
publisher_id: this.publisherId,
host: "127.0.0.1",
host_family: "ipv4",
streams: [
{
port: Number(this.audioPort),
pt: 111,
mid: this.audioStream.mid,
},
{
port: Number(this.videoPort),
pt: videoPt,
mid: this.videoStream.mid,
},
],
********************************
audioStream and videoStream mids are well defined, and come directly from the corresponding data from Janus.
For the old api we use this request:
*************************************
request: "rtp_forward",
room: this.videoRoomId,
publisher_id: this.publisherId,
host: configProvider.CURRENT_IP_FOR_RTP_FORWARD,
host_family: "ipv4",
audio_port: Number(this.audioPort),
video_port: Number(this.videoPort),
audio_pt: 111,
video_pt: videoPt,
*************************************
With the old api, it always work, with the new one only for chrome, so it's making nonsense. Maybe the problem is not the RTP Forwarder itself and it's in the reception of the streams or it's me using things incorrectly.