MediaDevices

abstract external class MediaDevices : EventTarget

Exposes the JavaScript MediaDevices to Kotlin

Constructors

MediaDevices
Link copied to clipboard
JS
fun MediaDevices()

Functions

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