StageStream
Base Class for common StageStream functionality
Extends
- TypedEmitter<- T>
Extended by
Type Parameters
| Type Parameter | Default type | 
|---|---|
| TextendsEventMap | never | 
Constructors
new StageStream()
new StageStream<
T>(track,getStats?):StageStream<T>
Initializer for StageStream
Parameters
| Parameter | Type | Description | 
|---|---|---|
| track | MediaStreamTrack | Media stream track to be wrapped | 
| getStats? | GetStatsFunction | Optional callback override for WebRTC stats | 
Returns
StageStream<T>
Overrides
TypedEmitter<T>.constructor
Properties
id
id:
string
isMuted
isMuted:
boolean
mediaStreamTrack
mediaStreamTrack:
MediaStreamTrack
streamType
streamType:
StreamType
Methods
cleanup()
cleanup():
void
Prevents the getStats closure from preventing garbage collection for
Returns
void
getStats()
getStats():
Promise<undefined|RTCStatsReport>
This API is the previous internal API and now just defers internally to the requestRTCStats.
Returns
Promise<undefined | RTCStatsReport>
Deprecated
hasListenersFor()
hasListenersFor<
Event>(event):boolean
Returns a boolean indicating whether an event has actively registered listeners.
Type Parameters
| Type Parameter | 
|---|
| Eventextendsstring|number|symbol | 
Parameters
| Parameter | Type | Description | 
|---|---|---|
| event | Event | the event to register the callback for | 
Returns
boolean
Inherited from
TypedEmitter.hasListenersFor
off()
off<
Event>(event,callback,context?):void
Deregister a new callback based on the event provided. The events enum is either linked in the EventMap type or in the root of the class.
Type Parameters
| Type Parameter | 
|---|
| Eventextendsstring|number|symbol | 
Parameters
| Parameter | Type | Description | 
|---|---|---|
| event | Event | the event to de-register the callback for | 
| callback | T[Event] | the callback to be de-registered | 
| context? | any | - | 
Returns
void
Inherited from
TypedEmitter.off
on()
on<
Event>(event,callback,context?):void
Register a new callback based on the event provided. The events enum is either linked in the EventMap type or in the root of the class.
Type Parameters
| Type Parameter | 
|---|
| Eventextendsstring|number|symbol | 
Parameters
| Parameter | Type | Description | 
|---|---|---|
| event | Event | the event to register the callback for | 
| callback | T[Event] | the callback to be invoked for the event | 
| context? | any | - | 
Returns
void
Inherited from
TypedEmitter.on
requestRTCStats()
requestRTCStats():
Promise<undefined|RTCStatsReport>
Get the RTC Stats report for this media source
Returns
Promise<undefined | RTCStatsReport>