fix: détection automatique IP réseau pour connexions multi-appareils

Problème :
Le serveur retournait ws://localhost:7880 aux clients, empêchant
les connexions depuis d'autres appareils sur le réseau.

Solution :
- Ajout détection automatique IP réseau (WiFi/Ethernet)
- Variable LIVEKIT_URL=AUTO pour mode auto-détection
- Fonction getNetworkIP() avec priorité interfaces (en0, en1, eth0, wlan0)
- Affichage IP détectée au démarrage du serveur
- Fallback vers localhost si IP non détectée

Modifications :
- server/index.js : ajout getNetworkIP() et détection AUTO
- server/.env : LIVEKIT_URL=AUTO par défaut
- server/.env.example : documentation modes configuration
- NETWORK_SETUP.md : guide complet configuration réseau et dépannage

Les clients reçoivent maintenant ws://IP_RESEAU:7880 et peuvent
se connecter depuis n'importe quel appareil sur le même réseau WiFi.

Ports utilisés :
- 3000 : API REST
- 7880 : LiveKit WebSocket
- 7882 : LiveKit UDP (RTP)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-05-22 22:27:34 +02:00
parent efd697a9d3
commit 24edf36d3c
3 changed files with 217 additions and 3 deletions
+10 -2
View File
@@ -5,5 +5,13 @@
LIVEKIT_API_KEY=devkey
LIVEKIT_API_SECRET=secret
# Optionnel : override URL LiveKit
# LIVEKIT_URL=ws://localhost:7880
# URL LiveKit pour les clients
# Pour permettre les connexions réseau, utilisez l'IP locale du serveur
# Exemples :
# - Local uniquement : ws://localhost:7880
# - Réseau local : ws://192.168.1.100:7880 (remplacer par votre IP)
# - Utiliser AUTO pour détecter automatiquement l'IP réseau
LIVEKIT_URL=AUTO
# Mode LiveKit local (démarre livekit-server automatiquement)
USE_LOCAL_LIVEKIT=true