MediaStreamTrack
A single media track within a stream; typically, these are audio or video tracks, but other track types may exist as well.
interface MediaStreamTrack extends EventTarget {
contentHint: string;
enabled: boolean;
readonly id: string;
readonly kind: string;
readonly label: string;
readonly muted: boolean;
onended: ((this: MediaStreamTrack, ev: Event) => any) | null;
onmute: ((this: MediaStreamTrack, ev: Event) => any) | null;
onunmute: ((this: MediaStreamTrack, ev: Event) => any) | null;
readonly readyState: MediaStreamTrackState;
addEventListener<K extends keyof MediaStreamTrackEventMap>(
type: K,
listener: (this: MediaStreamTrack, ev: MediaStreamTrackEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;addEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void;applyConstraints(constraints?: MediaTrackConstraints): Promise<void>;
clone(): MediaStreamTrack;
getCapabilities(): MediaTrackCapabilities;
getConstraints(): MediaTrackConstraints;
getSettings(): MediaTrackSettings;
removeEventListener<K extends keyof MediaStreamTrackEventMap>(
type: K,
listener: (this: MediaStreamTrack, ev: MediaStreamTrackEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;removeEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void;stop(): void;
}var MediaStreamTrack: {
prototype: MediaStreamTrack;
new (): MediaStreamTrack;
};§Extends
§Properties
§
onended: ((this: MediaStreamTrack, ev: Event) => any) | null
[src]§
onmute: ((this: MediaStreamTrack, ev: Event) => any) | null
[src]§
onunmute: ((this: MediaStreamTrack, ev: Event) => any) | null
[src]§
readonly readyState: MediaStreamTrackState
[src]§Methods
§
addEventListener<K extends keyof MediaStreamTrackEventMap>(
[src]type: K,
listener: (this: MediaStreamTrack, ev: MediaStreamTrackEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void§
addEventListener(
[src]type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void§
applyConstraints(constraints?: MediaTrackConstraints): Promise<void>
[src]§
clone(): MediaStreamTrack
[src]§
getCapabilities(): MediaTrackCapabilities
[src]§
getConstraints(): MediaTrackConstraints
[src]§
getSettings(): MediaTrackSettings
[src]§
removeEventListener<K extends keyof MediaStreamTrackEventMap>(
[src]type: K,
listener: (this: MediaStreamTrack, ev: MediaStreamTrackEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void§
removeEventListener(
[src]type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void