NEW 282327
Camera doesn't start in PWA
https://bugs.webkit.org/show_bug.cgi?id=282327
Summary Camera doesn't start in PWA
Danny Moerkerke
Reported 2024-10-30 05:36:46 PDT
Created attachment 473078 [details] screen recording of the camera not starting. When trying to start the camera with getUserMedia, the camera starts up as shown by the red indicator in the top left of the screen but after a few seconds it closes and no stream is returned, nor an error is reported. When I restart my iPhone, the problem goes away but returns after a while. To reproduce: 1. navigate to https://whatpwacando.today/ and install the app to the Home Screen 2. start the app and tap the Media capture demo 3. click the "+" button in the bottom left of the webcam component in the page 4. either the camera starts and getUserMedia returns a stream or nothing happens and the camera indicator in the top left of the screen disappears again. 5. if the camera doesn't start, restarting the device will fix the issue but it returns some time later. I attached a video recording of the issue.
Attachments
screen recording of the camera not starting. (48.81 MB, video/mp4)
2024-10-30 05:36 PDT, Danny Moerkerke
no flags
Radar WebKit Bug Importer
Comment 1 2024-11-06 04:37:18 PST
clement.corthier
Comment 2 2024-12-19 12:17:31 PST
+1 on this I can confirm observing a similar issue on iPhone but not necessarily with PWA. Specifically, I encounter the error: A MediaStreamTrack ended due to a capture failure immediately after calling the getUserMedia method. The iPhone fails to open the camera on any website that utilizes it: for example this sample: https://webrtc.github.io/samples/src/content/getusermedia/gum/. Interestingly, as you mentioned, after a few device restarts and waiting a few hours, the issue resolved itself. This bug potentially impacts a significant number of users. In our case, ~200k iPhone users a month access an app we developed that relies on getUserMedia, and we estimate that ~1% of them get a "MediaStreamTrack ended" event right after the getUserMedia method and fail to open the camera.
Note You need to log in before you can comment on or make changes to this bug.