This commit is contained in:
legop3
2025-11-18 16:56:55 -05:00
parent 080c9c8fce
commit d812a1fc6c
3 changed files with 8 additions and 7 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ The script must be executed via `sudo` from the user that owns the repo. It will
Publishing rovers lives on a trusted network, so the shipped config (tracked at `server/mediamtx/mediamtx.yml`) skips HTTP auth for SRT ingest and whitelists any path that matches `rover-*`. The installer overwrites `/etc/mediamtx/mediamtx.yml` every time you run it—if you need to tweak ports or add TURN servers, edit the template in the repo and rerun `install_server.sh` so every box stays in sync automatically. Publishing rovers lives on a trusted network, so the shipped config (tracked at `server/mediamtx/mediamtx.yml`) skips HTTP auth for SRT ingest and whitelists any path that matches `rover-*`. The installer overwrites `/etc/mediamtx/mediamtx.yml` every time you run it—if you need to tweak ports or add TURN servers, edit the template in the repo and rerun `install_server.sh` so every box stays in sync automatically.
Once finished, update `server/config.yaml` with your admin passwords and `media.whepBaseUrl` (`http://192.168.0.86:8889`). The client automatically requests `http://<base>/<rover-id>/whep`, so you never have to embed IDs or path templates. Restart `multirover.service` whenever you edit the config. To pull updates later, just `git pull`, re-run `npm install --production` inside `server/`, and restart the service—no need to rerun the installer. Once finished, update `server/config.yaml` with your admin passwords and `media.whepBaseUrl` (for example `http://192.168.0.86:8889/video`). The client automatically requests `http://<base>/<rover-id>/whep`, so include whatever path prefix your reverse proxy exposes (e.g. `/video`). Restart `multirover.service` whenever you edit the config. To pull updates later, just `git pull`, re-run `npm install --production` inside `server/`, and restart the service—no need to rerun the installer.
### Video handshake + diagnostics ### Video handshake + diagnostics
+3 -2
View File
@@ -8,6 +8,7 @@ admins:
discord_id: "0987654321" discord_id: "0987654321"
lockdown: true lockdown: true
media: media:
# Base address for mediaMTX (scheme + host + optional port). The UI will always request # Base address for mediaMTX (scheme + host + optional port/path). The UI will always request
# http://<base>/<roverId>/whep # http://<base>/<roverId>/whep
whepBaseUrl: "http://192.168.0.86:8889" # Example: http://192.168.0.86:8889/video
whepBaseUrl: "http://192.168.0.86:8889/video"
+4 -4
View File
@@ -14,14 +14,14 @@ function buildWhepUrl(roverId) {
if (!base) { if (!base) {
return ''; return '';
} }
let origin; let prefix = base;
try { try {
const parsed = new URL(base); const parsed = new URL(base);
origin = parsed.origin; prefix = `${parsed.origin}${parsed.pathname}`;
} catch (err) { } catch (err) {
origin = base.replace(/\/.*$/, ''); // leave prefix as-is when URL parsing fails; fall back to string cleanup below
} }
const cleanBase = origin.replace(/\/$/, ''); const cleanBase = prefix.replace(/\/+$/, '');
const encodedId = encodeURIComponent(roverId); const encodedId = encodeURIComponent(roverId);
return `${cleanBase}/${encodedId}/whep`; return `${cleanBase}/${encodedId}/whep`;
} }