Skip to main content

Class: MediaStreamTrack

Hierarchy#

Constructors#

constructor#

new MediaStreamTrack(props)

Parameters#

NameType
propsPartial<MediaStreamTrack> & Pick<MediaStreamTrack, "kind">

Overrides#

EventTarget.constructor

Defined in#

packages/webrtc/src/media/track.ts:25

Properties#

codec#

Optional codec: RTCRtpCodecParameters

Defined in#

packages/webrtc/src/media/track.ts:18


enabled#

enabled: boolean = true

todo impl

Defined in#

packages/webrtc/src/media/track.ts:20


header#

Optional header: RtpHeader

Defined in#

packages/webrtc/src/media/track.ts:17


id#

Optional id: string

Defined in#

packages/webrtc/src/media/track.ts:14


kind#

kind: Kind

Defined in#

packages/webrtc/src/media/track.ts:13


label#

label: string

Defined in#

packages/webrtc/src/media/track.ts:12


muted#

muted: boolean = true

Defined in#

packages/webrtc/src/media/track.ts:25


onReceiveRtp#

Readonly onReceiveRtp: default<[RtpPacket]>

Defined in#

packages/webrtc/src/media/track.ts:22


remote#

remote: boolean = false

Defined in#

packages/webrtc/src/media/track.ts:11


rid#

Optional rid: string

Defined in#

packages/webrtc/src/media/track.ts:16


ssrc#

Optional ssrc: number

Defined in#

packages/webrtc/src/media/track.ts:15


stopped#

stopped: boolean = false

Defined in#

packages/webrtc/src/media/track.ts:24


uuid#

Readonly uuid: string

Defined in#

packages/webrtc/src/media/track.ts:10


captureRejectionSymbol#

Static Readonly captureRejectionSymbol: typeof captureRejectionSymbol

Inherited from#

EventTarget.captureRejectionSymbol

Defined in#

node_modules/@types/node/events.d.ts:43


captureRejections#

Static captureRejections: boolean

Sets or gets the default captureRejection value for all emitters.

Inherited from#

EventTarget.captureRejections

Defined in#

node_modules/@types/node/events.d.ts:49


defaultMaxListeners#

Static defaultMaxListeners: number

Inherited from#

EventTarget.defaultMaxListeners

Defined in#

node_modules/@types/node/events.d.ts:50


errorMonitor#

Static Readonly errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted, therefore the process will still crash if no regular 'error' listener is installed.

Inherited from#

EventTarget.errorMonitor

Defined in#

node_modules/@types/node/events.d.ts:42

Methods#

addEventListener#

addEventListener(type, listener): void

Parameters#

NameType
typestring
listener(...args: any[]) => void

Returns#

void

Inherited from#

EventTarget.addEventListener

Defined in#

packages/webrtc/src/helper.ts:37


addListener#

addListener(event, listener): MediaStreamTrack

Parameters#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns#

MediaStreamTrack

Inherited from#

EventTarget.addListener

Defined in#

node_modules/@types/node/events.d.ts:62


emit#

emit(event, ...args): boolean

Parameters#

NameType
eventstring | symbol
...argsany[]

Returns#

boolean

Inherited from#

EventTarget.emit

Defined in#

node_modules/@types/node/events.d.ts:72


eventNames#

eventNames(): (string | symbol)[]

Returns#

(string | symbol)[]

Inherited from#

EventTarget.eventNames

Defined in#

node_modules/@types/node/events.d.ts:77


getMaxListeners#

getMaxListeners(): number

Returns#

number

Inherited from#

EventTarget.getMaxListeners

Defined in#

node_modules/@types/node/events.d.ts:69


listenerCount#

listenerCount(event): number

Parameters#

NameType
eventstring | symbol

Returns#

number

Inherited from#

EventTarget.listenerCount

Defined in#

node_modules/@types/node/events.d.ts:73


listeners#

listeners(event): Function[]

