Interface: Media
Hierarchy
↳
Media
Properties
audioInput
• Optional
audioInput: MediaDeviceInfoLike
Audio input device is used for the audio track from the current stream
Inherited from
audioMuted
• audioMuted: undefined
| boolean
Current mute state of audio track
undefined
means there is no such track from the stream
Inherited from
constraints
• Optional
constraints: MediaDeviceRequest
The constraints used to request the media
Inherited from
devices
• devices: MediaDeviceInfoLike
[]
The devices used for the media
Inherited from
expectedAudioInput
• Optional
expectedAudioInput: MediaDeviceInfoLike
The audio input device which is expected to be used for the current stream based on the provided constraints
Inherited from
MediaAttributes.expectedAudioInput
expectedVideoInput
• Optional
expectedVideoInput: MediaDeviceInfoLike
The video input device which is expected to be used for the current stream based on the provided constraints
Inherited from
MediaAttributes.expectedVideoInput
rawStream
• Optional
rawStream: MediaStream
The raw stream obtained from the getUserMedia
API
Inherited from
status
• status: UserMediaStatus
The status of the media
Inherited from
stream
• Optional
stream: MediaStream
Media stream for the media
Inherited from
toJSON
• Optional
toJSON: () => unknown
Type declaration
▸ (): unknown
Returns
unknown
videoInput
• Optional
videoInput: MediaDeviceInfoLike
Video input device is used for the video track from the current stream
Inherited from
videoMuted
• videoMuted: undefined
| boolean
Current mute state of video track
undefined
means there is no such track from the stream
Inherited from
Methods
applyConstraints
▸ applyConstraints(constraints
): Promise
<void
>
Apply the constraints to the current media
Parameters
Name | Type |
---|---|
constraints | MediaDeviceRequest |
Returns
Promise
<void
>
getSettings
▸ getSettings(): MediaSettings
Returns
muteAudio
▸ muteAudio(mute
): void
mute/unmute the audio track
Parameters
Name | Type |
---|---|
mute | boolean |
Returns
void
muteVideo
▸ muteVideo(mute
): void
mute/unmute the video track
Parameters
Name | Type |
---|---|
mute | boolean |
Returns
void
release
▸ release(): Promise
<void
>
Release the media resources, e.g. camera/microphone
Returns
Promise
<void
>