Files
PTT-Live/client/vite.config.js
T
benoit f2e1a50d6d fix: résolution device IDs et correction sox capture args
Corrections pour le routing audio carte son → LiveKit :

**Fixes audio backend**
- AudioBridgeManager : extraction des device IDs depuis config.audio.device
- AudioBridge : ajout résolution device ID → device name pour CoreAudio/sox
- CoreAudioBackend : correction index args sox capture (args[2] au lieu de args[1])

**Résultat**
-  Sox capture fonctionne : lit depuis "Microphone MacBook Pro"
-  Audio capturé et envoyé vers routing
-  Sox playback se ferme après 0.2s (problème persistant à corriger)

**Autres modifications**
- Logging centralisé (Logger.js)
- IP corrigée : 192.168.0.146
- Suppression système channels[] legacy dans groupes

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-26 22:01:53 +02:00

88 lines
2.1 KiB
JavaScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { VitePWA } from 'vite-plugin-pwa';
import fs from 'fs';
export default defineConfig({
plugins: [
react(),
VitePWA({
registerType: 'autoUpdate',
includeAssets: ['favicon.ico', 'robots.txt', 'apple-touch-icon.png'],
injectRegister: 'auto',
devOptions: {
enabled: true
},
manifest: {
name: 'PTT Live',
short_name: 'PTT Live',
description: 'Professional WebRTC Intercom for Event Technicians',
theme_color: '#1a1a1a',
background_color: '#1a1a1a',
display: 'standalone',
scope: '/',
start_url: '/',
orientation: 'portrait',
icons: [
{
src: 'pwa-192x192.png',
sizes: '192x192',
type: 'image/png'
},
{
src: 'pwa-512x512.png',
sizes: '512x512',
type: 'image/png'
},
{
src: 'pwa-512x512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'any maskable'
}
]
},
workbox: {
runtimeCaching: [
{
urlPattern: /^https:\/\/.*\.livekit\.cloud\/.*/i,
handler: 'NetworkFirst',
options: {
cacheName: 'livekit-cache',
expiration: {
maxEntries: 10,
maxAgeSeconds: 60 * 60 * 24 // 24 hours
}
}
}
]
}
})
],
server: {
port: 5173,
host: true,
https: {
key: fs.readFileSync('./localhost+3-key.pem'),
cert: fs.readFileSync('./localhost+3.pem'),
},
proxy: {
'/api': {
target: 'http://192.168.0.146:3000',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
},
'/livekit': {
target: 'ws://192.168.0.146:7880',
ws: true,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/livekit/, '')
}
}
},
build: {
outDir: 'dist',
sourcemap: true
}
});