I’m trying to use the broadcaster demo as a starting point for my own client using the libmediasoupclient. The first thing that happens is the program tried to connect to /rooms/xxx to get the routerRtpCapabilities. This call fails.
I have the mediasoup-demo running on my local Ubuntu 18.04 machine. I can connect several clients and the video streaming works fine. The URL used is
https://192.168.1.2:3000/?roomId=oqgnks91
It’s not the broadcaster’s fault: if I try to connect to https://192.168.1.2:3000/rooms/oqgnks91 from the brouser, I also get a response
Cannot GET /rooms/oqgnks91
Did the interface change? How can I get the routerRtpCapabilities without this call?
LGTM:
Also, would be nice if you pasted whatever message you receive from the app and whatever other relevant logs that you might have. Makes it easier to follow.
I’ve been staring at the same lines of code all morning
What happens is the GET request from the app gets “Cannot GET /rooms/oqgnks91”. I can’t get anything from that URL with a browser either. There is also a shell script ffmpeg.sh in the broadcasters folder. It’s doing the same thing:
echo “>>> verifying that room ‘${ROOM_ID}’ exists…”
{HTTPIE_COMMAND} \ GET {SERVER_URL}/rooms/${ROOM_ID} > /dev/null
And is getting the same result, unfortunately.
Check your certificate validity in mediasoup-demo server. If it’s not valid the HTTPs connection will fail.
Also, you can check the HTTPs traffic in for port 4443 and see what the problem is.
Checked and re-checked. Still no dice. Running on a localhost, I can’t even get a right answer from http:
http -v --check-status https://localhost:3000/rooms/test
http: error: SSLError: hostname ‘localhost’ doesn’t match ‘www.alexfreed.com’ while doing GET request to URL: https://localhost:3000/rooms/test
OK, fair enough. Then I try this, but get a different error:
http -v --check-status https://www.alexfreed.com:3000/rooms/test
GET /rooms/test HTTP/1.1
Accept: /
Accept-Encoding: gzip, deflate
Connection: keep-alive
Host: www.alexfreed.com:3000
User-Agent: HTTPie/1.0.3
HTTP/1.1 404 Not Found
Connection: keep-alive
Content-Length: 149
Content-Security-Policy: default-src ‘self’
Content-Type: text/html; charset=utf-8
Date: Sun, 01 Nov 2020 23:08:09 GMT
X-Content-Type-Options: nosniff
Cannot GET /rooms/test
The room must be created in advance by a regular peer. That’s how the demo app works.
I understand and it is created. I can connect to the same room from a second browser too, connecting to “https://www.alexfreed.com:3000/?roomId=test”,
but not using the shell script.
I can connect to
http --check-status https://www.alexfreed.com:3000?roomId=test
and get an OK 200, but not to /rooms/test
OK, have to admit I’m an idiot. I was trying to connect to port 3000, but only now realized that the client is supposed to connect to port 4443… Maybe this will help somebody else. Sanity restored.