Skip to content

Conversation

@dlymonkai
Copy link
Contributor

@dlymonkai dlymonkai commented Nov 21, 2025

Fixed camera orientation and dimension handling to fix unreliable behavior on iOS devices by moving from window.matchMedia('(orientation: portrait)') to using direct video element properties.

  • Removed dimension tracking from useUserMedia hook, eliminating reliance on MediaStreamTrack.getSettings() and window.matchMedia() for orientation detection

  • Moved dimension calculation to useCameraPreview hook, which now derives dimensions from the video element's videoWidth and videoHeight properties via onloadedmetadata and onresize events

Overview

Jira Ticket Reference : MN-726

Checklist before requesting a review

  • I have updated the unit tests based on the changes I made
  • I have updated the docs (TSDoc / README / global doc) to reflect my changes
  • I have updated the local app configs if needed
  • I have performed self-QA of my feature by testing the apps and packages and made sure that :
    • No regression or new bug has occurred
    • The acceptance criteria listed in the ticket are met
    • Self-QA was made on both desktop and mobile

This comment was marked as resolved.

@monkvision monkvision deleted a comment from Copilot AI Nov 24, 2025
@monkvision monkvision deleted a comment from Copilot AI Nov 24, 2025
@monkvision monkvision deleted a comment from Copilot AI Nov 24, 2025
@dlymonkai dlymonkai force-pushed the fix/MN-726/camera-orientation branch from 4539606 to f3a8a35 Compare November 24, 2025 15:42
@monkvision monkvision deleted a comment from Copilot AI Nov 24, 2025
on iOS device: window.matchMedia('(orientation: portrait)') can be
unreliable.
@dlymonkai dlymonkai force-pushed the fix/MN-726/camera-orientation branch from f3a8a35 to 4751e5b Compare November 26, 2025 08:09
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.

3 participants