Can't get MediaStream permissions in Browser Source

WolfKat

New Member
Preface: I created my own web document that successfully asks permission for and uses audio/mic input on regular Chrome using localhost.
It takes advantage of the transparency/alpha/opacity capabilities that browser sources provide in OBS vs. having a browser window open and using window capture.
Transparent background or not, however, I would rather avoid running a browser window during my streams as to save on resources.

OBS Version: The latest 26.1.1 (64bit)
I've tried this in the past before this version too.

What I've already tried after much searching:
Prompt tags like --enable-media-stream and --use-fake-ui-for-media-stream either on their own, or together.
I have launched OBS with and without Admin mode in all of these instances too.
I've done these steps on both my desktop and my laptop - no difference in results.
I've also tried including some other prompt tags that aren't really related to getting audio, but that's what happens when I get desperate to try whatever I can.

OBS still won't prompt or seemingly get my microphone permissions to work in my browser source.
I am also using the exact webpage URL (the localhost) that works on whatever browser (focusing on Chrome due to knowing OBS browser sources run with Chrome).
No matter what, my function and visual indicators for getting my microphone are not displaying when using the little browser source in OBS.

Something else I've tried is to disable all other audio inputs on my computer in hopes that maybe it's just a weird system in OBS that grabs an input of its choice. That didn't work either.

I even selected my microphone for the Input/Auxiliary Device in the Global Audio Devices, and still hasn't changed anything. (I'm sticking back to using media sources for my audio so there's better automated control in what I use for each scene during streams.)

Is there anything else I could do? Is it possible for tools or scripts to attach and force a browser source to get microphone permissions, and select a specific mic?
If so, I'd be willing to look into those options if I have the time. Otherwise, I'll make the suggestion in the Resource Requests forum.

I would prefer if OBS by default, had more of a user-friendly way to get these MediaStream permissions without using prompt tags; let alone the fact these steps I've taken do NOT work on either of my two devices. I'm at a loss here pretty much.
 

WolfKat

New Member
Here's a console log of the media inputs all getting my correct microphone.
OBS-mediastream.png

This is using the OBS debugging for the browser source, so it comes directly from activity within the browser source. It still doesn't seem to do anything with the grabbed inputs.
It matches the perfectly working and functional in-browser (not source) counterpart - always window refresh changing MediaStream ID aside, of course. (It seems randomly generated)
Regardless of ID, the names/kinds of my inputs remain the same.
 
I am also unable to the OBS Browser to prompt for access to the mic.
The custom web page I am running is served from an https internal site within our own network, and has a valid SSL certificate, so the prompt should only occur once.

Oddly, I set up a custom dock pointing to the https://www.onlinemictest.com/ site, and the mic worked without even requiring a prompt!!
 

WolfKat

New Member
I am also unable to the OBS Browser to prompt for access to the mic.
The custom web page I am running is served from an https internal site within our own network, and has a valid SSL certificate, so the prompt should only occur once.

Oddly, I set up a custom dock pointing to the https://www.onlinemictest.com/ site, and the mic worked without even requiring a prompt!!

Interesting!
I tried looking into this more with a web dev friend, and we discovered it could be because the CEF used in OBS has no support for the SpeechRecognition API for some weird reason. The API can be applied through some Google APIs thing, but comes with limitations not suited for streaming (such as word/quota limits).
Would be nice if CEF or the OBS browser sources themselves would finally support this without Google Cloud services. I was under the impression for a long time that the sources are far more like Chrome than CEF. Oh well. This lines up with other oddities I've noticed during my designing and development of HTML docs meant for browser sources.
Source 1, Source 2
(#1 is from 2017 though, so I'm unsure what has changed since then if anything changed at all)

Checking through the mic test site, it definitely confirms this since it uses no SpeechRecognition API in it. A shame though - I'm using SR API for the sole purpose of an animation happening only when there are legible words used. Not just for any sound.
Still, I'm surprised it activates and enables the mic on that site through OBS with such ease.

Definitely let me know if you find anything new on your end as well. Thank you for the response!
 
Through much testing, and discovery of sample code, I was able to get audio to work for my own web app… pointing the samr you conclusion you came to… it is the speech recognition in thr CEF browser that OBS uses.

if OBS allowed use of the standard Chrome browser, then problem solved.
 

kn1

New Member
Is this still the status quo or do we know if any other web speech APIs are supported?
 
Top