fix: connexion directe LiveKit en mode production
- 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'
This commit is contained in:
+3
-6
@@ -100,14 +100,11 @@ function App() {
|
|||||||
|
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
|
||||||
// Adapter l'URL LiveKit selon le protocole de la page
|
// Utiliser directement l'URL LiveKit fournie par le serveur
|
||||||
let livekitUrl = data.url;
|
const 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`;
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log('🔗 Connexion LiveKit:', livekitUrl);
|
console.log('🔗 Connexion LiveKit:', livekitUrl);
|
||||||
|
console.log('📝 Token:', data.token.substring(0, 50) + '...');
|
||||||
|
|
||||||
// Se connecter à LiveKit avec les canaux virtuels
|
// Se connecter à LiveKit avec les canaux virtuels
|
||||||
await connect(livekitUrl, data.token, data.virtualChannels || []);
|
await connect(livekitUrl, data.token, data.virtualChannels || []);
|
||||||
|
|||||||
Reference in New Issue
Block a user