This commit is contained in:
legop3
2025-11-14 22:45:18 -05:00
parent 6cfdde30ea
commit d524c312cf
5 changed files with 15 additions and 22 deletions
+3 -5
View File
@@ -8,8 +8,6 @@ admins:
discord_id: "0987654321"
lockdown: true
media:
# Base URL for mediaMTX WHEP publishes. Append the rover ID automatically, or embed {roverId}/{id}.
# Examples:
# http://192.168.0.86:8889/whep -> becomes http://192.168.0.86:8889/whep/<roverId>
# 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"
# Base address for mediaMTX (scheme + host + optional port). The UI will always request
# http://<base>/<roverId>/whep
whepBaseUrl: "http://192.168.0.86:8889"
+7 -7
View File
@@ -21,13 +21,13 @@ webrtcICEServers2: []
srt: yes
srtAddress: :9000
# authMethod: http
# authHTTPAddress: http://127.0.0.1:8080/mediamtx/auth
# authHTTPExclude:
# - action: publish
# - action: api
# - action: metrics
# - action: pprof
authMethod: http
authHTTPAddress: http://127.0.0.1:8080/mediamtx/auth
authHTTPExclude:
- action: publish
- action: api
- action: metrics
- action: pprof
paths:
all:
+2 -7
View File
@@ -14,14 +14,9 @@ function buildWhepUrl(roverId) {
if (!base) {
return '';
}
const cleanBase = base.replace(/\/$/, '');
const encodedId = encodeURIComponent(roverId);
if (base.includes('{roverId}')) {
return base.replace(/\{roverId\}/g, encodedId);
}
if (base.includes('{id}')) {
return base.replace(/\{id\}/g, encodedId);
}
return `${base.replace(/\/$/, '')}/${encodedId}`;
return `${cleanBase}/${encodedId}/whep`;
}
function canView(socket, roverId) {