Skip to content

feat: Add supportsTorchStrength, minTorchStrength, maxTorchStrength and enableTorchWithStrength(...)#3854

Merged
mrousavy merged 12 commits into
mainfrom
feat/supportstorchstrength
May 12, 2026
Merged

feat: Add supportsTorchStrength, minTorchStrength, maxTorchStrength and enableTorchWithStrength(...)#3854
mrousavy merged 12 commits into
mainfrom
feat/supportstorchstrength

Conversation

@mrousavy
Copy link
Copy Markdown
Owner

@mrousavy mrousavy commented May 12, 2026

Previously we only had device.hasTorch.

The setTorchMode(..., strength:) method doesnt always support strength - some Android devices dont support torch strength. So instead, we now expose a separate method that takes strength, and the primary method just takes on, off or auto.

A device exposes if it supports strength as well as its min and max values.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-native-vision-camera-docs Ready Ready Preview, Comment May 12, 2026 1:56pm

Request Review

@mrousavy mrousavy changed the title feat: Add supportsTorchStrength and enableTorchWithStrength(...) feat: Add supportsTorchStrength, minTorchStrength, maxTorchStrength and enableTorchWithStrength(...) May 12, 2026
@mrousavy mrousavy merged commit 5413634 into main May 12, 2026
8 of 10 checks passed
@mrousavy mrousavy deleted the feat/supportstorchstrength branch May 12, 2026 14:26
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.

1 participant