Determining if WebRTC connection is UDP or TCP in the apprtc.appspot.com demo?

796 views
Skip to first unread message

Indieshack

unread,
Jul 15, 2015, 1:07:13 AM7/15/15
to discuss...@googlegroups.com
I'm currently playing around with the WebRTC API behind a company firewall. I don't know if the firewall functions as a symmetric NAT that needs a TURN server. Using the WebRTC example at: https://apprtc.appspot.com/ I can connect to the same webapp running on a cellular laptop, and use chrome://WebRTC-internals to view stats, but it's not clear to me which of the stats indicate whether the connection is P2P using UDP or is in fact using the TURN server to relay TCP connection. Can anyone enlighten me how I can tell from the webrtc-internals stats if the connection is using UDP?

Ben Schwartz

unread,
Jul 15, 2015, 12:35:17 PM7/15/15
to discuss...@googlegroups.com
In Chrome, under Conn-audio-1-0, if the connection is UDP you should see
googTransportTypeudp

On Tue, Jul 14, 2015 at 8:48 PM, Indieshack <gr...@indieshack.com> wrote:
I'm currently playing around with the WebRTC API behind a company firewall. I don't know if the firewall functions as a symmetric NAT that needs a TURN server. Using the WebRTC example at: https://apprtc.appspot.com/ I can connect to the same webapp running on a cellular laptop, and use chrome://WebRTC-internals to view stats, but it's not clear to me which of the stats indicate whether the connection is P2P using UDP or is in fact using the TURN server to relay TCP connection. Can anyone enlighten me how I can tell from the webrtc-internals stats if the connection is using UDP?

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/b2e1935c-5744-4caf-bdea-307c674a3e8a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Philipp Hancke

unread,
Jul 15, 2015, 12:52:12 PM7/15/15
to discuss...@googlegroups.com
2015-07-15 9:35 GMT-07:00 'Ben Schwartz' via discuss-webrtc <discuss...@googlegroups.com>:
In Chrome, under Conn-audio-1-0, if the connection is UDP you should see
googTransportTypeudp
Nope, that only tells you which protocol the TURN server uses to relay. It's slightly more complicated to figure out the type of TURN connection used, see https://github.com/webrtc/apprtc/pull/99
 

Indieshack

unread,
Jul 16, 2015, 9:29:10 AM7/16/15
to discuss...@googlegroups.com
Thanks Phillipp and Ben; I'm confused - isn't it a fairly simple thing for the webrtc-internals to report whether rtc is using a TURN server or P2P?

Christoffer Jansson

unread,
Jul 16, 2015, 9:42:29 AM7/16/15
to discuss...@googlegroups.com
On Thu, Jul 16, 2015 at 3:29 PM Indieshack <gr...@indieshack.com> wrote:
Thanks Phillipp and Ben; I'm confused - isn't it a fairly simple thing for the webrtc-internals to report whether rtc is using a TURN server or P2P?
That's not exactly what you asked in your original question. 

To check whether if you are using TURN or not you can look at googLocalCandidateType in webrtc-internals under Conn-audio-1-0 (if bundle is used, otherwise per transport type (audio, video and data)), it should be "relay" if TURN is used.

/Chris

 

Indieshack

unread,
Jul 16, 2015, 4:15:57 PM7/16/15
to discuss...@googlegroups.com
Thanks Christoffer, I'm running the apprtc.appspot.com example and opened all dropdowns, the field "googLocalCandidateType" isn't there. Like I said, I'm a newby to WebRTC, but I have to say that this stats display is a mess. Finding out whether a connection is via TCP or UDP, P2P or TURN should be barn door obvious from the information - it's not.

Christoffer Jansson

unread,
Jul 16, 2015, 4:25:27 PM7/16/15
to discuss...@googlegroups.com

Have you called another machine or tab? Opening it one tab is not enough, I can see it under conn-audio-1-0 as mentioned.


Indieshack

unread,
Jul 16, 2015, 5:17:50 PM7/16/15
to discuss...@googlegroups.com
I'm opening the appspot app in Chrome on my laptop, connected to the internet via ATT LTE; the other side is on Chrome running on a Mac Mini behind a company firewall. They connect just fine (audio/video), everything works great, but I don't know if they are peering or connecting through the appspot app's TURN server.

Philipp Hancke

unread,
Jul 16, 2015, 5:38:33 PM7/16/15
to discuss...@googlegroups.com
hit the 'i' key in apprtc -- that will tell you whether TURN is used. Not whether TURN/TCP is used yet but... soon hopefully.

Indieshack

unread,
Jul 16, 2015, 8:38:01 PM7/16/15
to discuss...@googlegroups.com
Thank you Philipp :)

Christoffer Jansson

unread,
Jul 17, 2015, 2:40:23 AM7/17/15
to discuss...@googlegroups.com
Thanks Phillip as well for reminding me that this is present in the AppRTC overlay as well;).

With regards to webrtc-internals, you should see the following once you have successfully connected:
joaMFNwQLFo.png
In this case it's local as I'm calling tab to tab on the same machine, but if you see "relay" here, TURN is used. 

/Chris

Indieshack

unread,
Jul 17, 2015, 6:41:26 PM7/17/15
to discuss...@googlegroups.com
Thanks Christoffer, appreciated.

Silvia Pfeiffer

unread,
Jul 17, 2015, 11:51:00 PM7/17/15
to discuss...@googlegroups.com
I've been meaning to ask this: is there some user documentation somewhere on how to get to this kind of information with apprtc (incl URL parameters)?

I didn't find anything in the GitHub repo https://github.com/webrtc/apprtc and a Google search only brought up my really outdated blog post...

Thanks,
Silvia.


Jeremy Noring

unread,
Jul 20, 2015, 11:05:11 AM7/20/15
to discuss...@googlegroups.com
Agreed, and this information is very important to let a user know if they've established a sub-par connection.  This is really common in enterprise environments when going through a media server.  And the stats pages for WebRTC have always been a mess.

Christoffer Jansson

unread,
Jul 21, 2015, 2:27:52 AM7/21/15
to discuss...@googlegroups.com, silviap...@gmail.com


On Saturday, July 18, 2015 at 5:51:00 AM UTC+2, Silvia Pfeiffer wrote:
I've been meaning to ask this: is there some user documentation somewhere on how to get to this kind of information with apprtc (incl URL parameters)?
You can find URL parameters here. It's currently not served as a webpage/readme.md anywhere, will fix that. 
Reply all
Reply to author
Forward
0 new messages