Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

[CameraView] [iOS] Flash does not work fix #1563

Merged
merged 4 commits into from
Aug 13, 2021
Merged

Conversation

jfversluis
Copy link
Member

@jfversluis jfversluis commented Aug 9, 2021

Description of Change

Switched setting the flash mode to after the camera is being initialised to make it work when it's set from XAML or anywhere before it is available. Additionally made an exception for the torch when taking a picture as that's not an "official" supported flash mode.

Bugs Fixed

API Changes

NA

Behavioral Changes

Nothing notable except that before it wasn't working or even crashing, now it all works!

PR Checklist

  • Has a linked Issue, and the Issue has been approved
  • 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

@jfversluis jfversluis added DO-NOT-MERGE Don't merge it.... don't do it! Really... p/iOS iOS platform issue. a/CameraView 📸 labels Aug 9, 2021
@jfversluis
Copy link
Member Author

I'm pretty confident this works for the regular flash. It does crash when I set it to torch though. Torch comes on, but when I take a picture it crashes.

@jfversluis
Copy link
Member Author

OK I think I got it working for all scenarios now! 🎉

@jfversluis jfversluis added bug Something isn't working. Breaky break. and removed DO-NOT-MERGE Don't merge it.... don't do it! Really... labels Aug 10, 2021
@jfversluis
Copy link
Member Author

Also brushed up the sample a bit. The right part switches between an Image and a MediaElement depending on a video or a photo is taken.

@jfversluis jfversluis merged commit 3b6b831 into main Aug 13, 2021
@jfversluis jfversluis deleted the dev/jfversluis/fix-747 branch August 13, 2021 17:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/CameraView 📸 bug Something isn't working. Breaky break. p/iOS iOS platform issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] [CameraView] [iOS] Flash does not work
1 participant