Skip to content

Commit b599dfa

Browse files
committed
Test Audio
1 parent 74adbf2 commit b599dfa

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

peerprep-fe/src/app/collaboration/components/AudioSharing.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ const AudioSharing = () => {
2121
process.env.NEXT_PUBLIC_AUDIO_SERVER_URL || 'http://localhost:5555';
2222

2323
// Add TURN server credentials from environment variables
24-
const TURN_SERVER =
25-
process.env.NEXT_PUBLIC_TURN_SERVER || 'turn:localhost:3478';
26-
const TURN_USERNAME = process.env.NEXT_PUBLIC_TURN_USERNAME || 'username';
27-
const TURN_CREDENTIAL =
28-
process.env.NEXT_PUBLIC_TURN_CREDENTIAL || 'credential';
24+
const TURN_SERVER = process.env.NEXT_PUBLIC_TURN_SERVER;
25+
const TURN_USERNAME = process.env.NEXT_PUBLIC_TURN_USERNAME;
26+
const TURN_CREDENTIAL = process.env.NEXT_PUBLIC_TURN_CREDENTIAL;
27+
28+
if (!TURN_SERVER || !TURN_USERNAME || !TURN_CREDENTIAL) {
29+
console.error('Missing TURN environment variables');
30+
}
2931

3032
const cleanupAudio = () => {
3133
if (audioStreamRef.current) {
@@ -54,11 +56,11 @@ const AudioSharing = () => {
5456
{ urls: 'stun:stun.l.google.com:19302' },
5557
{ urls: 'stun:global.stun.twilio.com:3478' },
5658
// Add TURN server configuration
57-
{
58-
urls: TURN_SERVER,
59-
username: TURN_USERNAME,
60-
credential: TURN_CREDENTIAL,
61-
},
59+
// {
60+
// urls: TURN_SERVER,
61+
// username: TURN_USERNAME,
62+
// credential: TURN_CREDENTIAL,
63+
// },
6264
],
6365
},
6466
});

0 commit comments

Comments
 (0)