MediaTrack
Properties
| Property | Type | Description |
|---|---|---|
expectedInput? | MediaDeviceInfoLike | The MediaDeviceInfo object representing the device that the track is expected to be connected to. See https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo |
id | string | A unique identifier for the track same as MediaStreamTrack.id if track is available otherwise it uses the id from the construction or the kind. See MediaTrackInit |
input? | MediaDeviceInfoLike | The MediaDeviceInfo object representing the device that the track is connected to. See https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo |
kind | "audioinput" | "videoinput" | - |
label? | string | - |
muted? | boolean | The current mute state of the track. undefined means the track is not available |
previousMediaTrack? | MediaTrack | - |
source | MediaTrack | The source track that it is originated from |
track? | MediaStreamTrack | The MediaStreamTrack object representing the track See https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack |
Methods
applyConstraints()
applyConstraints(constraints): Promise<void>;
Parameters
| Parameter | Type |
|---|---|
constraints | InputDeviceConstraint |
Returns
Promise<void>
clone()
clone(signals?): MediaTrack;
Parameters
| Parameter | Type |
|---|---|
signals? | MediaSignals |
Returns
MediaTrack
getConstraints()
getConstraints(): InputDeviceConstraint;
Returns
InputDeviceConstraint
getSettings()
getSettings(): ExtendedMediaTrackSettings;
Returns
mute()
mute(toMute): void;
Parameters
| Parameter | Type |
|---|---|
toMute | boolean |
Returns
void
release()
release(): Promise<void>;
Returns
Promise<void>
toJSON()
toJSON(): unknown;
Returns
unknown