From b454fb258422827515487e507b55fac8dc52c6da Mon Sep 17 00:00:00 2001 From: Benoit Date: Wed, 27 May 2026 22:34:39 +0200 Subject: [PATCH] fix: connexion directe LiveKit en mode production MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Suppression du proxy /livekit qui n'existe qu'en dev - Utilisation directe de l'URL WebSocket (ws://IP:7880) - Rebuild client avec correction - Résout l'erreur 'websocket closed code 1006' --- client/src/App.jsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/client/src/App.jsx b/client/src/App.jsx index 2ae5d22..725fc1f 100644 --- a/client/src/App.jsx +++ b/client/src/App.jsx @@ -100,14 +100,11 @@ function App() { const data = await response.json(); - // Adapter l'URL LiveKit selon le protocole de la page - let livekitUrl = data.url; - if (window.location.protocol === 'https:') { - // En HTTPS, utiliser le proxy WSS local via Vite - livekitUrl = `${window.location.protocol}//${window.location.host}/livekit`; - } + // Utiliser directement l'URL LiveKit fournie par le serveur + const livekitUrl = data.url; console.log('🔗 Connexion LiveKit:', livekitUrl); + console.log('📝 Token:', data.token.substring(0, 50) + '...'); // Se connecter à LiveKit avec les canaux virtuels await connect(livekitUrl, data.token, data.virtualChannels || []);