-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--use-file-for-fake-audio-capture
doesn't work on Chrome
#5592
Comments
I see the arg reading in the Chrome args output as the same path you specified: Can you detail what the actual issue is? Is the audio file eventually not playing within the web application? What is the error point? |
I'm facing the same issue with MAC Chrome. Did you find a solution? |
Issue reproduced for me as well. --use-file-for-fake-audio-capture doesn't work for 79 version of chrome on Mac OS. Sample audio isn't playing. I verified it on 76 version and works fine. Issue isn't related cypress, it is related to Chrome. |
To output audio to speakers when using navigator.mediaDevices.getUserMedia({audio: true})
.then(stream => {
const audio = new Audio();
audio.autoplay = true;
audio.srcObject = stream;
}); navigator.mediaDevices.getUserMedia({audio: true})
.then(mediaStream => {
const ac = new AudioContext();
const source = ac.createMediaStreamSource(mediaStream);
source.connect(ac.destination);
}); Command line
Tested at Chromium 80.0.3987.7 (32-bit) *nix (both To test download attached |
Sorry for the late reply. BTW, I ran @guest271314's scripts on Mac, and I got error message.
|
Can you upload the |
I think its an issue with chromium and not cypress. I created a bug report in their issue tracker. https://bugs.chromium.org/p/chromium/issues/detail?id=1032604 |
Since this issue hasn't had activity in a while, we'll close the issue until we can confirm this is still happening. Please comment if there is new information to provide concerning the original issue and we'd be happy to reopen. |
Did anyone manage to get this working (found some workaround)? |
according to on('before:browser:launch', (browser = {}, launchOptions = { args: [] }) => {
if (browser.name === 'chrome') {
// https://bugs.chromium.org/p/chromium/issues/detail?id=1032604#c37
launchOptions.args.push('--no-sandbox')
launchOptions.args.push('--allow-file-access-from-files')
launchOptions.args.push('--use-fake-ui-for-media-stream')
launchOptions.args.push('--use-fake-device-for-media-stream')
// mp3 not work
launchOptions.args.push('--use-file-for-fake-audio-capture=tests/fixtures/hello.wav')
}
return launchOptions
}) |
@loszer Adding |
Current behavior:
I use
--use-file-for-fake-audio-capture
for testing getUserMedia behaviour on Chrome.#4160
But cypress v3.5.0 and v3.6.0,
--use-file-for-fake-audio-capture
doesn't work it.Desired behavior:
--use-file-for-fake-audio-capture
works on Chrome.Steps to reproduce: (app code and test code)
and args output
I tried to absolute wav file path, but it doesn't work too.
Versions
Cypress v3.5.0, 3.6.0
OS : macOS 10.15
Chrome 78.0.3904.87, 79.0.3945.16
following version worked fine
Cypress v3.4.1
OS : macOS 10.15
Chrome 78.0.3904.87
The text was updated successfully, but these errors were encountered: