webui-dev / webui

Use any web browser or WebView as GUI, with your preferred language in the backend and modern web technologies in the frontend, all in a lightweight portable library.
https://webui.me
MIT License
2.97k stars 173 forks source link

Is it possible to enable the microphone or camera without asking for permission? #257

Closed skinkairewalker closed 10 months ago

skinkairewalker commented 11 months ago

Hello WebUi Team, is it possible to enable the microphone or camera without asking the user for permission? I would like to embed voice chat in my game, then it would be a bit annoying for lay users to have to worry about giving permission...

Is there any way to do this?

fibodevy commented 11 months ago

For now, no. Unless you find a command line switch that enables it. Even then, it wont work for every browser, and the WebUI needs to support at least the major browsers and they all need to have the same functionality.

As name says, Web UI, is a user interface. Yes, you can write JS apps and run them in the browser, but the right way would be to make your app record the microphone, not the browser. And for that you dont need any permissions.

If your entire app is written in JS, why use WebUI? There are alternatives, such as Electron, which IIRC has the option to interact with devices without asking the user.

hassandraga commented 11 months ago

I guess --use-fake-ui-for-media-stream won't work. But normally browsers don't ask for permissions when using localhost. Are you sure @skinkairewalker your app prompt the permission on localhost?

skinkairewalker commented 11 months ago

In this case, I'm using https://jam.systems/ to create a voice chat.

hassandraga commented 11 months ago

Is your game written in TS?

skinkairewalker commented 11 months ago

I used construct3

hassandraga commented 10 months ago

Use TLS version of WebUI, and add OpenSSL libraries to your game, and this is far as WebUI can go. We can't change the web browser behavior. Sorry.

skinkairewalker commented 4 months ago

hi, In version 2.5.0 will it be possible to use a microphone?