Package-level declarations

Types

Link copied to clipboard
sealed interface FillLightMode
Link copied to clipboard
open class ImageCapture(videoTrack: MediaStreamTrack)

The ImageCapture interface of the MediaStream Image Capture API provides methods to enable the capture of images or photos from a camera or other photographic device. Available only in secure contexts.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
interface PhotoSettings
Link copied to clipboard
sealed interface RedEyeReduction

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

The getPhotoCapabilities() method of the ImageCapture interface returns a Promise that resolves with an object containing the ranges of available configuration options.

Link copied to clipboard

The getPhotoSettings() method of the ImageCapture interface returns a Promise that resolves with an object containing the current photo configuration settings.

Link copied to clipboard
inline suspend fun ImageCapture.grabFrame(): ImageBitmap

The grabFrame() method of the ImageCapture interface takes a snapshot of the live video in a MediaStreamTrack and returns a Promise that resolves with a ImageBitmap containing the snapshot.

Link copied to clipboard
inline suspend fun ImageCapture.takePhoto(): Blob
inline suspend fun ImageCapture.takePhoto(photoSettings: PhotoSettings): Blob

The takePhoto() method of the ImageCapture interface takes a single exposure using the video capture device sourcing a MediaStreamTrack and returns a Promise that resolves with a Blob containing the data.