Why is the UV4L WebRTC signalling websocket timing out?

4075 views websocket
3

I'm trying to send a webRTC stream to an Android device natively (without a webview).

I've implemented my own custom signalling class in the app, and I'm trying to test it. The issue is, when I start up UV4L and try to connect to the signaling socket at ws://myIp:portNumber it times out.

During my troubleshooting, I quickly set up a simple websocket server in python on the server machine and ensured that I could access it from the public internet, so I know it's not my ports being blocked or anything like that. Do I just have the wrong URL for the signalling socket? I can't find anything in the UV4L documentation about it. When I access the default web page from the browser, the WebRTC stream works just fine, so I know it's not an issue there.

The documentation for this stuff is abysmal at best.

I see some configuration options related to setting the websocket endpoint when using a custom server serving up custom HTML pages, but I'm not needing any web pages at all - I just need the websocket for signalling.

EDIT: I did some poking around and found the following two lines of JavaScript which might be relevant in the web page source for the default page that is known to work:

 var signalling_server_hostname = location.hostname || "ipAddress censored";
 var signalling_server_address = signalling_server_hostname + ':' + (location.port || (location.protocol === 'https:' ? 443 : 80));

I'm not really that fluent in JavaScript so I'm not sure about some of the syntax I'm seeing here. I'm assuming || is a glorified null check here?

answered question

1 Answer

5

I figured it out by poking around in the JavaScript for the default page.

The URL I needed was ws://ip:port/stream/webrtc.

I'm still working on getting the actual stream working - who knows if I'm going about it the right way or not, but at least I am able to connect to the signalling server now.

posted this

Have an answer?

JD

Please login first before posting an answer.

Ads

Categories