Microphone access in headless mode

1,601 views
Skip to first unread message

jasontu...@gmail.com

unread,
Sep 5, 2017, 11:08:29 PM9/5/17
to headless-dev
Hello,

I've got some tests that make use of the microphone. It works fine windowed. I've allowed microphone access and have no trouble. Using the same user profile I launch a headless instance of chrome and the microphone refuses to work. I've tried everything I can think of. Any reason why it wouldn't work in headless mode? Is it disabled permanently in headless?

Sami Kyostila

unread,
Sep 6, 2017, 1:53:17 PM9/6/17
to jasontu...@gmail.com, headless-dev
Which platform are you testing on? I believe microphones and audio access in general should work, but it's not a use case we've looked at very closely.

- Sami

ke 6. syysk. 2017 klo 4.08 jasontu...@gmail.com kirjoitti:
Hello,

I've got some tests that make use of the microphone. It works fine windowed. I've allowed microphone access and have no trouble. Using the same user profile I launch a headless instance of chrome and the microphone refuses to work. I've tried everything I can think of. Any reason why it wouldn't work in headless mode? Is it disabled permanently in headless?

--
You received this message because you are subscribed to the Google Groups "headless-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to headless-dev...@chromium.org.
To post to this group, send email to headle...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/headless-dev/60d55629-3501-4147-809b-8209d466faf0%40chromium.org.

jasontu...@gmail.com

unread,
Sep 6, 2017, 5:26:50 PM9/6/17
to headless-dev, jasontu...@gmail.com
I'm messing about in c# with chromedriver. From what I've read today, the --headless switch causes chrome to launch incognito with a temp user profile. Since I haven't got a persistent profile I've been attempting to get around it using switches. --use-fake-ui-for-media-stream --disable-infobars....a few others. Running visible these switches work to disable the allow mic prompt but as soon as I switch to headless they refuse to work. I'm stumped.

Sami Kyostila

unread,
Sep 7, 2017, 5:28:52 AM9/7/17
to jasontu...@gmail.com, headless-dev
Right, it's not possible to control permissions in headless mode currently. Bug 631464 tracks this work.

- Sami

jasontu...@gmail.com

unread,
Sep 7, 2017, 11:44:46 AM9/7/17
to headless-dev, jasontu...@gmail.com
Yeah. I figured that one out :) Do you know of any particular reason that googles speech api would refuse to work with the microphone in headless mode when other microphone functions work? For instance, if I go here: https://www.google.com/intl/en/chrome/demos/speech.html in headless mode and allow the microphone using --use-fake-ui-for-media-stream recognition never starts...it behaves as though the mic is not enabled. But if I run the same setup and head to https://watson-speech.mybluemix.net/microphone-streaming-text-to-console.html mic recognition begins immediately. So I think I've narrowed it down to just googles speech api not liking headless. I can't find any specific info on this though.
Reply all
Reply to author
Forward
0 new messages