Skip to content

About

Turn a spare phone, tablet or monitor into a light, a studio for filming yourself, or a light show for music.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

Repository files navigation

Key Light

A fullscreen key light for video calls. It's a web app: open it on a spare phone, tablet or monitor next to your camera and use the screen as a light, with adjustable brightness, color temperature (2500–9000K) and color.

Plain HTML, CSS and JavaScript with no build step and no dependencies.

What it's for

  • A light for video calls. Prop a phone or tablet next to your webcam, use a second monitor, or keep a browser window beside the call. It's also a plain light when you need one: a warm reading light, a dim red night light. This is Light mode, and nothing else runs in it: no camera, no microphone.
  • Filming yourself. The front camera and the screen face the same way, so one phone lights you and films you. This is Studio mode: the camera comes on, with effects to pick from, and you record in the shape your platform wants.
  • A light show for music. In Studio, turn on DJ sync and play music nearby. The light moves with the beat, and so do the fun effects. Put several phones around the room and they move to the same beat, since each one listens for itself.

Switch between Light and Studio at the top of the controls.

Run it

Serve the folder over HTTP:

python3 -m http.server 8000

Then open http://localhost:8000. To use it on other devices, host the folder on any HTTPS static host, such as GitHub Pages.

The camera, DJ sync, keep-awake and offline install need a secure context (HTTPS or localhost). Opening index.html straight from disk works, but without those.

Fullscreen

  • Desktop, Android, iPad: the fullscreen button, F, or double-click the light.

  • iPhone: browsers on iPhone can't make a page fullscreen, so add Key Light to the Home Screen and open it from there. It opens without browser bars, and works offline. The fullscreen button shows these steps:

    1. Tap Share. In Safari on iOS 26, it may be behind the ⋯ button next to the address.
    2. Tap Add to Home Screen. If it isn't listed, scroll down or tap View More.
    3. Leave Open as Web App on, and tap Add.

    The iPhone status bar stays visible at the top, since iOS doesn't let web apps hide it. Some iOS 26 and 27 versions also draw a band behind it that a web page can't paint over (WebKit bug 301994).

    A long press on the Home Screen icon opens Light or Studio directly.

For the most light, turn the device's own brightness all the way up. A web page can only dim pixels; it can't raise the backlight.

Controls

Touch Mouse and keyboard
Show or hide controls Tap the light Click the light, Esc to hide
Light or Studio Tap the mode L, M
Brightness Swipe up or down Drag up or down, scroll wheel, ↑ ↓
Temperature (white) or hue (color) Swipe sideways Drag sideways, Shift + scroll, ← →
Switch white / color White and Color buttons C
Softbox falloff Softbox button S
Presets 3200K, 4500K, 5600K Tap 1 2 3
Saved lights Tap an empty slot to save, tap to use, hold to replace 4 5 6, Shift + number to save
Camera on or off, in Studio Camera switch M
Switch camera Switch, next to Camera V
Next camera effect Effect buttons E
DJ sync on or off, in Studio DJ sync switch D
Next DJ pattern Pattern buttons, behind the pattern's name P
Start or stop recording, in Studio Record R

Hold Shift with the arrow keys for fine steps. In Studio, temperature, color and the presets are under the Light heading.

The screen stays on while the light is open, and the last setup is remembered, mode included. Studio turns the camera on when you enter it; a reload or a link opens with it off, a tap away.

Studio

Studio turns the camera on. It shows in a circle in the middle of the light, mirrored like a mirror, and the switch next to Camera turns it off and on.

Effects

Pick an effect. They run as WebGL shaders, on the camera's full resolution.

  • Smooth evens out skin while keeping eyes, brows and hair sharp, and adds a little brightness and warmth.
  • Glow works like a mist filter on a film lens: highlights bloom into a soft haze, contrast eases and the tones warm.
  • Pop art, Thermal, Comic, Glitch and 8-bit are for fun, and move with the beat while DJ sync is on.

When there's more than one camera, Switch appears next to Camera. On phones it flips between the front and back cameras; on computers it steps through the connected cameras. Cameras that face you are mirrored, and the back camera shows the world as it is, in the light and in recordings.

DJ sync

Turn on DJ sync and play music nearby. The light listens through the microphone, finds the beat in the bass, shows the tempo, and moves with the music. Tap the pattern's name to pick another and to set the sensitivity:

Pattern What it does
Spectrum A color organ: bass glows red, mids green and highs blue.
Hop A new color on every beat.
Pulse Your light kicks on every beat and settles back.
Flow Colors drift around the wheel and swell with the volume.
Strobe Your light flashes on the beat, dark in between.

Brightness stays the master level, and Pulse and Strobe use the current white or color light. Raise the sensitivity if beats are missed, lower it if the light reacts to everything.

The light never flashes more than three times a second, the limit WCAG sets for photosensitive seizures. Even so, Strobe and Hop are flashing effects. Don't use them around people with photosensitive epilepsy.

Echo cancellation is turned off, so music playing from the same computer should be picked up too. On phones, turning on the microphone may pause music playing in other apps; playing the music from another device avoids that. DJ sync stops when you leave the page, and the audio never leaves your device.

Recording

Press Record. Next to it are the shape, quality and sound; tap them to change:

  • Shapes: 9:16 (Reels, TikTok, Shorts), 4:5, 1:1, 16:9 (YouTube), or Screen for the window's own shape. A frame on screen shows what will be recorded.
  • Quality: 1080p or 4K (the short side; the long side is capped at 3840 pixels).
  • Sound: records the microphone. With DJ sync on, it records the same microphone DJ sync listens to.

Recordings aren't screen captures. Every frame, the light, softbox and camera are drawn again into an offscreen canvas at the output size, so the video is sharp at 4K even on a small screen, works on phones, and never shows the controls. You can open the controls and change the light, DJ pattern or effect while recording.

When you stop, Save video downloads the file, and Share opens the share sheet where available, for example to save to Photos on iPhone. Recordings stop when you leave the page.

The file is an MP4 with H.264 video wherever the browser can write one, which is what WhatsApp, Instagram and the rest expect; the Video ready line says what you got. Sound is AAC where the browser has an encoder, as Safari and Chrome on Windows and macOS do. Chrome on Linux has none and records Opus sound instead, which plays on Android and computers but not on iPhones. Firefox can only write WebM.

Links

The address always reflects the current light, so you can bookmark or share a setup:

  • #k=4500&b=80: white light at 4500K, 80% brightness
  • #h=210&s=60&b=80: color light at hue 210°, 60% saturation, 80% brightness
  • The softbox falloff is on by default; add &soft=0 to turn it off
  • Add &mode=studio to open in Studio

Files

  • index.html, style.css, app.js: the app
  • effects.js: the camera effect shaders
  • manifest.webmanifest, sw.js, icons/: install and offline support. The service worker is network-first, so edits show up on the next load. Bump CACHE in sw.js when you add or rename files.

About

Turn a spare phone, tablet or monitor into a light, a studio for filming yourself, or a light show for music.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages