@@ -21,9 +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 = process . env . NEXT_PUBLIC_TURN_SERVER || 'turn:localhost' ;
25- const TURN_USERNAME = process . env . NEXT_PUBLIC_TURN_USERNAME || 'none' ;
26- const TURN_CREDENTIAL = process . env . NEXT_PUBLIC_TURN_PASSWORD || 'none' ;
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_PASSWORD ;
27+
28+ if ( ! TURN_SERVER || ! TURN_USERNAME || ! TURN_CREDENTIAL ) {
29+ console . error ( 'Missing TURN environment variables' ) ;
30+ }
2731
2832 const cleanupAudio = ( ) => {
2933 if ( audioStreamRef . current ) {
@@ -52,11 +56,11 @@ const AudioSharing = () => {
5256 { urls : 'stun:stun.l.google.com:19302' } ,
5357 { urls : 'stun:global.stun.twilio.com:3478' } ,
5458 // Add TURN server configuration
55- {
56- urls : TURN_SERVER ,
57- username : TURN_USERNAME ,
58- credential : TURN_CREDENTIAL ,
59- } ,
59+ // {
60+ // urls: TURN_SERVER,
61+ // username: TURN_USERNAME,
62+ // credential: TURN_CREDENTIAL,
63+ // },
6064 ] ,
6165 } ,
6266 } ) ;
0 commit comments