mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-17 10:00:46 -04:00
guh
This commit is contained in:
@@ -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/whep`). The UI appends the rover ID to whatever you provide; if you prefer a different layout, include `{roverId}` or `{id}` in the URL (for example `http://192.168.0.86:8889/{id}/whep`). 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` (`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.
|
||||||
|
|
||||||
### Video handshake + diagnostics
|
### Video handshake + diagnostics
|
||||||
|
|
||||||
|
|||||||
@@ -23,8 +23,8 @@
|
|||||||
|
|
||||||
3. **Web clients**
|
3. **Web clients**
|
||||||
- Tiny helper (React hook or vanilla class) that:
|
- Tiny helper (React hook or vanilla class) that:
|
||||||
1. Requests a viewer JWT for rover `<id>`.
|
1. Requests a viewer token for rover `<id>`.
|
||||||
2. Issues a `POST` to `/whep/rover-<id>` with `Authorization: Basic base64(token:token)` (token issued by the server when the client calls `video:request`).
|
2. Issues a `POST` to `<mediamtx-host>/<rover-id>/whep` with `Authorization: Basic base64(token:token)` (token issued by the server when the client calls `video:request`).
|
||||||
3. Maintains auto-reconnect timers on ICE failure so dashboard widgets can come/go without reloading the page.
|
3. Maintains auto-reconnect timers on ICE failure so dashboard widgets can come/go without reloading the page.
|
||||||
- Operator dashboard mounts one player tied to the assigned rover. The spectator view instantiates one player per tile, muting + pausing hidden elements to keep CPU usage sane even when every rover is shown simultaneously.
|
- Operator dashboard mounts one player tied to the assigned rover. The spectator view instantiates one player per tile, muting + pausing hidden elements to keep CPU usage sane even when every rover is shown simultaneously.
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,6 @@ admins:
|
|||||||
discord_id: "0987654321"
|
discord_id: "0987654321"
|
||||||
lockdown: true
|
lockdown: true
|
||||||
media:
|
media:
|
||||||
# Base URL for mediaMTX WHEP publishes. Append the rover ID automatically, or embed {roverId}/{id}.
|
# Base address for mediaMTX (scheme + host + optional port). The UI will always request
|
||||||
# Examples:
|
# http://<base>/<roverId>/whep
|
||||||
# http://192.168.0.86:8889/whep -> becomes http://192.168.0.86:8889/whep/<roverId>
|
whepBaseUrl: "http://192.168.0.86:8889"
|
||||||
# http://192.168.0.86:8889/{id}/whep -> becomes http://192.168.0.86:8889/Freaky/whep
|
|
||||||
whepBaseUrl: "http://192.168.0.86:8889/whep"
|
|
||||||
|
|||||||
@@ -21,13 +21,13 @@ webrtcICEServers2: []
|
|||||||
srt: yes
|
srt: yes
|
||||||
srtAddress: :9000
|
srtAddress: :9000
|
||||||
|
|
||||||
# authMethod: http
|
authMethod: http
|
||||||
# authHTTPAddress: http://127.0.0.1:8080/mediamtx/auth
|
authHTTPAddress: http://127.0.0.1:8080/mediamtx/auth
|
||||||
# authHTTPExclude:
|
authHTTPExclude:
|
||||||
# - action: publish
|
- action: publish
|
||||||
# - action: api
|
- action: api
|
||||||
# - action: metrics
|
- action: metrics
|
||||||
# - action: pprof
|
- action: pprof
|
||||||
|
|
||||||
paths:
|
paths:
|
||||||
all:
|
all:
|
||||||
|
|||||||
@@ -14,14 +14,9 @@ function buildWhepUrl(roverId) {
|
|||||||
if (!base) {
|
if (!base) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
const cleanBase = base.replace(/\/$/, '');
|
||||||
const encodedId = encodeURIComponent(roverId);
|
const encodedId = encodeURIComponent(roverId);
|
||||||
if (base.includes('{roverId}')) {
|
return `${cleanBase}/${encodedId}/whep`;
|
||||||
return base.replace(/\{roverId\}/g, encodedId);
|
|
||||||
}
|
|
||||||
if (base.includes('{id}')) {
|
|
||||||
return base.replace(/\{id\}/g, encodedId);
|
|
||||||
}
|
|
||||||
return `${base.replace(/\/$/, '')}/${encodedId}`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function canView(socket, roverId) {
|
function canView(socket, roverId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user