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. It provides an interface for capturing images from a photographic device referenced through a valid MediaStreamTrack. Available only in secure contexts.

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

Properties

Link copied to clipboard
val ERROR CLASS: Symbol not found for RedEyeReduction.Companion.always: RedEyeReduction
Link copied to clipboard
val ERROR CLASS: Symbol not found for FillLightMode.Companion.auto: FillLightMode
Link copied to clipboard
val ERROR CLASS: Symbol not found for RedEyeReduction.Companion.controllable: RedEyeReduction
Link copied to clipboard
val ERROR CLASS: Symbol not found for FillLightMode.Companion.flash: FillLightMode
Link copied to clipboard
val ERROR CLASS: Symbol not found for RedEyeReduction.Companion.never: RedEyeReduction
Link copied to clipboard
val ERROR CLASS: Symbol not found for FillLightMode.Companion.off: FillLightMode

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 an 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.