Peer to peer data channel

Dear All,

For two peers, is there a way to send text messages without going through the video bridge server? I know the webrtc datachannel is peer-to-peer, but seems Jitsi prefers websocket. If we use the web socket, I wonder if we can make the connection just between the two clients (peers). Thank you.

Sincerely,
Jay

well, there is the xmpp server (Prosody IOW)

Thanks gpatel-fr for the reply. Is it possible to avoid any server in between? I’m sending messages very frequently between two peers. Thanks.

Possibly, but this forum is about Jitsi-meet. This is a server software. If you want help about straight webrtc you are not in the right place.

We followed the example code of the lib-jitsi-meet to create a Jitsi client. After a room is created, the below code (callback function) is used waiting for the data channel to be opened.
room.rtc.addEventListener(‘rtc.data_channel_open’, () => {}); (The callback did fire)

I wonder if the “rtc.data_channel” is a webrtc data channel communicating between two peers only. Thanks.

Wvwn when you disable the WS data channel, the SCTP based data channels go through the JVB. There is currently no p2p data channel.

Now, something you could do is use our bridge channel to negotiate a new peer connection with a P2P data channel.

Thanks saghul. I guess you are suggesting using jvb as a signaling server to negotiate a new peer connection. Is my understanding correct? And is there any sample code for such configuration? Thanks again.

Correct. I have no sampel code handy, you could use something like simplepeer even.

Thanks saghul. This could be our next step.