From f88e1b6bb309195e1846b434405c6f1192944841 Mon Sep 17 00:00:00 2001 From: You Wei Date: Sun, 10 Nov 2024 02:22:41 +0800 Subject: [PATCH] Add debug logs for audio call --- .../src/app/collaboration/components/AudioSharing.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/peerprep-fe/src/app/collaboration/components/AudioSharing.tsx b/peerprep-fe/src/app/collaboration/components/AudioSharing.tsx index 725874a10a..c317784533 100644 --- a/peerprep-fe/src/app/collaboration/components/AudioSharing.tsx +++ b/peerprep-fe/src/app/collaboration/components/AudioSharing.tsx @@ -26,11 +26,13 @@ const AudioSharing = () => { const TURN_CREDENTIAL = process.env.NEXT_PUBLIC_TURN_PASSWORD; if (!TURN_SERVER || !TURN_USERNAME || !TURN_CREDENTIAL) { - console.error(TURN_SERVER); - console.error(TURN_USERNAME); - console.error(TURN_CREDENTIAL); + // Log which specific variables are missing + console.error('Missing TURN config:', { + server: !!TURN_SERVER, + username: !!TURN_USERNAME, + credential: !!TURN_CREDENTIAL, + }); } - const cleanupAudio = () => { if (audioStreamRef.current) { audioStreamRef.current.getTracks().forEach((track) => {