feat: QR code dans script séparé show-qr.sh pour logs propres
- Création show-qr.sh : génère et affiche QR code avant lancement serveur - Détection auto mode dev/prod pour URL correcte - start.sh appelle show-qr.sh puis lance serveur silencieusement - Logs serveur uniquement dans server.log (terminal propre) - Suppression génération QR dans server/index.js (plus nécessaire) - Suppression dépendance qrcode-terminal dans server (utilisé via npx dans show-qr.sh)
This commit is contained in:
@@ -21,8 +21,10 @@ class AudioBridgeManager extends EventEmitter {
|
||||
|
||||
/**
|
||||
* Démarre le bridge audio avec la configuration actuelle
|
||||
* @param {Object} options - Options de démarrage
|
||||
* @param {string} options.liveKitUrl - URL LiveKit résolue (déjà avec IP si AUTO)
|
||||
*/
|
||||
async start() {
|
||||
async start(options = {}) {
|
||||
if (this.isRunning) {
|
||||
console.warn('⚠️ AudioBridge déjà démarré');
|
||||
return;
|
||||
@@ -83,11 +85,14 @@ class AudioBridgeManager extends EventEmitter {
|
||||
const inputDeviceId = audioConfig.device?.inputDeviceId || null;
|
||||
const outputDeviceId = audioConfig.device?.outputDeviceId || null;
|
||||
|
||||
// Utiliser l'URL résolue passée en option, sinon fallback config
|
||||
const liveKitUrl = options.liveKitUrl || config.server?.livekit?.url || 'ws://localhost:7880';
|
||||
|
||||
// Créer l'instance avec la config
|
||||
this.bridge = new AudioBridge({
|
||||
...audioConfig,
|
||||
// Options LiveKit
|
||||
liveKitUrl: config.server?.livekit?.url || 'ws://localhost:7880',
|
||||
liveKitUrl,
|
||||
liveKitToken,
|
||||
roomName: 'main',
|
||||
// Options de routing
|
||||
|
||||
Reference in New Issue
Block a user