Bug 185448

Summary: getUserMedia not working in apps added to home screen that run in standalone mode
Product: WebKit Reporter: Thomas Steiner <tomac>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ahayes, alejandro.silva, allen.joslin, andrey, armin, bevans, borisboha, brianpeiris, cedric, christian.scheja, connell, conrad.caplin, david.erenger, denacke, dirkk0, dmitriy.olefirenko, dom, dquintanilla, eactisgrosso, elitree, elliotjameschong, eric.carlson, erik.hodge, fits4alltest, gabriel, g+bugwebkitorg, geckse, gfoulon, jamallucas, jamauro, jer.noble, jonathan.ruddell, juraj.malecka, kling.robert, kris, lhall, louis.ormerod, luming_yin, mail, marcio.a.santos, martiminchev, matt.reimer, me, me, mike2009, mike.bartsch, milk, mukilan6, nates, nfckngspmpls, nick, nicksrandall, nicolas, nvganesh, office, omkar.sankaran, patrick, paul.neave, paul, petez, pjtuxe, richard.lania, robin.thunell2, robin.thunell, roman.skvazh, sandro, schngrg, stas.karpov.dev, stephane, talk, tinlamngoc, todd, unilynx, victor, wcl, webkit-bug-importer, webkit-bugzilla, wgrisaitis, wilcox.porter, wrtout, wtykirby, youennf
Priority: P2 Keywords: InRadar
Version: Safari 11   
Hardware: Unspecified   
OS: Unspecified   

Description Thomas Steiner 2018-05-08 14:50:01 PDT
Steps to reproduce:

1) Go to https://qrsnapper.appspot.com in Safari. 
2) Grant camera access and see a live picture.
3) Add https://qrsnapper.appspot.com to the home screen.
4) Launch the app from the home screen and notice how getUserMedia is not supported. 

This also affects more prominent apps like https://ofo.ride.com/, a ride sharing app featured at Google i/o.
Comment 1 Thomas Steiner 2018-05-08 14:54:38 PDT
Sorry, wrong URL, try https://ride.ofo.com/#/scancode instead.
Comment 2 Radar WebKit Bug Importer 2018-05-10 21:02:36 PDT
<rdar://problem/40152738>
Comment 3 Thomas Steiner 2018-10-31 04:50:07 PDT
Also reported in https://bugs.webkit.org/show_bug.cgi?id=185448.
Comment 4 Rick Lania 2019-01-28 09:36:40 PST
This also was an issue with Stance's self checkout PWA: https://go.stance.com/

Consumer's could not scan product bar codes once the app was added to the home screen.
Comment 5 Nick 2019-01-28 19:47:26 PST
This is also causing problems for https://vision.bloomberg.com. WebApp is un-usable as a full screen PWA.
Comment 6 dirkk0 2019-02-09 03:39:25 PST
I can confirm this.

