Skip to content

Conversation

@scarlac
Copy link
Collaborator

@scarlac scarlac commented Sep 10, 2025

Summary

Fixes torch mode not being enabled when camera starts. This is odd behavior of videoDevice.lockForConfiguration() which reset torch mode every time it's reconfigured. The fix is to always set torch mode every time we lock it for other changes.

How did you test this change? (ios, iphone 14 pro)

  1. Hard-code torchMode="on" for the <Camera> component.
  2. Start the camera
  3. Change to Front camera (which has no flash light)
  4. Change to Back camera (which has flash light)
  5. (flash light should come on)

@scarlac scarlac merged commit 96b5104 into master Sep 10, 2025
2 of 4 checks passed
@scarlac scarlac deleted the torch-startup-ios branch September 10, 2025 01:28
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