Skip to content

Conversation

MoienTajik
Copy link

@MoienTajik MoienTajik commented Aug 23, 2025

Description of Change

This PR fixes an issue with CameraView where the camera preview showed an image of a different size (smaller/larger based on selected resolution) than the one actually captured.

PR Checklist

  • Has a linked Issue, and the Issue has been approved (bug) => not approved yet
  • Has tests (if omitted, state reason in description)
  • Has samples (if omitted, state reason in description)
  • Rebased on top of main at time of PR
  • Changes adhere to coding standard

@bijington
Copy link
Contributor

Thank you for this. I think the better fix is to allow developers to provide this value. Either by an options setting or a property on the CameraView, or both.

@MoienTajik
Copy link
Author

Thanks for the review @bijington! To confirm, I’ll add a cross-platform preview-scaling enum on CameraView (mapped to iOS AVLayerVideoGravity and Android PreviewView.ScaleType), expose it as a bindable property and via options, and set this new behavior as the default since the current default is incorrect. Good to proceed?

@bijington
Copy link
Contributor

Sorry I have questions:

  1. If we have a cross platform enum is there an equivalent for Windows too?
  2. The original PR only modified iOS does the Android implementation already set the desired behaviour?
  3. Depending on the answer to the above I'm not sure we should change the default for iOS as that is breaking. Or we at least need to make sure it's what we want and label/advertise it correctly

@CoreMyrkai
Copy link

Hello there,

is there any chance that we get this fix?

@MoienTajik
Copy link
Author

Sorry I have questions:

  1. If we have a cross platform enum is there an equivalent for Windows too?
  2. The original PR only modified iOS does the Android implementation already set the desired behaviour?
  3. Depending on the answer to the above I'm not sure we should change the default for iOS as that is breaking. Or we at least need to make sure it's what we want and label/advertise it correctly
  1. Currently, no enum exists. We need to introduce one and handle the internal mapping for each platform. I haven’t reviewed the Windows implementation yet.

  2. From my testing, Android behaves correctly by default. It’s working fine, although I noticed in the issue thread that someone reported it for Android as well, but I couldn’t reproduce it.

  3. The current iOS behavior is incorrect and seems to be a bug. However, fixing it would result in a breaking change.

@bijington

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Captured image in CameraView is Larger than camera preview
3 participants