Q1: Is there any information why the PWA WebKit was crippled to not support getUserMedia (which the standard WebKit supports), and if this behaviour is intended and going to stay?
Q2: Also, could somebody provide a link to the official documentation (I didn't find any) that documents this behaviour, so that PWA developers don't fall into that trap?

Thanks, Dirk
Comment 7 Jamal 2019-02-28 02:52:12 PST
I also had problems with https://qrsnapper.com/
Comment 8 Stéphane Magnenat 2019-03-04 08:25:34 PST
This is likely similar to:
- this bug on chromium tracker: https://bugs.chromium.org/p/chromium/issues/detail?id=752458 
- this bug tracking an issue submitted to Apple: http://www.openradar.me/33571214
- this discussion on Apple developer forum: https://forums.developer.apple.com/thread/88052
Comment 9 dom 2019-04-08 10:03:09 PDT
+1 -- highly desirable to improve the quality of homescreen PWAs.

Access to phone camera in particular is very high priority: works in Safari, works on Android, why doesn't it work on an iOS homescreen PWA?

Please prioritize!
Comment 10 Philipp 2019-04-09 14:01:59 PDT
+1 Would be great to have this
Comment 11 Ernst 2019-04-15 01:42:35 PDT
+1 It will be fantastic to have this.
Comment 12 Mike Benna 2019-05-13 10:24:49 PDT
+1 I have an Angular SPA that needs the microphone for transcription services. It's a shame it works fine in Safari as a web page but won't work from the home screen as a PWA. That seems totally backwards to me.
Comment 13 youenn fablet 2019-05-21 14:05:00 PDT
(In reply to dirkk0 from comment #6)
> I can confirm this.
> 
> Q1: Is there any information why the PWA WebKit was crippled to not support
> getUserMedia (which the standard WebKit supports), and if this behaviour is
> intended and going to stay?

This is a known limitation of WKWebView that we want to fix.
Comment 14 gabrielstuff 2019-06-03 13:37:02 PDT
hello !
I could not believe it when I read it! Are you planing support for getUserMedia in WKWebView ? If so, do you have a schedule to share ?

Can we help ?

Thanks a lot,

Gabriel
Comment 15 gabrielstuff 2019-06-03 13:46:05 PDT
Please not that this has been there since 2 years :

https://bugs.webkit.org/show_bug.cgi?id=180551

Thanks for any infos.

G
Comment 16 Dmitriy 2019-06-04 00:43:38 PDT
We need it for our app. We need this feature for scanning barcodes, but it is not available in Safari on iOS.
Comment 17 Nick 2019-06-05 18:08:19 PDT
I can confirm this is now working on iOS 13 beta 1!

Woohoo!!
Comment 18 Thomas Steiner 2019-06-06 00:55:36 PDT
Thanks, team WebKit from team Chromium: https://twitter.com/ChromiumDev/status/1136541745158791168. 🎉
Comment 19 Thomas Steiner 2019-06-19 06:20:45 PDT
FYI, this seems to have regressed on iOS and iPadOS 13 beta 2, while it was still working on beta 1.

I just verified this to no longer work on my iOS device, and @garygarside on their iPadOS device (https://twitter.com/garygarside/status/1141319378920726531).
Comment 20 Eric Carlson 2019-06-19 08:58:44 PDT
(In reply to Thomas Steiner from comment #19)
> FYI, this seems to have regressed on iOS and iPadOS 13 beta 2, while it was
> still working on beta 1.
> 
> I just verified this to no longer work on my iOS device, and @garygarside on
> their iPadOS device
> (https://twitter.com/garygarside/status/1141319378920726531).

@tomac we had to disable the feature because we found a serious bug. We're working hard to fix it and hope to be able to re-enable it soon.
Comment 21 Gaël FOULON 2019-07-03 09:31:53 PDT
I'm wrong or in iOS 13 beta 3: even in Safari the getUserMedia is no more working (even not asking to grant access to camera).
Please confim that iOS 13 will include getUserMedia for both Safari and PWA from Home Screen.
It was a fantastic news on Beta1, so sad on Beta2 and even more confusing in Beta3.
Thank you for your feedback.
Comment 22 Ezequiel Actis Grosso 2019-07-18 14:44:15 PDT
Still not working in beta 4. Not even in Safari.
Comment 23 Nick 2019-07-18 15:22:28 PDT
Oddly enough, it only works in landscape for me on iOS 13 beta 4. I hope this isn’t a situation like image/webp where an exciting feature gets teased in a beta only to be removed before the final release. However, I understand that sometimes it has to be this way.
Comment 24 youenn fablet 2019-07-18 15:28:40 PDT
(In reply to Nick from comment #23)
> Oddly enough, it only works in landscape for me on iOS 13 beta 4.

This is probably bug 199519 which is fixed in ToT.
Comment 25 rud erm 2019-07-24 06:47:15 PDT
can you confirm getUserMeida for PWA on ios 13?
Comment 26 Bryant P 2019-07-30 11:19:43 PDT
Just tested with iOS 13 Beta 5, no luck.
Comment 27 Thomas Steiner 2019-07-31 01:57:58 PDT
(In reply to Eric Carlson from comment #20)
> @tomac we had to disable the feature because we found a serious bug. We're
> working hard to fix it and hope to be able to re-enable it soon.

Meanwhile just to highlight the hoops people go through to make this happen: "We have invented our own workaround in Cordova since iOS 11 by using a native plugin for capturing the camera, then sending it with WebRTC to the WKWebView (which joins as a peer on local phone WITHOUT signaling server) and receives a usable VideoStream, with 1ms delay."—https://twitter.com/QbixApps/status/1156484156425039872
Comment 28 Tin 2019-08-08 23:59:28 PDT
It still doesn't work in iOS 13 Beta Build 6....
Comment 29 jamauro 2019-08-11 15:27:53 PDT
+1 please add getUserMedia support for PWAs
Comment 30 Conrad C 2019-08-12 20:30:49 PDT
(In reply to Tin from comment #28)
> It still doesn't work in iOS 13 Beta Build 6....

I just tested with iOS 13 beta seed 6 and it worked.  Device I used was an old iPhone 6S.
Comment 31 Thomas Steiner 2019-08-13 00:14:10 PDT
> I just tested with iOS 13 beta seed 6 and it worked.  Device I used was an
> old iPhone 6S.

Please note that this bug is exclusively for web apps that are added to the home screen. Could you confirm that it works when you add https://qrsnapper.com to the home screen and launch it from there? For what it's worth, I just tried it (again), and it failed (on an iPhone X, iOS 13 beta 6).
Comment 32 Tin 2019-08-13 02:04:02 PDT
(In reply to Thomas Steiner from comment #31)
> > I just tested with iOS 13 beta seed 6 and it worked.  Device I used was an
> > old iPhone 6S.
> 
> Please note that this bug is exclusively for web apps that are added to the
> home screen. Could you confirm that it works when you add
> https://qrsnapper.com to the home screen and launch it from there? For what
> it's worth, I just tried it (again), and it failed (on an iPhone X, iOS 13
> beta 6).

I tried my own application in standalone mode and the qrsnapper you provided. I've added them both to my homescreen as a PWA. When trying to acces my camera, it doesn't show any permissions at al.
Comment 33 Thomas Steiner 2019-08-13 02:05:54 PDT
> I tried my own application in standalone mode and the qrsnapper you
> provided. I've added them both to my homescreen as a PWA. When trying to
> acces my camera, it doesn't show any permissions at al.

Right, so it fails, which is inline with what everyone else has experienced so far. Thanks for confirming.
Comment 34 Conrad C 2019-08-13 18:43:19 PDT
(In reply to Thomas Steiner from comment #33)
> > I tried my own application in standalone mode and the qrsnapper you
> > provided. I've added them both to my homescreen as a PWA. When trying to
> > acces my camera, it doesn't show any permissions at al.
> 
> Right, so it fails, which is inline with what everyone else has experienced
> so far. Thanks for confirming.

I can replicate the issue you are having with qrsnapper.com, but our web app which did not work prior to beta seed 6 now works.  

I also noticed that go.stance.com, which was previously reported as not working in comment 4, now works.

Here is a video capture when of each of the 3 web apps: https://www.dropbox.com/s/t731imv9gli5bur/qrscanner_RPReplay_Final1565746618.MP4?dl=0
Comment 35 Conrad C 2019-08-13 20:34:27 PDT
And screen capture showing it working as home screen shortcut, not just a favorite: 

https://www.dropbox.com/s/mt9lfumdielsejr/qrscanner_home_screen_shortcut_RPReplay_Final1565753566.MP4?dl=0
Comment 36 Tin 2019-08-13 23:43:06 PDT
(In reply to Conrad C from comment #35)
> And screen capture showing it working as home screen shortcut, not just a
> favorite: 
> 
> https://www.dropbox.com/s/mt9lfumdielsejr/
> qrscanner_home_screen_shortcut_RPReplay_Final1565753566.MP4?dl=0

Hey, thanks for the update.
Have you tried to convert it to a Progressive Web App yet in standalone mode?
If you could do that and confirm that would be great.

I've tried your method already by setting it to browser display mode and it works yes.
Comment 37 Stéphane Magnenat 2019-08-13 23:59:20 PDT
does anyone knows if getUserMedia also works in WkWebView? I expect PWA to be built on WkWebView but it is unclear to me whether the security rules will be the same. WkWebView support is important for web-based apps such as ones built on Cordova.
Comment 38 Thomas Steiner 2019-08-15 23:44:42 PDT
Just tested https://qrsnapper.com/ added to home screen in beta 7 (build 17A5565b). Doesn't work :-(
Comment 39 Tin 2019-08-22 23:43:04 PDT
Still broken in iOS 13 beta 8.
Comment 40 Zsolt Fekete 2019-08-27 02:08:10 PDT
Any chance to get this feature in the final iOS13, or in the upcoming betas?
Comment 41 Nick 2019-08-27 12:58:46 PDT
Still broken iOS 13.1 beta 1.
Comment 42 me 2019-08-27 19:41:06 PDT
Confirming that this is not working in 13 beta 6 or beta 7. 

This is very unfortunate and impacting my company in which a PWA is a requirement. We had high hopes when we saw Beta 1 but that appears to be a fluke.

Does anyone feel bad enough yet to flip the magic switch to enable this feature? Beta one proved it’s not a technical one.
Comment 43 jamauro 2019-09-22 18:34:55 PDT
(In reply to Stéphane Magnenat from comment #37)
> does anyone knows if getUserMedia also works in WkWebView? I expect PWA to
> be built on WkWebView but it is unclear to me whether the security rules
> will be the same. WkWebView support is important for web-based apps such as
> ones built on Cordova.

From my testing, it looks like getUserMedia does *not* work in WkWebView. If you find a workaround for Cordova, please let me know.
Comment 44 Walid Tout 2019-09-22 20:05:38 PDT
So far the only way to make it work is to pass / access it through the browser (Safari), which gets you access to the camera. To do that, you can set the Manifest's "display" to "browser" (which nets you parts of the browser's UI including the navigation bar, etc...) rather than "standalone" (for a true PWA).  This is very unfortunate as we all (well at least most) believed Apple would grant PWA's access to the camera with iOS 13.
Comment 45 iamporter 2019-09-25 15:29:35 PDT
There's a Vue.js component, vue-croppa (https://www.npmjs.com/package/vue-croppa), that has been incorporated in a Vue project that's live on poplr.herokuapp.com with a manifest.json > display: fullscreen that is able to successfully access an iphone's camera after opening app from homescreen. I'm on ios 12.2 but will update to 13.1 and confirm later that camera access still works. 
Hopefully someone can dig into this component's source code and determine how camera access was granted from PWA installed without the awful "browser" display.
Cheers!
Comment 46 me 2019-09-25 19:10:08 PDT
iamporter I looked at the app you're pointing at and it is unrelated to this bug. The app in reference is just accessing the iOS camera using <input file=""/> and the media capture api. This is a completely different feature than getUserMedia which is being discussed here.
Comment 47 Tin 2019-09-26 00:36:46 PDT
 display: fullscreen doesn't work for iOS 

What won’t work
The display: fullscreen and display: minimal-ui won’t work on iOS; fullscreen will trigger standalone, and minimal-ui will be just a shortcut to Safari. You can get something similar to fullscreen (the status bar will exist but over your app) using the cover-fit viewport extension or a deprecated meta tag though.

https://medium.com/@firt/progressive-web-apps-on-ios-are-here-d00430dee3a7
Comment 48 Thomas Steiner 2019-10-21 11:59:20 PDT
📦 ParcelTrackingApp (https://parceltrackingapp.com/en) is one of these unfortunate apps where due to this bug after adding to home screen you have less features available than before.
Comment 49 Conrad C 2019-10-21 12:18:23 PDT
It’s sub-optimal, but there is a slight work around that I just tested. Use the iOS shortcuts app, select Open URL under Safari, copy in the URL of the package tracing web app, and save the shortcut to home screen.  When you tap on the shortcut, the web app camera function is available and works.
Comment 50 Marcio Santos 2019-10-25 11:16:04 PDT
Thanks! But, we still in the same theme. The Home Screen icon is acceptable, but it will just open Safari. Thus...
Comment 51 Peter 2019-11-01 09:54:06 PDT
Same situation here. Still not working in iOS 13.2. Really need to use standalone mode. Hopefully this is not a calculated restriction.
Comment 52 Eric Carlson 2019-11-01 11:54:31 PDT
(In reply to Peter from comment #51)
> Same situation here. Still not working in iOS 13.2. Really need to use
> standalone mode. Hopefully this is not a calculated restriction.

This restriction is definitely not a "calculated". We are definitely aware that this is an important feature, and are working on it!
Comment 53 Peter 2019-11-01 11:55:45 PDT
(In reply to Eric Carlson from comment #52)
> (In reply to Peter from comment #51)
> > Same situation here. Still not working in iOS 13.2. Really need to use
> > standalone mode. Hopefully this is not a calculated restriction.
> 
> This restriction is definitely not a "calculated". We are definitely aware
> that this is an important feature, and are working on it!

That's great to hear, thank you.
Comment 54 Armin Hierstetter 2019-11-11 02:21:37 PST
Hi there,

retroplace.com also suffers from this: We use heavily relied on barcode scanner to quickly identify games. As a standalone app people are stuck.

This bug has been around for one and a half years now – given the impact it has on many web apps, I do hope this is finally fixed.

Best


Armin
Comment 55 Marcio Santos 2019-11-11 17:06:12 PST
A terrible impact on our project as well, but here there is still time to abandon this aproach. Unfortunately, as we do not have a visible roadmap for this solution, we are stuck with our hands. We will only continue with the Android platform for now.
Comment 56 Greg 2019-11-11 21:36:10 PST
We are stuck waiting for this to be fixed as well.. this is terrible.
This hurts the reputation of PWA.

A roadmap would be much, much, much appreciated.
Comment 57 Stéphane Magnenat 2019-11-12 00:06:32 PST
Same for us, combined with the reported situation that Apple rejects web-based apps (e.g. Cordova ones) in the app store, it really creates a dead-lock for media rich HTML5 apps (e.g. Augmented Reality, image and sound capture and edition, etc.).
Comment 58 Tin 2019-11-12 00:35:42 PST
@Eric Carlson Do you have any idea when this is going to be fixed?
Since you are stating that you are working on it... I cannot track this bug anywhere on your backlog on https://trac.webkit.org/
Comment 59 Mike Bartsch 2019-11-13 15:11:16 PST
What is the current state and when it would be fixed?
Comment 60 nates 2019-11-18 13:43:42 PST
That is great news Eric. Thanks for reporting here.

We, too, have been waiting on this bug to be resolved.

It looks like https://trac.webkit.org/changeset/252335/webkit contains some tests for something related. Glad to see it's getting attention! :-)
Comment 61 gabrielstuff 2019-11-18 15:43:21 PST
Wow, just discovered that *Eric* told it was not calculated. After the recent issue about developer discovering that finally UIWebview was banned and poor phonegap / cordova app had difficult time going trhough the app process I was almost sure that the lack of getUserMedia in standalone mode was calculated.

Thanks a lot for confirming this is not the case. Thanks a lot for working on it. Can we help in any ways ?

Thanks again :-)
Comment 62 Marcio Santos 2019-11-18 15:48:20 PST
Extremely excited by the focus given to trying to resolve this issue! Let's put all our stuffs on hold, cheering for news soon!
TIA, @Eric Carlson! And to all guys in the game.
Comment 63 Matt Reimer 2019-11-22 20:10:44 PST
@Eric Carlson thanks for letting us know.

We need this feature for our simple but camera-centric PWA app and would really appreciate a timeline, even if it's rough. 

We have some big decisions to make about how/whether to proceed with our app and iPhone users are about half our audience. 

Even knowing if it's weeks, months or years would help us out a lot.

Thanks
Comment 64 Al; 2019-11-30 13:26:07 PST
I also want to thank Eric for working on this bug - I launch in a couple of short months and just found this bug 

I do not know if I can work around this, any timeline of hoped for resolution would be great!
Comment 65 tjyoung 2019-12-06 07:01:22 PST
This is an absolutely crushing setback for our app as well. 
I'm glad someone is 'working on it' but what we really need to know is when??
Forget promptInstall and notifications etc. etc. Just this basic functionality is really, really needed.
Comment 66 Peter 2019-12-06 07:03:40 PST
I concur that some sort of clue to the progress / forecast here would be appropriate. This is such a major bug that we (like many others here) need to start making some serious decisions (like abandoning PWA entirely). 

Just letting us know whether this is weeks or months or years away would be really appreciated.
Comment 67 Al; 2019-12-06 07:21:43 PST
Yes, a timeline would be fantastic !

And any information to help understand how long after this fix is into the WebKit before we can expect things to start working in iOS 

Will that require a release from Apple?  Is there anyone on this thread from Apple that could speak to that?

And finally: this bug has been on-the-list for a year and a half -- what can I/we do to get it's priority increased above 'Normal' ?

Thanks for all your great work,
Al;
Comment 68 youenn fablet 2019-12-06 07:25:49 PST
I do not think there is any additional work to be done on WebKit side.
Comment 69 Armin Hierstetter 2019-12-06 07:28:02 PST
After 18 months that have passed by without significant progress, I have to come to the conclusion that Apple – for whatever reasons – does not want PWAs to be able to access the camera. Probably because they would be too close to apps that people would buy in the app store where Apple makes money.

So we do what we have to do: We tell our users that Apple does not seem to be interested in making that feature work and that we drop support for this feature on iOS devices.

Of course, we are pointing out that Android devices work just wonderfully.
Comment 70 William Kirby 2019-12-06 09:20:28 PST
Since section 4.2.6 was added to the Apple App Store Review Guidelines it has become more difficult for data-driven applications that share a base template to make it into the App Store. For many use cases, PWAs provide an alternative solution that is simpler to deploy, host, and maintain while also helping to prevent overcrowding of the App Store.

However, lack of support for features like this prevent many applications from going the PWA route, leaving you with very few options if your application is template based.

It would be fantastic if the priority of this issue could be increased or if a target date could be set. This would allow business decisions to be made on the future viability of PWAs that need access to the camera.
Comment 71 tjyoung 2019-12-06 11:27:26 PST
Just wrecks the user experience popping out of a Pwa
To handle this shortcoming
Works beautifully in android. 
Able to work in safari already

Such a disappointment spending the effort only to hit a senseless roadblock like this one
Comment 72 Marcio Santos 2019-12-06 13:53:43 PST
I faced this problem just over a month ago. And I confess that I was excited, but I think it's just an incorrect perception of the situation. But I must confess that when I read Armin Hierstetter's text, I get discouraged. It's not just about the paperwork of publishing an app or the profit on one side or the other. Having this problem means that we cannot fulfill requests from our own customers. This means that we need to stop providing modern solutions. I suppose you also notice the distrust in your customers when you say it works on Android but not iOS. So shame.
Comment 73 Erik Hodge 2020-01-07 23:48:19 PST
@eric carlson: it's great to know that you're working on this, cheers!  We've been in a holding pattern for a while with an object-verification feature that relies on a fix for this.  The executives of our clients' companies often use iOS devices and aren't very understanding about this roadblock to deployment.  Please do inform us if you're still working on this or not, and, if so, when you hope to provide the solution.  Thanks much!
Comment 74 milk 2020-01-10 08:59:29 PST
Chiming in to say that I am also looking forward to seeing getUserMedia in WKWebView. AR.js depends on this feature. Currently I'm using it to support augmented reality with Ionic/Angular in a native app and I have to limit support to Android only.
Comment 75 Robert 2020-01-13 04:43:16 PST
Also looking forward to this getting fixed. I am building an app that really needs a fullscreen UI in combination with WebRTC.
Comment 76 Paul 2020-01-13 07:43:22 PST
+1 Really need getUserMedia access to allow QR code scanning in a PWA
Comment 77 Armin Hierstetter 2020-01-13 07:50:39 PST
After more than one and a half years and the last response from Apple more than half a year ago, one has no chance but to conclude that Apple has no intention to fix this any time soon. Which is really a shame given the demand for fixing this bug.
Comment 78 rud erm 2020-01-21 07:23:33 PST
now also "normal" camera turns black after exiting the app and reenter again
https://bugs.webkit.org/show_bug.cgi?id=206219
Comment 79 Peter 2020-01-21 07:44:42 PST
Some kind of update here would be really appreciated. This is a big enough issue to force major business decisions. We've held out as long as we can over this issue.
Comment 80 Al; 2020-01-21 07:56:48 PST
My app launches in 90 days and I have had to downgrade my customers' expectations

They are quite unhappy that the app will not have feature parity between IOS & Android

Where else but here can we ask for progress?
Comment 81 tjyoung 2020-01-21 09:25:45 PST
thats exactly my situation. Trying to figure out ways to lower expectations if you are on iphone. Works perfectly on Android. Hobbled on iOS. I really wish out of all the shortcomings I've come across.. this one would be fixed. It's a show stopper.
Comment 82 Mathrubhasha 2020-02-05 18:59:04 PST
I have to put my go live because of this. Hopefully something will be out soon that is positive!
Comment 83 Luming Yin 2020-02-05 20:18:04 PST
With today’s iOS and iPadOS 13.3 Beta, WebRTC (getUserMedia) should work as expected in home screen web apps. https://developer.apple.com/download/
Comment 84 Luming Yin 2020-02-05 20:19:09 PST
With today’s iOS and iPadOS 13.4 Beta, WebRTC (getUserMedia) should work as expected in home screen web apps. https://developer.apple.com/download/
Comment 85 Thomas Steiner 2020-02-06 00:59:58 PST
I’m indeed happy to confirm that this works fine (again) as of iOS 13.4 beta 1 (Build 17E5223h). Thanks, team WebKit, for fixing this 🎉. Marking the bug as Resolved Fixed.
Comment 86 Armin Hierstetter 2020-02-06 01:03:57 PST
Maybe we wait for the final release before we mark this RESOLVED? The bug has been "fixed" before and then appeared again. At least we should wait until a public release is confirmed to have this bug fixed.
Comment 87 Stéphane Magnenat 2020-02-06 01:26:05 PST
Does anyone knows if the fix also allows getUserMedia to work in WKWebView beside home screen? That would be useful for Cordova-based apps for example.
Comment 88 Thomas Steiner 2020-02-06 01:35:06 PST
(In reply to Stéphane Magnenat from comment #87)
> Does anyone knows if the fix also allows getUserMedia to work in WKWebView
> beside home screen? That would be useful for Cordova-based apps for example.

I just tested this on Chrome for iOS, which is WKWebView based, and in my tests unfortunately it didn’t work :-(

> Maybe we wait for the final release before we mark this RESOLVED?
> The bug has been "fixed" before and then appeared again. At least
> we should wait until a public release is confirmed to have this
> bug fixed.

For the time being it works. Since this bug was explicitly about apps added to home screen (and not about web view) I think it’s dair to mark it fixed. If it regresses again, I will of course re-open it.
Comment 89 Thomas Steiner 2020-02-06 01:36:54 PST
> For the time being it works. Since this bug was explicitly about apps added
> to home screen (and not about web view) I think it’s dair to mark it fixed.
> If it regresses again, I will of course re-open it.

s/dair/fair
Comment 90 gabrielstuff 2020-02-06 01:45:24 PST
Thanks Thomas for keeping us up to date. All the other ones, welcome to the roller coaster 🎢 !

We are at 5 months of the last 🎉 anniversary. During the summer, we had to unfortunately discover that the features showed in the beta did not land in the release : https://twitter.com/ChromiumDev/status/1136541745158791168?s=20

Apparently for security reason as Eric Carlson said (https://bugs.webkit.org/show_bug.cgi?id=185448#c20)

We really should wait for the release before saying it is fixed. We might discover an other security issue or something else.

As a remember, you can test: https://qrsnapper.appspot.com or https://go.stance.com/ added to home screen.

As for Cordova/Phonegap, remember that last year the fix was on *SFSafariviewController* not WkWebviewController. 

Thanks Thomas for testing on Chrome which use WkWebviewController and confirm that, it does not work.

Would like to know if Apple let SFSafariviewController with transparent controller land in the app store.

GD
Comment 91 tjyoung 2020-02-06 01:52:33 PST
Sorry if dumb question: but does anyone have any idea when this fix would be for general release? Mentions 13.4 beta. Just trying to get a sense for when our users could take advantage of this much needed fix
Comment 92 Luming Yin 2020-02-06 23:53:38 PST
(In reply to tjyoung from comment #91)
> Sorry if dumb question: but does anyone have any idea when this fix would be
> for general release? Mentions 13.4 beta. Just trying to get a sense for when
> our users could take advantage of this much needed fix

Universal purchase is a new feature in Xcode 11.4, and Xcode 11.4 includes the iOS 13.4 SDK. On “Updates to Universal Purchase and App Store” (https://developer.apple.com/news/?id=02052020a), Apple has mentioned universal purchase will be available "starting in March 2020".
Comment 93 Mathrubhasha 2020-02-07 18:52:47 PST
(In reply to Luming Yin from comment #92)
> (In reply to tjyoung from comment #91)
> > Sorry if dumb question: but does anyone have any idea when this fix would be
> > for general release? Mentions 13.4 beta. Just trying to get a sense for when
> > our users could take advantage of this much needed fix
> 
> Universal purchase is a new feature in Xcode 11.4, and Xcode 11.4 includes
> the iOS 13.4 SDK. On “Updates to Universal Purchase and App Store”
> (https://developer.apple.com/news/?id=02052020a), Apple has mentioned
> universal purchase will be available "starting in March 2020".

I confirm that with 13.4 beta, in Standalone mode, Microphone works. This is a great relief and thank you all for fixing this issue. You guys made my day.
Comment 94 Louis Ormerod 2020-02-17 13:53:36 PST
Absolutely... hear hear! 
I'm testing in 13.4 beta and it's all looking good. 
Great job guys! :)
Comment 95 Erik Hodge 2020-03-05 15:15:44 PST
To those of you who are hoping for getUserMedia support in iOS WKWebView-based browsers like Chrome, I filed Bug 208667 to ask for that fix/implementation.  Please pile on comments in there if you need that feature.
Comment 96 Omkar Sankaran 2020-03-26 12:13:00 PDT
I can confirm that 13.4 on iPhone 11 pro after removing <meta name="apple-mobile-web-app-capable" content="yes" /> am able to access the camera (using webrtc) from a shortcut added to the home screen.
Comment 97 CodePredatorz 2020-05-07 03:10:19 PDT
Can you please confirm getusermedia will work on WKwebview, my application now its in beta stage its working fine for me, but I'm not sure it will work or not once my app in live, please kindly help me
Comment 98 stas.karpov.dev 2020-06-17 03:33:44 PDT
Camera works on IOS 13.5.1 (iPhone 6s) as "add to home screen" app.
Comment 99 Sandro 2020-07-01 07:53:32 PDT
Certain websites (e.g. https://qrsnapper.appspot.com) still don't work.
For me it was the fact that multiple calls to getUserMedia were made and in mobile Safari only the last of these worked, which can be super confusing, since it makes different components work based on order.
Comment 100 nfckngspmpls 2020-08-27 02:44:31 PDT
Related, but not the same issue. I am working on a Vue app with hash routes and every time I came back to the camera, I was prompted to allow using the camera. Oddly, this only happened in standalone mode. 

The workaround, that worked for me was changing the router mode to abstract.

The issue is, that every time the hash changes the camera permission in standalone mode is revoked.

I hope this workaround will be useful for others.

I also filed a bug for this behaviour: see bug 215884