ppg-js docs

Browser and device support

Check camera, flash, exposure, motion, and browser support for ppg-js on iPhone, Android, and desktop.

Browser and device support

PlatformCameraFlashNotes
iOS Safari 17+ and every iOS browser (WebKit)YesYesexposureMode is not exposed on iPhone rear cameras. White balance is. The late lock handles both.
Android ChromeYesYesTorch, exposure, white-balance and focus locks, zoom, and Web Bluetooth. Lens selection by label is best effort.
Desktop Chrome, Edge, and FirefoxYesNoWorks with a desk lamp for development, not as a measurement setup.
In-app browsers, including Instagram, Facebook, and some WebViewsOften noNostart() rejects with unsupported.

Requirements

The page must use HTTPS or localhost and the browser must support getUserMedia. The library uses requestVideoFrameCallback when available and falls back to requestAnimationFrame.

Tested data

The engine has been tested against six real recordings from one iPhone running iOS 26 in Safari and Chrome at 60 fps. Fixtures cover clean and muted signals, slow breathing, periodic 30 fps dips, and a noisy onset.

Simulator tests cover 24, 30, and 60 fps, dropped frames, saturation, motion, respiratory modulation, and dominant dicrotic waves. Android recordings remain a valuable contribution.

Other sources

@sontakey/ppg-js/sources includes BleHeartRateSource for Web Bluetooth Heart Rate Service intervals from a Polar or Garmin chest strap in Chrome on Android and desktop. ArraySource sends recorded samples through the engine.