vircadia / vircadia-web-sdk

Vircadia Web SDK - an SDK for the Vircadia platform that runs in your web browser.
Apache License 2.0
35 stars 29 forks source link

Retrieve/configure ICE server used #8

Open ctrlaltdavid opened 3 years ago

ctrlaltdavid commented 3 years ago

WebRTCDataChannel.js hard codes the Vircadia ICE server: iceServers: [{ urls: "stun:ice.vircadia.com:7337" }]. The C++ equivalent is ICE_SERVER_DEFAULT_HOSTNAME in NetworkingConstants.h, though it can be overridden by a command line parameter when starting the domain server - https://docs.vircadia.com/developer/domain-server/command-line-parameters.html.

It may perhaps be necessary for Interface to get the ICE server address from the metaverse server for the chosen metaverse.

Similarly for other networking constants.

ctrlaltdavid commented 3 years ago

From Misterblue:

The request "https://metaverse.vircadia.com/live/api/metaverse_info" returns a JSON structure that includes and ICE server url ("ice_server_url") as well as server version info. That request can be enhanced with a bunch of initial configuration information.

ctrlaltdavid commented 2 years ago

Too early to do this one: the Vircadia ICE (STUN) server doesn't work for WebRTC which is a problem I'm grappling with currently.