Skip to main content

MediaControl

Beta

MediaControl Interface

Properties

PropertyTypeDescription
deviceChanged(fn) => () => voidBeta Unified interface for subscribing DeviceChangedChanges Event
getDevices() => Promise<MediaDeviceInfo[]>Beta Future proofing: in case we want to alter the values or type returned by enumerateDevices
getUserMedia(__namedParameters) => Promise<MediaStream>Beta Get MediaStream with provided input constraints
MediaEventTypetypeof MediaEventTypeBeta MediaStreamTrack Events Remarks See MDN Events
setDefaultConstraints(newConstraints) => voidBeta Set default media stream constraints A MediaStreamConstraints object specifying the types of media to request, along with any requirements for each type.
subscribe(listener) => () => voidBeta Subscribe media events