Skip to content

Commit

Permalink
Merge pull request #167 from CS3219-AY2425S1/fix/audio-call
Browse files Browse the repository at this point in the history
Add TURN configuration
  • Loading branch information
tyouwei authored Nov 9, 2024
2 parents e65034c + f6535a5 commit bccd4dd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions peerprep-fe/src/app/collaboration/components/AudioSharing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const AudioSharing = () => {
process.env.NEXT_PUBLIC_AUDIO_SERVER_URL || 'http://localhost:5555';

// Add TURN server credentials from environment variables
const TURN_SERVER = process.env.NEXT_PUBLIC_TURN_SERVER;
const TURN_SERVER = process.env.NEXT_PUBLIC_TURN_SERVER || '';
const TURN_USERNAME = process.env.NEXT_PUBLIC_TURN_USERNAME;
const TURN_CREDENTIAL = process.env.NEXT_PUBLIC_TURN_PASSWORD;

Expand Down Expand Up @@ -60,11 +60,11 @@ const AudioSharing = () => {
{ urls: 'stun:stun.l.google.com:19302' },
{ urls: 'stun:global.stun.twilio.com:3478' },
// Add TURN server configuration
// {
// urls: TURN_SERVER,
// username: TURN_USERNAME,
// credential: TURN_CREDENTIAL,
// },
{
urls: TURN_SERVER,
username: TURN_USERNAME,
credential: TURN_CREDENTIAL,
},
],
},
});
Expand Down

0 comments on commit bccd4dd

Please sign in to comment.