NEW 260345
navigator.mediaDevices.getUserMedia() requires playsinline on (hidden) video element to work on iOS
https://bugs.webkit.org/show_bug.cgi?id=260345
Summary navigator.mediaDevices.getUserMedia() requires playsinline on (hidden) video ...
Nico Weber
Reported 2023-08-17 06:30:07 PDT
Repro: https://github.com/nico/hack/blob/1e234e3a12a82d/webgl/cam.html , but the simpler https://jsfiddle.net/kw8fbcma/4/ probably also works if you delete the `video.playsInline = true;` on line 7. WebKit/iOS is the only engine that requires `playsinline` for this to work. Without it, Safari/iOS only shows the first frame. With it, it shows a continuous webcam feed (with some color effect on top). Things work fine in Safari/Mac (version 16.5, default on macOS 13.4), in Firefox/Mac, and in Chrome/Mac and Chrome/Android: There, you get a continuous webcam feed even without `playsinline`. Given that the video element isn't even visible, maybe `playsinline` could be made not required for navigator.mediaDevices.getUserMedia(), for better web compat? Maybe even if navigator.mediaDevices.getUserMedia() goes to a visible video element? (Note that I'm filing this as a private person, even though I use my old @chromium.org webkit.org account.)
Attachments
Radar WebKit Bug Importer
Comment 1 2023-08-24 06:31:14 PDT
Note You need to log in before you can comment on or make changes to this bug.