MediaCaptureAndStreamsAPI
Types
displayMediaStreamOptions
type displayMediaStreamOptions = { mutable video?: unknown, mutable audio?: unknown,}
Record fields
video
audio
doubleRange
type doubleRange = { mutable max?: float, mutable min?: float,}
Record fields
max
min
mediaDeviceInfo
The MediaDevicesInfo interface contains information that describes a single media input or output device. See MediaDeviceInfo on MDN
type mediaDeviceInfo = { deviceId: string, kind: mediaDeviceKind, label: string, groupId: string,}
Record fields
Module
There are methods and helpers defined in MediaDeviceInfo .
mediaDeviceKind
type mediaDeviceKind = | @as("audioinput") Audioinput | @as("audiooutput") Audiooutput | @as("videoinput") Videoinput
mediaDevices
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. See MediaDevices on MDN
type mediaDevices = {}
Module
There are methods and helpers defined in MediaDevices .
mediaStream
A stream of media content. A stream consists of several tracks such as video or audio tracks. Each track is specified as an instance of MediaStreamTrack. See MediaStream on MDN
type mediaStream = {id: string, active: bool}
Record fields
Module
There are methods and helpers defined in MediaStream .
mediaStreamConstraints
type mediaStreamConstraints = { mutable video?: unknown, mutable audio?: unknown, mutable preferCurrentTab?: bool, mutable peerIdentity?: string,}
Record fields
video
audio
preferCurrentTab
peerIdentity
mediaStreamTrack
A single media track within a stream; typically, these are audio or video tracks, but other track types may exist as well. See MediaStreamTrack on MDN
type mediaStreamTrack = { kind: string, id: string, label: string, mutable enabled: bool, muted: bool, readyState: mediaStreamTrackState, mutable contentHint: string,}
Record fields
Module
There are methods and helpers defined in MediaStreamTrack .
mediaStreamTrackState
type mediaStreamTrackState = | @as("ended") Ended | @as("live") Live
mediaTrackCapabilities
type mediaTrackCapabilities = { mutable width?: uLongRange, mutable height?: uLongRange, mutable aspectRatio?: doubleRange, mutable frameRate?: doubleRange, mutable facingMode?: array<string>, mutable sampleRate?: uLongRange, mutable sampleSize?: uLongRange, mutable echoCancellation?: array<bool>, mutable autoGainControl?: array<bool>, mutable noiseSuppression?: array<bool>, mutable channelCount?: uLongRange, mutable deviceId?: string, mutable groupId?: string, mutable backgroundBlur?: array<bool>, mutable displaySurface?: string,}
Record fields
width
height
aspectRatio
frameRate
facingMode
sampleRate
sampleSize
echoCancellation
autoGainControl
noiseSuppression
channelCount
deviceId
groupId
backgroundBlur
displaySurface
mediaTrackConstraints
type mediaTrackConstraints = { mutable width?: int, mutable height?: int, mutable aspectRatio?: float, mutable frameRate?: float, mutable facingMode?: string, mutable sampleRate?: int, mutable sampleSize?: int, mutable echoCancellation?: bool, mutable autoGainControl?: bool, mutable noiseSuppression?: bool, mutable channelCount?: int, mutable deviceId?: string, mutable groupId?: string, mutable backgroundBlur?: bool, mutable displaySurface?: string, mutable advanced?: array<mediaTrackConstraintSet>,}
Record fields
width
height
aspectRatio
frameRate
facingMode
sampleRate
sampleSize
echoCancellation
autoGainControl
noiseSuppression
channelCount
deviceId
groupId
backgroundBlur
displaySurface
advanced
mediaTrackConstraintSet
type mediaTrackConstraintSet = { mutable width?: int, mutable height?: int, mutable aspectRatio?: float, mutable frameRate?: float, mutable facingMode?: string, mutable sampleRate?: int, mutable sampleSize?: int, mutable echoCancellation?: bool, mutable autoGainControl?: bool, mutable noiseSuppression?: bool, mutable channelCount?: int, mutable deviceId?: string, mutable groupId?: string, mutable backgroundBlur?: bool, mutable displaySurface?: string,}
Record fields
width
height
aspectRatio
frameRate
facingMode
sampleRate
sampleSize
echoCancellation
autoGainControl
noiseSuppression
channelCount
deviceId
groupId
backgroundBlur
displaySurface
mediaTrackSettings
type mediaTrackSettings = { mutable width?: int, mutable height?: int, mutable aspectRatio?: float, mutable frameRate?: float, mutable facingMode?: string, mutable sampleRate?: int, mutable sampleSize?: int, mutable echoCancellation?: bool, mutable autoGainControl?: bool, mutable noiseSuppression?: bool, mutable channelCount?: int, mutable deviceId?: string, mutable groupId?: string, mutable backgroundBlur?: bool, mutable displaySurface?: string,}
Record fields
width
height
aspectRatio
frameRate
facingMode
sampleRate
sampleSize
echoCancellation
autoGainControl
noiseSuppression
channelCount
deviceId
groupId
backgroundBlur
displaySurface
mediaTrackSupportedConstraints
type mediaTrackSupportedConstraints = { mutable width?: bool, mutable height?: bool, mutable aspectRatio?: bool, mutable frameRate?: bool, mutable facingMode?: bool, mutable sampleRate?: bool, mutable sampleSize?: bool, mutable echoCancellation?: bool, mutable autoGainControl?: bool, mutable noiseSuppression?: bool, mutable channelCount?: bool, mutable deviceId?: bool, mutable groupId?: bool, mutable backgroundBlur?: bool, mutable displaySurface?: bool,}
Record fields
width
height
aspectRatio
frameRate
facingMode
sampleRate
sampleSize
echoCancellation
autoGainControl
noiseSuppression
channelCount
deviceId
groupId
backgroundBlur
displaySurface
uLongRange
type uLongRange = {mutable max?: int, mutable min?: int}