mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-07-30 00:39:16 +02:00
config
This commit is contained in:
+9
-7
@@ -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 = {};
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user