UNPKG

tethr

Version:

Controlls USB-connected cameras, webcam, and smartphone camera from browser

18 lines (17 loc) 720 B
import EventEmitter from 'eventemitter3'; import { Tethr, TethrDeviceType } from './Tethr'; type TethrManagerEvents = { pairedCameraChange: (cameras: Tethr[]) => void; }; export declare class TethrManager extends EventEmitter<TethrManagerEvents> { #private; constructor(); get pairedCameras(): Tethr[]; /** * Request an exclusive connection to a camera. This will prompt the user to select a camera to connect to. This should be called in response to a user action, such as a button click. * @param type The type of camera to request * @returns A list of cameras that were successfully connected to */ requestCamera(type: TethrDeviceType): Promise<Tethr | null>; } export {};