Tethr
A JavaScript/TypeScript library for controlling cameras
Unified camera control
One API for PTP-over-USB cameras and webcams, with capability-based vendor detection.
Liveview & capture
Start a liveview MediaStream, run autofocus, and take photos straight from the browser.
Object Store
Browse, download, and stream files on the camera's storage with chunked transfer.
Tethr is a JavaScript/TypeScript library for controlling digital cameras from the browser over WebUSB (PTP) and WebRTC (webcam).
import {TethrManager} from 'tethr'
const manager = new TethrManager()
const camera = await manager.requestCamera('ptpusb')
await camera.open()
await camera.set('shutterSpeed', '1/30')
const result = await camera.takePhoto()
See the Capability Report to probe everything a connected camera can do, or the Playground for a hands-on demo.