11

For testing purpose with protractor, I need to simulate audio input from the microphone on a computer without microphone. With the "--use-fake-device-for-media-stream" flag, Chrome can simulate a fake microphone. However, no input is coming from the fake microphone so my tests fails.

Is it possible to simulate sound getting out of the microphone ?

Thanks !

Charles
  • 346
  • 3
  • 9
  • 3
    Wow, that sound interesting. Hope this will help http://stackoverflow.com/questions/21193109/simulate-microphone-input – olyv Apr 28 '14 at 12:30
  • Thanks Olyv but this link did not help me. Thanks anyway ! – Charles Apr 30 '14 at 12:06
  • I know this is old-ish, but I use `--use-fake-device-for-media-stream` on a daily basis and as far as I know it has always provided audio for the fake microphone input (regular beeps repeated at about 2Hz). Are you sure your problem isn't in detecting the audio or not waiting long enough? – Vala Dec 24 '14 at 14:56

1 Answers1

14

I get fake video and microphone input using two chrome flags

--use-fake-device-for-media-stream

--use-fake-ui-for-media-stream

Try with the two flags together.

Community
  • 1
  • 1
williamcabrera4
  • 270
  • 2
  • 12
  • For some reason, this does not work consistently. Attempted this on a chrome web driver running within a Linux container by selenoid. – qwertynik Aug 20 '22 at 11:27