I compiled the demo as listed in the documentation and also brought up a local mediasoup server (as per the mediasoup-demo documentation). I am able to connect to this local server via the browser by going to localhost:3000/?roomId=broadcaster.
However, when I run the c++ client demo app “broadcaster” I am not able to connect to it. I get the following error when the run this command:
$ SERVER_URL=https://localhost:4443/ ROOM_ID=broadcaster build/broadcaster
[DEBUG] mediasoupclient::Initialize() | mediasoupclient v3.0.8
[INFO] welcome to mediasoup broadcaster app!
[INFO] verifying that room 'broadcaster' exists...
[ERROR] unable to retrieve room info [status code:0, body:""]
I am sure I am missing something really basic here. I tried both 4443 and 3000 ports but get the same result suggesting something fundamentally wrong with the server url I am providing.
Yes even without the slash it doesn’t work. However, when I log the URL from the main file, that works when I copy paste into the browser (its the same URL that you pointed out). Somehow the call
cpr::GetAsync(cpr::Url{ baseUrl }).get(); doesnt return a 200 code or the right response.
You’ll have to debug it a bit. Print the response logs and check what’s happening. Also check the traces with Wireshark or alike, may be a problem with the SSL certificates…
Make sure you consider the last note in the README
NOTE 1: PATH_TO_OPENSSL_HEADERS is /usr/local/opt/openssl/include if you install OpenSSL using Homebrew in OSX.
I did confirm that the PATH_TO_OPENSSL_HEADERS is valid (am on Ubuntu, they live in /usr/include/openssl and the version is 1.1.1).
Is there anything else on the client (c++ broadcaster) side I need to configure in terms of communicating to the server (apart from the url of course) ?