MediaDevices

external class MediaDevices : EventTarget(source)

Provides access to connected media input devices like cameras and microphones, as well as screen sharing. In essence, it lets you obtain access to any hardware source of media data. Available only in secure contexts.

MDN Reference

Functions

Link copied to clipboard
Link copied to clipboard
suspend fun getDisplayMedia(options: DisplayMediaStreamOptions = definedExternally): MediaStream
Link copied to clipboard
Link copied to clipboard
suspend fun getUserMedia(constraints: MediaStreamConstraints = definedExternally): MediaStream
Link copied to clipboard
fun getUserMediaAsync(constraints: MediaStreamConstraints = definedExternally): Promise<MediaStream>