Utility / 03

Flashlight.

Real LED torch on Android via the ImageCapture API. White-screen fallback for iPhone and laptops. One big button.

Notes

Wake Lock keeps the screen on while the flashlight is active. Release the page (or tap Off) to free the LED. Nothing is recorded.

Mode: detecting…
We'll try to turn on the camera LED. If your device doesn't support it, we'll switch to a bright white-screen mode automatically.
Frequently asked

How does a web browser turn on the phone torch?

On Android Chrome and Edge, the MediaStreamTrack.applyConstraints API supports a torch:true advanced constraint — we open the rear camera, immediately enable torch, and hide the video preview. The LED stays on as long as the camera track is active. To release the LED we stop the track. iOS Safari does not expose this constraint at all, so on iPhone we fall back to making the screen as bright and white as possible, which is dimmer than the LED but better than nothing.

Why doesn't the torch work on my iPhone?

Apple has not implemented the torch constraint in Safari WebKit. There is no workaround — no web page on iOS can turn on the camera flash LED. The iPhone alternatives are (a) Control Center → tap the torch icon, (b) ask Siri 'turn on the flashlight', or (c) the white-screen mode this page falls back to, which is useful for reading a menu or finding a keyhole in a dark hallway.

Does this work on laptops?

Laptops generally have no LED light, so the torch-constraint path always fails — we fall back to the white-screen mode automatically. Laptop screens output 200–500 nits, far less than a phone LED (around 50 lumens), but enough to read a paper, illuminate someone's face on a video call in a dark room, or use as a fill light. Maximize your OS brightness too.

Is the torch slower to turn on/off than the system flashlight?

Slightly. The web torch requires us to first open the camera (~200–500ms cold start) before we can apply the torch constraint, where the OS-level torch is instant. Once enabled, toggling on/off within this page is fast. For most uses (finding keys, reading a label, signalling) the half-second startup is unnoticeable.

Why use a web flashlight when my phone has one built in?

Two main reasons. (1) Discoverability — guests and kids who don't know your phone's Control Center gesture can just open a URL. (2) Bookmarkable — add this page to your Home Screen and it becomes a one-tap launcher with no menus, no animations, no clutter. It's also handy on devices where the OS torch is hard to find (some custom Android skins bury it, some kids' tablets disable it entirely).

The button does nothing — what's happening?

Three possibilities. (1) You're on iOS and pressed the LED button before agreeing to fall back — tap White-screen mode instead. (2) Another app is holding the camera (close Snapchat / camera / Zoom). (3) The browser blocked camera permission — tap the camera icon in your address bar and choose Allow, then reload. You'll know permission is the issue if you never saw a permission prompt at all.