atlury commited on
Commit
ff399f8
·
verified ·
1 Parent(s): 07d4ec3

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +11 -2
index.html CHANGED
@@ -326,12 +326,21 @@
326
  }
327
  });
328
 
329
-
330
- //microphoneStream = await navigator.mediaDevices.getUserMedia({ audio: true });
 
 
 
 
 
 
 
331
 
332
  const source = audioContext.createMediaStreamSource(microphoneStream);
333
  source.connect(analyser);
334
 
 
 
335
  await myvad.start();
336
  startButton.textContent = 'End Call';
337
  isListening = true;
 
326
  }
327
  });
328
 
329
+ console.log('Active constraints:', microphoneStream.getAudioTracks()[0].getConstraints());
330
+ console.log('Microphone stream settings:', microphoneStream.getAudioTracks()[0].getSettings());
331
+
332
+ const supportedConstraints = navigator.mediaDevices.getSupportedConstraints();
333
+ console.log('Supported constraints:', supportedConstraints);
334
+
335
+ if (!supportedConstraints.echoCancellation) {
336
+ console.warn('Echo cancellation is not supported on this device or browser.');
337
+ }
338
 
339
  const source = audioContext.createMediaStreamSource(microphoneStream);
340
  source.connect(analyser);
341
 
342
+ console.log('Microphone stream settings:', microphoneStream.getAudioTracks()[0].getSettings());
343
+
344
  await myvad.start();
345
  startButton.textContent = 'End Call';
346
  isListening = true;