ImageCapture

open class ImageCapture(videoTrack: MediaStreamTrack)(source)

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.

MDN Reference

Constructors

Link copied to clipboard
constructor(videoTrack: MediaStreamTrack)

Properties

Link copied to clipboard

The track read-only property of the A MediaStreamTrack object.

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
suspend fun takePhoto(photoSettings: PhotoSettings = definedExternally): Blob

The takePhoto() method of the device sourcing a MediaStreamTrack and returns a Promise that resolves with a Blob containing the data.

Link copied to clipboard
fun takePhotoAsync(photoSettings: PhotoSettings = definedExternally): Promise<Blob>