Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Updating the camera frame position when the subviews are laid out #158

Merged
merged 2 commits into from
Jul 11, 2024

Conversation

ruisebas
Copy link
Member

@ruisebas ruisebas commented Jul 11, 2024

Description of changes:

The _LivenessViewController currently centers its camera frame only when its view is loaded, but not when its subviews are laid out.
This causes the video feed to appear off-centered when the FaceLivenessDetectorView is stacked with other components (i.e. headers, navigation bars, etc), or when used in a UIHostingController.

This PR fixes this issue by re-centering the camera frame on viewDidLayoutSubviews().


I'm also removing the liveness package being unnecessary copied as a resource for the example HostApp


Check points: (check or cross out if not relevant)

  • Added new tests to cover change, if needed
  • Build succeeds with all target using Swift Package Manager
  • All unit tests pass
  • Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
  • Documentation update for the change if required
  • PR title conforms to conventional commit style
  • If breaking change, documentation/changelog update with migration instructions

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link

codecov bot commented Jul 11, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 30.48%. Comparing base (75a7c3c) to head (ab1ebf1).
Report is 3 commits behind head on main.

Files Patch % Lines
...veness/Views/Liveness/LivenessViewController.swift 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #158      +/-   ##
==========================================
- Coverage   30.51%   30.48%   -0.03%     
==========================================
  Files          57       57              
  Lines        2225     2227       +2     
==========================================
  Hits          679      679              
- Misses       1546     1548       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ruisebas ruisebas force-pushed the ruisebas/fixing-camera-frame branch from eedab9a to a6db2cb Compare July 11, 2024 18:19
@ruisebas ruisebas changed the title fix: Updating the camera frame size and position when the subviews are laid out fix: Updating the camera frame position when the subviews are laid out Jul 11, 2024
@ruisebas ruisebas force-pushed the ruisebas/fixing-camera-frame branch from a6db2cb to ab1ebf1 Compare July 11, 2024 18:20
@ruisebas ruisebas marked this pull request as ready for review July 11, 2024 18:26
@ruisebas ruisebas requested review from a team as code owners July 11, 2024 18:26
@ruisebas ruisebas merged commit da7f9fa into main Jul 11, 2024
7 checks passed
@ruisebas ruisebas deleted the ruisebas/fixing-camera-frame branch July 11, 2024 19:44
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.

2 participants