IT lexicon › Web › Camera API

Camera API

Web På svenska → Updated: 2026-05-26

Web API for accessing the camera + microphone. navigator.mediaDevices.getUserMedia({video: true, audio: true}) returns a MediaStream. Basis for WebRTC + every browser video chat app.

Permission required (browser shows dialog). HTTPS mandatory (even localhost OK). MediaStream can be displayed via <video> element or sent via WebRTC peer connection. ImageCapture API for still images. Constraints control device selection (front/back camera, resolution). Modern feature: face detection built into Chrome (Shape Detection API, experimental). Permission can be persistent (browser remembers) or per session.

← Back to the lexicon