mozmorris / react-webcam

Webcam component
https://codepen.io/mozmorris/pen/JLZdoP
MIT License
1.63k stars 281 forks source link

Variety of issues on iOS 17 #385

Closed timhwang21 closed 7 months ago

timhwang21 commented 10 months ago

Please follow the general troubleshooting steps first:

Bug reports:

This may be an issue with the newly released iOS 17, and may not be related to react-webcam. Filing this bug report here because 1) we've been able to most reliably reproduce with react-webcam, and 2) to help other devs looking for bug reports and possibly compare notes.

We've reproduced this issue on https://codepen.io/mozmorris/pen/JLZdoP on an iPhone 13, iPhone 14, and iPhone XR Pro Max. We've also managed to inconsistently reproduce this issue on another online webcam test site (https://webcammictest.com/), but it seems to happen more for react-webcam.

  1. Consistently on load, the zoom level of the front camera will be extremely zoomed in for about 1-2 seconds, after which it fixes itself.
  2. Rarely on load, the size of the <video/> element will be dramatically smaller than expected (and may be rotated 90 degrees). We can reproduce this more on an iPhone XR. This seems to happen more on "fresh" loads, and goes away on refresh. On the other hand, issue 1) is consistently reproducible.

Some avenues we're looking into:

  1. Changes to navigator.mediaDevices.getUserMedia() in iOS 17
  2. Changes to how the constraints API works in iOS 17, such that the returned media stream changes over time (??)
sanamumtaz commented 7 months ago

Has there been any progress on this? We're observing issue#2 in iOS. The video is smaller in size and then, one second later, becomes fine. Version: 7.1.1

nthgness commented 7 months ago

Has there been any progress on this? Already two months gone

timhwang21 commented 7 months ago

(Not a maintainer) We've since confirmed that this is a WebKit issue and isn't related to react-webcam. The issue I linked in my original post is actually the root cause. A fix has been merged but I don't know what kind of release schedule WebKit has.

Closing this issue.