MediaDevices

abstract external class MediaDevices : EventTarget

Exposes the JavaScript MediaDevices to Kotlin

Constructors

MediaDevices
Link copied to clipboard
fun MediaDevices()

Functions

addEventListener
Link copied to clipboard
fun addEventListener(type: String, callback: (Event) -> Unit?, options: dynamic = definedExternally)
fun addEventListener(type: String, callback: EventListener?, options: dynamic = definedExternally)
dispatchEvent
Link copied to clipboard
fun dispatchEvent(event: Event): Boolean
enumerateDevices
Link copied to clipboard
fun enumerateDevices(): Promise<Array<MediaDeviceInfo>>
getSupportedConstraints
Link copied to clipboard
getUserMedia
Link copied to clipboard
fun getUserMedia(constraints: MediaStreamConstraints = definedExternally): Promise<MediaStream>
removeEventListener
Link copied to clipboard
fun removeEventListener(type: String, callback: (Event) -> Unit?, options: dynamic = definedExternally)
fun removeEventListener(type: String, callback: EventListener?, options: dynamic = definedExternally)

Properties

ondevicechange
Link copied to clipboard
open var ondevicechange: (Event) -> dynamic?