P2P connections between web clients?

797 views
Skip to first unread message

Nguyen Dang Vo

unread,
Feb 24, 2015, 6:46:28 AM2/24/15
to meetech...@googlegroups.com
Hi all,

Since all the traffic between web clients are streamed through Janus gateway, is there any way that they could establish a P2P connection between the clients? 
My scenario is: I have 2 PCs in the same home network, and Janus gateway is a VPS which has public IP address. Everytime I try video call demo, the traffic from both web clients are streamed through Janus, but I want these two clients could directly send and receive traffic from each other.
Does Janus support this kind of P2P connection?

Thanks,
Nguyen Vo.

Nicholas Wylie

unread,
Feb 24, 2015, 4:31:09 PM2/24/15
to meetech...@googlegroups.com
If you have some kind of proxy application handling the signalling between all of your clients, you can catch this use case and establish a direct connection between the clients without including Janus.

Nguyen Dang Vo

unread,
Feb 24, 2015, 4:44:01 PM2/24/15
to meetech...@googlegroups.com
Thank you very much. I will try this.

Nguyen Dang Vo

unread,
Feb 24, 2015, 8:59:37 PM2/24/15
to meetech...@googlegroups.com
I'm confused. We could use a signaling server for clients to exchange their media and connectivity information but as far as I know Janus is acting as a signaling server. So I assume that Janus supports signaling between peers so that they could establish direct connection. Is that right?
If it does then is there any modification to the original siptest.js? Mine is:
[...]
server: server,
iceServers: [{'url':'stun:stun.faktortel.com.au'}],
success: function() {
[...]
And the server configuration is attached. Please take a look and give me some hints.

Thanks,
Nguyen Vo.

On Tuesday, February 24, 2015 at 1:31:09 PM UTC-8, Nicholas Wylie wrote:
janus.cfg

Nicholas Wylie

unread,
Feb 24, 2015, 9:22:35 PM2/24/15
to meetech...@googlegroups.com
Janus acts as a signally server only so far as providing signalling channels (REST, WebSockets, RabbitMQ) between your peer and the Janus plugins.

It would be possible to modify one of the plugins to allow you to pass SDP's between peers connected to Janus and then allow those peers to establish direct connections but (AFAIK) none of the plugins currently enable this.
Your other solution, as I mentioned initially, is to setup a signalling server and treat Janus as just another peer. From what I've seen, I believe most people (myself included) are heading down this path.

Lorenzo Miniero

unread,
Feb 25, 2015, 4:18:54 AM2/25/15
to meetech...@googlegroups.com
There's nothing plugins can do to force a P2P behaviour. All the ICE/DTLS and in general WebRTC establishment stuff is in the core, the SDP plugins get and send is stripped down of that information. Janus was conceived as a gateway, not a signalling server, and as such will ALWAYS be on the media path.

Lorenzo
Reply all
Reply to author
Forward
0 new messages