How do I connect custom node.js backend to jicofo (BridgeChannel)

Hi guys,

As title says, how can I connect custom node.js backend to jicofo (so it can recieve colibri messages, or better yet so it can act as participant), I debugged lib-jitsi-meet and figured out following:

Participants are establishing bridgeChannel connection in two ways, websockets or webRTCDataChannel. I started implementing backend functionality in similar manner, but I am not sure when are participants using websockets and when webRTCDataChannel. Also is there some key data that needs to be setup in order for backend to connect using webRTCDataChannels, I extracted stun server url but I guess that is not all that needs to be done. And last but not least, is this possible at all to do this because we all know that webRTC is browser technology.

Once again final goal is for node.js backend to be able to receive same messages that all the other participants are receiving.

NOTE: I already did xmpp client implementation on the backend, so backend is currently receiving xmpp presence messages, so this is the next step.

Thanks in advance

What is the final goal? I was looking at some point around node webrtc implementations and can that be used to create like bots, but there was no way to push data … even though there are webrtc node impl which probably can be used with lib-jitsi-meet.

webRTCDataChannel is used for communication with the bridge informing about what resolution is needed, who is on stage, is it tile view with lower res … etc. That channel is also used by clients to exchange stats data which is shown in jitsi-meet for each participant, like packet loss and bandwidth.

The other websocket is for xmpp signaling.

Hey damencho, I can reply on Kenan’s behalf here since we’re on the same team but he may not be able to reply for a while due to time zones.

Our setup is that we are using Jitsi to power an application which also has a node.js server to handle other stuff for that application. For example, our application places users in a virtual world where their video tiles are projected and our node.js server handles a lot of other interactions that happen in that virtual world.

We are already using existing Jitsi data channels to communicate messages between clients (for example, when each client moves within the virtual world, we send the new coordinates out to all other clients). We would like our node.js server to be able to receive those messages as well. That’s essentially the final goal.

Thanks in advance for your help!

Just a note that we’ve moved to a websocket-based bridge channel between participants and the bridge as well (the sctp-based datachannel one is no longer really supported), so that should make it easier to establish that connection in node.

There’s an EndpointMessage type which allows endpoints to broadcast arbitrary messages to all other endpoints in the conference, via the bridge.