3

I was looking for a way to automate WebRTC audio testing and ran into this flag

--use-file-for-fake-audio-capture=/path/to/file.wav

This seem perfect for what I need but I am wondering whether it is possible to provide a link instead of a local path?

The issue is that automation is currently done using Browserstack so the file would not be available locally when running tests through it.

Anyone have experience with this?

'chromeOptions' : {
   'args' : ["--use-fake-device-for-media-stream", "--use-fake-ui-for-media-stream", 
             "--use-file-for-fake-audio-capture=http://www.signalogic.com/melp/EngSamples/Orig/female.wav"]
    }, 

Edit: actually I am just having issues getting this working locally. Does anyone know where the file should be located? Currently still only hearing beeps for automation.

My options in webdriver

'chromeOptions' : {

       'args': ["--use-file-for-fake-audio-capture=random_audio.wav"]

    },
JerryFox
  • 585
  • 2
  • 12
  • 23
  • I don't think giving a web link of the audio file would work. Would suggest giving the local file path. The same should work on BrowserStack as well. Also, the syntax for mentioning the ChromeOptions seems fine. Don't see any issues there. Are you facing issues while mentioning the local file path as well? – Umang Sardesai Mar 12 '16 at 16:46
  • Yes I was assuming the file path refers to the path for where the file with the chrome options is located. Using only 'args': ["--use-file-for-fake-audio-capture=random_audio.wav"] still only has beeps playing through the tests – JerryFox Mar 14 '16 at 17:28

1 Answers1

1

--use-file-for-fake-audio-capture Will not work with URL, must be a file

Check answer in https://bugs.chromium.org/p/chromium/issues/detail?id=421054

It needs the wav file to be in just the right format; for my Linux workstation that was 44.1 kHz stereo 16 bit.

user1929819
  • 325
  • 3
  • 13