Skip to content

After upgrade to iOS 17.2.1, camera video preview shows only half width. #50

@chrisimmel

Description

@chrisimmel

After my iPhone 12 Pro auto-updated to iOS 17.2.1, I see a brand new problem with the react-camera-pro video element that previews the stream coming from the camera. I saw this first in my own application, but I notice it happens also in the demo. I see near-identical behavior in Chrome, Safari, and Firefox browsers.

The issue is that when the camera preview first appears, it fills only half of the video element width. Interestingly, if I switch facing mode, it fills the other half of the video element (see below).

Here it is in the demo app on Safari:

Initial portrait view After switching the facing mode

The problem disappears in all browsers if I switch the orientation to landscape mode. If I then switch back to portrait mode, it's still fine, and stays fine thereafter until I destroy and recreate the component. By "fine", I mean that the preview fills the entire video element like normal.

Since the issue appeared with an iOS update, it's likely an iOS problem. We can cross our fingers it will be fixed with a subsequent iOS update, but in the meantime I'm wondering if there might be a workaround or a patch we can apply to the library. I've locally forked the repo and tried some naïve tricks in the video constraints with no luck yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions