WebApps icon indicating copy to clipboard operation
WebApps copied to clipboard

Enable access to camera and microphone

Open sm4rk0 opened this issue 8 years ago • 12 comments

...if possible in System WebView. At least with the option to revoke/disable access. Check on https://test.webrtc.org/

sm4rk0 avatar Jan 06 '16 23:01 sm4rk0

This opens up some concerns:

  • when a user installs the app, they see that the app wants access to camera and microphone - immediate red flags for a "privacy oriented" app!
  • how can the user be absolutely sure that web apps can't sneakily access camera/mic while running? In future, when Service Workers are implemented in WebView, they could in theory do this even when the app isn't running!

tobykurien avatar Mar 30 '16 09:03 tobykurien

  • One solution for permissions would be a plugin (or plugins), just as Automate does this, and here you can find instructions about how to do this. I hope they help. Another, simpler, would be an explanation in the app description at Play Store / f-droid repo.
  • I don't know how this would work when using WebView, but Chrome (which the WebView is based on) asks a user when a site requests camera and microphone for the first time and there's the notification while they are being accessed. If a user doesn't trust a web site, they simply won't allow it the access.

sm4rk0 avatar Apr 05 '16 20:04 sm4rk0

I agree. Privacy is important but the users should be able to decide if the website can access the camera and microphone.

trymeouteh avatar Mar 10 '19 21:03 trymeouteh

Yeah, for instance, I was hoping to use this app as a way to sandbox a Google login and spoof a desktop UA to use Google Meet (because of course mobile UAs are blocked to download the app) for a work-related call. That sounds like a pretty privacy-oriented way to go about certain things like how I use container tabs in Firefox on desktop.

Everything was going good until I actually tried to join and saw I had no access to camera/mic from this app. I don't want my main browser sessions to be Google authenticated -- and this is a separate account anyhow.

toastal avatar Aug 29 '19 06:08 toastal

One solution is to have a separate fork of WebApps that makes a few concessions, like requesting location, camera, mic, etc. Then your critical apps can run in WebApps, but your media and navigation, etc. can run in the other.

Turns out, I already have such a fork: WebMediaShare https://github.com/tobykurien/WebMediaShare - it does not currently request those additional permissions, but that could be added. It behaves a bit differently to WebApps, hence the fork, but it still sandboxes the web apps and blocks 3rd party cookies and referrers.

Would that work?

tobykurien avatar Aug 29 '19 16:08 tobykurien

Sure, but doesn't each web app independently request access to location, camera, etc. anyways? Wouldn't you just be giving permissions for individual apps to ask permissions?

toastal avatar Aug 30 '19 02:08 toastal

Once WebApps is given permission to camera/microphone/location, then the system WebView will have access to these, regardless of which site is loaded. There isn't an API to enable/disable camera or microphone per site loaded in the WebView, as far as I can see. Also for most users, the WebView is updated as a binary blob from Google Play, so it can't really be trusted.

tobykurien avatar Sep 03 '19 18:09 tobykurien

Ah, I'm using Bromite's webview which is a bit better, but I was assuming webviews would work like a browser -- which you sadly can't containerize like Firefox's multi-account containers.

toastal avatar Sep 11 '19 08:09 toastal

Turns out, I already have such a fork: WebMediaShare https://github.com/tobykurien/WebMediaShare - it does not currently request those additional permissions, but that could be added.

This user would appreciate such an addition with great gratitude and humility.

Friptick avatar Oct 16 '19 16:10 Friptick

+1 but only if it possible to disable it in the options.

Alternative you could emulate them for apps which require them like anbox is trying: https://github.com/anbox/anbox/issues/727

WPFilmmaker avatar Apr 22 '20 18:04 WPFilmmaker

I noticed something interesting, if you go on translate.yandex.com and click 'visual translation', the site through Webapp is able to open the camera and take a photo, however then the result is an empty page not the translated image, and viewing the original image is impossible as well.

Is it because camera is not implemented yet?

WPFilmmaker avatar May 01 '20 13:05 WPFilmmaker

I think that's an image upload, e.g. you can compose a tweet on twitter and click to add an image, and you get the option to take a picture with the camera. However, as stated in #56 the actual upload from camera doesn't work, and I never figured out why (I wasn't sure if it was just my device, Lightning browser also had the same issue on my device at the time).

tobykurien avatar May 01 '20 15:05 tobykurien