This commit is contained in:
2026-04-07 11:30:33 +02:00
parent 561f002140
commit 72a468d5fe
2 changed files with 16 additions and 8 deletions
+9 -7
View File
@@ -339,13 +339,15 @@ router.get('/server_time', (req, res) => {
router.get('/ping', (req, res) => res.send('pong')); router.get('/ping', (req, res) => res.send('pong'));
// techkrzysiek's WebRTC plugin integration from the Miedzyzdroje server. router.get('/webrtc-audio-flags.json', (req, res) => res.json(serverConfig.webRtc.flags));
router.get('/webrtc-audio-flags.json', (req, res) => res.json({disable3las: false})); router.get('/webrtc-audio.conf', (req, res) => {
// /webrtc-audio.conf should serve a list of supported WebRTC endpoints; like this "56000:https://webrtc.fmdx.pro/miedzyzdroje_56k/whep"; each entry is seperated by a semicolon let out = "";
// We should be able to use mediamtx for SDP/WHEP and the WebRTC itself. res.send("192000:https://batorego.flerken.pl.eu.org/webrtc/whep192/whep")
for (const [endpoint, bitrate] of Object.entries(serverConfig.webRtc.audio)) {
// Testing only! TODO: Add this to config out += `${bitrate * 1000}:${endpoint};`;
router.get('/webrtc-audio.conf', (req, res) => res.send("192000:https://batorego.flerken.pl.eu.org/webrtc/whep192/whep")); }
res.send(out);
});
const logHistory = {}; const logHistory = {};
+7 -1
View File
@@ -123,7 +123,13 @@ let serverConfig = {
antennaStartup: "0", antennaStartup: "0",
antennaNoUsers: "0", antennaNoUsers: "0",
antennaNoUsersDelay: false, antennaNoUsersDelay: false,
trustedProxies: [] trustedProxies: [],
webRtc: {
flags: {
disable3las: false
},
audio: {}
}
}; };
// Function to add missing fields without overwriting existing values // Function to add missing fields without overwriting existing values