Parameters#

NameType
eventstring | symbol

Returns#

Function[]

Inherited from#

EventTarget.listeners

Defined in#

node_modules/@types/node/events.d.ts:70


off#

off(event, listener): MediaStreamTrack

Parameters#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns#

MediaStreamTrack

Inherited from#

EventTarget.off

Defined in#

node_modules/@types/node/events.d.ts:66


on#

on(event, listener): MediaStreamTrack

Parameters#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns#

MediaStreamTrack

Inherited from#

EventTarget.on

Defined in#

node_modules/@types/node/events.d.ts:63


once#

once(event, listener): MediaStreamTrack

Parameters#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns#

MediaStreamTrack

Inherited from#

EventTarget.once

Defined in#

node_modules/@types/node/events.d.ts:64


prependListener#

prependListener(event, listener): MediaStreamTrack

Parameters#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns#

MediaStreamTrack

Inherited from#

EventTarget.prependListener

Defined in#

node_modules/@types/node/events.d.ts:75


prependOnceListener#

prependOnceListener(event, listener): MediaStreamTrack

Parameters#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns#

MediaStreamTrack

Inherited from#

EventTarget.prependOnceListener

Defined in#

node_modules/@types/node/events.d.ts:76


rawListeners#

rawListeners(event): Function[]

Parameters#

NameType
eventstring | symbol

Returns#

Function[]

Inherited from#

EventTarget.rawListeners

Defined in#

node_modules/@types/node/events.d.ts:71


removeAllListeners#

removeAllListeners(event?): MediaStreamTrack

Parameters#

NameType
event?string | symbol

Returns#

MediaStreamTrack

Inherited from#

EventTarget.removeAllListeners

Defined in#

node_modules/@types/node/events.d.ts:67


removeEventListener#

removeEventListener(type, listener): void

Parameters#

NameType
typestring
listener(...args: any[]) => void

Returns#

void

Inherited from#

EventTarget.removeEventListener

Defined in#

packages/webrtc/src/helper.ts:41


removeListener#

removeListener(event, listener): MediaStreamTrack

Parameters#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns#

MediaStreamTrack

Inherited from#

EventTarget.removeListener

Defined in#

node_modules/@types/node/events.d.ts:65


setMaxListeners#

setMaxListeners(n): MediaStreamTrack

Parameters#

NameType
nnumber

Returns#

MediaStreamTrack

Inherited from#

EventTarget.setMaxListeners

Defined in#

node_modules/@types/node/events.d.ts:68


stop#

stop(): void

Returns#

void

Defined in#

packages/webrtc/src/media/track.ts:41


writeRtp#

writeRtp(rtp): void

Parameters#

NameType
rtpBuffer | RtpPacket

Returns#

void

Defined in#

packages/webrtc/src/media/track.ts:47


listenerCount#

Static listenerCount(emitter, event): number

deprecated since v4.0.0

Parameters#

NameType
emitterEventEmitter
eventstring | symbol

Returns#

number

Inherited from#

EventTarget.listenerCount

Defined in#

node_modules/@types/node/events.d.ts:31


on#

Static on(emitter, event): AsyncIterableIterator<any>

Parameters#

NameType
emitterEventEmitter
eventstring

Returns#

AsyncIterableIterator<any>

Inherited from#

EventTarget.on

Defined in#

node_modules/@types/node/events.d.ts:28


once#

Static once(emitter, event): Promise<any[]>

Parameters#

NameType
emitterNodeEventTarget
eventstring | symbol

Returns#

Promise<any[]>

Inherited from#

EventTarget.once

Defined in#

node_modules/@types/node/events.d.ts:26

Static once(emitter, event): Promise<any[]>

Parameters#

NameType
emitterDOMEventTarget
eventstring

Returns#

Promise<any[]>

Inherited from#

EventTarget.once

Defined in#

node_modules/@types/node/events.d.ts:27