ImageCapture

@native @JSGlobal @JSType
class ImageCapture(init: MediaStreamTrack) extends Object

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 referenced through a valid MediaStreamTrack.

class Object
trait Any
class Object
trait Matchable
class Any

Value members

Concrete methods

def grabFrame(): Promise[ImageBitmap]

Takes a snapshot of the live video in a MediaStreamTrack, returning an ImageBitmap, if successful.

Takes a snapshot of the live video in a MediaStreamTrack, returning an ImageBitmap, if successful.

def takePhoto(): Promise[Blob]

Takes a single exposure using the video capture device sourcing a MediaStreamTrack and returns a Promise that resolves with a Blob containing the data.

Takes a single exposure using the video capture device sourcing a MediaStreamTrack and returns a Promise that resolves with a Blob containing the data.

Inherited methods

def hasOwnProperty(v: String): Boolean
Inherited from:
Object
def isPrototypeOf(v: Object): Boolean
Inherited from:
Object
def propertyIsEnumerable(v: String): Boolean
Inherited from:
Object
def toLocaleString(): String
Inherited from:
Object
def valueOf(): Any
Inherited from:
Object

Concrete fields

Returns a reference to the MediaStreamTrack passed to the constructor.

Returns a reference to the MediaStreamTrack passed to the constructor.