Client bridge exchange Media Stream between Jitsi and Kurento

I’m using Example lib-jitsi-meet (lib-jitsi-meet/example.js at master · jitsi/lib-jitsi-meet · GitHub) to connect to a room: conference. I also try to call Kurento server using webrtc and want to exchange Video and Aaudio between them.


  1. Init jitsi xmpp connection and join room name conference

  2. When onRemoteTrack fired in jitsi side, I start to call kurento connection and pass jitsi remote stream to Kurento client localStream.

  3. Then In Kurento UI i can view a stream that mix all jitsi stream in room conferecne.

  4. After that I got Kurento ontrack fired, then i start to call JitsiMeetJS.createLocalTracks by pass a mixed stream from Kurento.

  5. Finally I get a mixed stream of Kurento in other Jitsi meet UI.

It’s working perfectly with the example code provided by lib Jitsi

BUT, It’s not working when i try to convert to run this code in NODEJS by using wrtc library.

It’s just successfull running to Step 4. But I can not get a mixed stream that must be add to localtrack and other Jitsi participants can view the mixed stream.

You can view the picture to clearly understand my problem.(Problem in red line - mix stream, that can’t forward to other jitsi client):

(Sorry i can up only 1 picture =)) )

I log the Jitsi localDescription and in nodeJS code it’s not contain ssrc part.

Can anyone help me why am i missing. Thank you !!

1 Like

It’s an interesting project to link a JItsi Room to an other Media Server like Kurento.
It’s nice to see that you can make it work on a browser version with the lib-jitsi example.

But to make it work on a nodejs server I think the work will be more complexe.
In Jitsi every SDP must be transtate from XMPP and to XMPP jingle message an to do that the lib-jitsi-meet uses :

  • the native browser DOM to parse XMPP message
  • strophjs to build XMPP message

You can look at fromJingle and toJingle functions in lib-jitsi-meet/SDP.js at master · jitsi/lib-jitsi-meet · GitHub.

There are 2 problems in nodejs to use the lib-jitsi code :

  • no native DOM in nodejs (you can look at jsdom to add DOM in your nodejs code)
  • no recent strophjs port to nodejs.

So you should look closely at this SDP parsing/generation part in your nodeJs code.


1 Like

Thank you so much for replying my problem.

I forgot to note that, i’m using node-strophejs and have modified this library to connect with xmpp server. I also fake DOM in nodejs and it worked success to connect and get jingle message.

But do you have any information about ssrc in sdp, so if missing that other peer can’t get media stream.
Because in the First generation sdp this.peerconnection.createAnswer() (this will use wrtc lib) in TraceablePeerConnection.prototype._createOfferOrAnswer (github. com/jitsi/lib-jitsi-meet/blob/master/modules/RTC/TraceablePeerConnection.js) It already missing ssrc line (in browser code is not :frowning: ).

Could you have a quick look at localSDP of 2 version code:

I will look closely at SDP parsing/generation function you give, thank you so much :star_struck::star_struck::star_struck:.

You already made a good job if you can establish the XMPP connection to the jitsi room and start to establish the media signalisation with the jvb.
Do you plan to open source you work to the community ?

For your issue the the ssrc where did you record the SDP directly at wrtc level or at the jitsi traceablepeerconnection level ?
In the first case you may have an issue with wrtc usage or SDP or SDP a offer generation.
In the second case you may have issue with the SDP munging.

Thank you Damien,
The SDP above is logged in webrtc level, but there are difference in browser (browser webrtc built-in api) and in nodejs (usr wrtc).
And I’ve tried using this open source instead of jitsi GitHub - tiger2380/simple_sfu, it working well.

I will look deeper to sdp and about openning my source, i will fix this bug and think about it, our community will help to improve it a lot =))

Best Regards.

Hello @Ikemen27 ,
I’d be very interested in the project you are working on as we are thinking about exactly the same setup to use for recording meetings and then recode them offline. Maybe we could join forces?
I haven’t found any way how to DM you here, please contact me at in case you’d be interested to chat. Thanks!