feat: mode écoute seule pour les server audio users (Master par groupe)

Un participant serveur peut être configuré sans publier de micro —
il reçoit le mix du groupe et le sort sur un canal physique.
- ServerAudioUser: flag publish (défaut true), sendAudio no-op si false
- AudioBridgeManager: canPublish LiveKit selon flag, input_channel null si écoute
- AudioBridge: passe publish à ServerAudioUser, log adapté
- Electron UI: checkbox "Écoute seule" dans add/edit, badges 🎤/👂 dans table
- main.js IPC: persist publish + input_channel null en écoute
This commit is contained in:
2026-07-03 17:13:58 +02:00
parent 06cb6a7dd1
commit b0f7d294d8
6 changed files with 114 additions and 23 deletions
+18 -4
View File
@@ -447,14 +447,21 @@ app.whenReady().then(async () => {
}
});
ipcMain.handle('server-audio-users:create', (event, { name, group, input_channel, output_channel }) => {
ipcMain.handle('server-audio-users:create', (event, { name, group, input_channel, output_channel, publish }) => {
try {
const config = readConfig();
const users = config.server_audio_users || [];
if (users.find(u => u.name === name)) {
return { success: false, error: `Un utilisateur "${name}" existe déjà` };
}
const user = { name, group, input_channel: parseInt(input_channel), output_channel: output_channel !== null && output_channel !== '' ? parseInt(output_channel) : null };
const isPublish = publish !== false;
const user = {
name,
group,
publish: isPublish,
input_channel: isPublish && input_channel !== null && input_channel !== undefined ? parseInt(input_channel) : null,
output_channel: output_channel !== null && output_channel !== '' ? parseInt(output_channel) : null
};
config.server_audio_users = [...users, user];
writeConfig(config);
return { success: true, user };
@@ -463,13 +470,20 @@ app.whenReady().then(async () => {
}
});
ipcMain.handle('server-audio-users:update', (event, { name, group, input_channel, output_channel }) => {
ipcMain.handle('server-audio-users:update', (event, { name, group, input_channel, output_channel, publish }) => {
try {
const config = readConfig();
const users = config.server_audio_users || [];
const idx = users.findIndex(u => u.name === name);
if (idx === -1) return { success: false, error: `Utilisateur "${name}" introuvable` };
config.server_audio_users[idx] = { name, group, input_channel: parseInt(input_channel), output_channel: output_channel !== null && output_channel !== '' ? parseInt(output_channel) : null };
const isPublish = publish !== false;
config.server_audio_users[idx] = {
name,
group,
publish: isPublish,
input_channel: isPublish && input_channel !== null && input_channel !== undefined ? parseInt(input_channel) : null,
output_channel: output_channel !== null && output_channel !== '' ? parseInt(output_channel) : null
};
writeConfig(config);
return { success: true };
} catch (error) {