Compare commits
2 Commits
65357c29cc
...
aab23dc51f
| Author | SHA1 | Date | |
|---|---|---|---|
| aab23dc51f | |||
| c562415a3d |
@@ -159,8 +159,16 @@ export class LiveKitClient extends EventEmitter {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Tracks - Debug tous les événements
|
// Tracks - Debug tous les événements
|
||||||
this.room.on(RoomEvent.TrackPublished, (publication, participant) => {
|
this.room.on(RoomEvent.TrackPublished, async (publication, participant) => {
|
||||||
console.log(`📢 Track publié par ${participant.identity}: ${publication.kind} (${publication.sid}), muted: ${publication.muted}`);
|
console.log(`📢 Track publié par ${participant.identity}: ${publication.kind} (${publication.sid}), muted: ${publication.muted}`);
|
||||||
|
|
||||||
|
// Si c'est un track audio, s'y abonner immédiatement
|
||||||
|
if (publication.kind === 'audio' && publication.track) {
|
||||||
|
console.log(` ⚡ Track audio détecté, souscription...`);
|
||||||
|
await this._handleAudioTrack(publication.track, publication, participant);
|
||||||
|
} else if (publication.kind === 'audio' && !publication.track) {
|
||||||
|
console.log(` ⚠️ Track audio publié mais track object non disponible encore`);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.room.on(RoomEvent.TrackSubscribed, async (track, publication, participant) => {
|
this.room.on(RoomEvent.TrackSubscribed, async (track, publication, participant) => {
|
||||||
|
|||||||
+1194
-1138
File diff suppressed because one or more lines are too long
+21
-5
@@ -129,16 +129,27 @@ function startLiveKitServer() {
|
|||||||
|
|
||||||
livekitProcess = spawn(livekitBinary, args, {
|
livekitProcess = spawn(livekitBinary, args, {
|
||||||
stdio: ['ignore', 'pipe', 'pipe'],
|
stdio: ['ignore', 'pipe', 'pipe'],
|
||||||
env: { ...process.env },
|
env: {
|
||||||
|
...process.env,
|
||||||
|
LIVEKIT_LOG_LEVEL: 'info' // Réduit les logs LiveKit (debug → info)
|
||||||
|
},
|
||||||
shell: true // Permet de trouver le binaire dans PATH
|
shell: true // Permet de trouver le binaire dans PATH
|
||||||
});
|
});
|
||||||
|
|
||||||
livekitProcess.stdout.on('data', (data) => {
|
livekitProcess.stdout.on('data', (data) => {
|
||||||
const output = data.toString().trim();
|
const output = data.toString().trim();
|
||||||
if (output) {
|
if (!output) return;
|
||||||
log('debug', '[LiveKit]', output);
|
|
||||||
|
// Filtrer les logs trop verbeux
|
||||||
|
if (output.includes('DEBUG') ||
|
||||||
|
output.includes('received signal request') ||
|
||||||
|
output.includes('sending signal response') ||
|
||||||
|
output.includes('handling signal request')) {
|
||||||
|
return; // Ignorer ces logs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log('debug', '[LiveKit]', output);
|
||||||
|
|
||||||
// Détection démarrage réussi
|
// Détection démarrage réussi
|
||||||
if (output.includes('starting server') || output.includes('rtc server')) {
|
if (output.includes('starting server') || output.includes('rtc server')) {
|
||||||
resolve();
|
resolve();
|
||||||
@@ -147,9 +158,14 @@ function startLiveKitServer() {
|
|||||||
|
|
||||||
livekitProcess.stderr.on('data', (data) => {
|
livekitProcess.stderr.on('data', (data) => {
|
||||||
const output = data.toString().trim();
|
const output = data.toString().trim();
|
||||||
if (output) {
|
if (!output) return;
|
||||||
log('warn', '[LiveKit Error]', output);
|
|
||||||
|
// Filtrer les logs DEBUG de stderr aussi
|
||||||
|
if (output.includes('DEBUG')) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log('warn', '[LiveKit Error]', output);
|
||||||
});
|
});
|
||||||
|
|
||||||
livekitProcess.on('error', (error) => {
|
livekitProcess.on('error', (error) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user