/ fm / liveswitch / MediaStreamStats
Class: MediaStreamStats
fm.liveswitch.MediaStreamStats
Media stream stats.
Hierarchy
-
↳ MediaStreamStats
Table of contents
Constructors
Methods
- deserializeProperties
- fmliveswitchMediaStreamStatsInit
- getDirection
- getId
- getIsHost
- getIsReflexive
- getIsRelayed
- getMaxReceiveBitrate
- getMaxSendBitrate
- getMediaQuality
- getNetworkQuality
- getReceiver
- getReceiverMediaQuality
- getReceiverNetworkQuality
- getReceiverNetworkScore
- getReceivers
- getSender
- getSenderMediaQuality
- getSenderNetworkQuality
- getSenders
- getTimestamp
- getTransport
- getType
- getTypeString
- serializeProperties
- toJson
- fromJson
- fromJsonArray
- toJson
- toJsonArray
Constructors
constructor
+ new MediaStreamStats(): MediaStreamStats
Returns: MediaStreamStats
Inherited from: StreamStats
Defined in: Generated/TypeScript/fm.liveswitch/MediaStreamStats.ts:28
Methods
deserializeProperties
▸ Protected
deserializeProperties(key
: string, valueJson
: string): void
Deserializes the properties.
Parameters:
Name | Type | Description |
---|---|---|
key |
string | The key. |
valueJson |
string | The value in JSON format. |
Returns: void
Overrides: StreamStats
Defined in: Generated/TypeScript/fm.liveswitch/MediaStreamStats.ts:110
fmliveswitchMediaStreamStatsInit
▸ Private
fmliveswitchMediaStreamStatsInit(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/MediaStreamStats.ts:24
getDirection
▸ getDirection(): StreamDirection
Gets the direction.
Returns: StreamDirection
Defined in: Generated/TypeScript/fm.liveswitch/MediaStreamStats.ts:144
getId
▸ getId(): string
Gets the identifier of the object generating these stats.
Returns: string
Inherited from: StreamStats
Defined in: Generated/TypeScript/fm.liveswitch/BaseStats.ts:57
getIsHost
▸ getIsHost(): boolean
Gets whether the transport's active candidate pair has a host candidate.
Returns: boolean
Inherited from: StreamStats
Defined in: Generated/TypeScript/fm.liveswitch/StreamStats.ts:58
getIsReflexive
▸ getIsReflexive(): boolean
Gets whether the transport's active candidate pair has a reflexive candidate.
Returns: boolean
Inherited from: StreamStats
Defined in: Generated/TypeScript/fm.liveswitch/StreamStats.ts:74
getIsRelayed
▸ getIsRelayed(): boolean
Gets whether the transport's active candidate pair has a relayed candidate.
Returns: boolean
Inherited from: StreamStats
Defined in: Generated/TypeScript/fm.liveswitch/StreamStats.ts:90
getMaxReceiveBitrate
▸ getMaxReceiveBitrate(): number
Gets the max receive bitrate.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/MediaStreamStats.ts:156
getMaxSendBitrate
▸ getMaxSendBitrate(): number
Gets the max send bitrate.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/MediaStreamStats.ts:168
getMediaQuality
▸ getMediaQuality(): number
Gets the stream's estimated media quality as the minimum of the sender media quality and the receiver media quality.
The value ranges from 0.0 to 1.0, where 0.0 is the lowest quality and 1.0 is the highest quality.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/MediaStreamStats.ts:182
getNetworkQuality
▸ getNetworkQuality(): number
Gets the stream's estimated network quality as the minimum of the [[fm.liveswitch.mediaStreamStats.senderNetworkQuality]] and the [[fm.liveswitch.mediaStreamStats.receiverNetworkQuality]].
The value ranges from 0.0 to 1.0, where 0.0 is the lowest quality and 1.0 is the highest quality.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/MediaStreamStats.ts:196
getReceiver
▸ getReceiver(): MediaReceiverStats
Gets the first receiver's stats.
Returns: MediaReceiverStats
Defined in: Generated/TypeScript/fm.liveswitch/MediaStreamStats.ts:208
getReceiverMediaQuality
▸ getReceiverMediaQuality(): number
Gets the receivers' minimum estimated media quality.
The value ranges from 0.0 to 1.0, where 0.0 is the lowest quality and 1.0 is the highest quality.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/MediaStreamStats.ts:226
getReceiverNetworkQuality
▸ getReceiverNetworkQuality(): number
Gets the receivers' minimum estimated network quality.
The value ranges from 0.0 to 1.0, where 0.0 is the lowest quality and 1.0 is the highest quality.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/MediaStreamStats.ts:247
getReceiverNetworkScore
▸ getReceiverNetworkScore(): number
Gets the receivers' estimated network score.
The value ranges from 1.0 to 5.0, where 1.0 is the lowest score and 5.0 is the highest score.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/MediaStreamStats.ts:268
getReceivers
▸ getReceivers(): MediaReceiverStats[]
Gets the receivers' stats.
Returns: MediaReceiverStats[]
Defined in: Generated/TypeScript/fm.liveswitch/MediaStreamStats.ts:287
getSender
▸ getSender(): MediaSenderStats
Gets the first sender's stats.
Returns: MediaSenderStats
Defined in: Generated/TypeScript/fm.liveswitch/MediaStreamStats.ts:299
getSenderMediaQuality
▸ getSenderMediaQuality(): number
Gets the senders' minimum estimated media quality.
The value ranges from 0.0 to 1.0, where 0.0 is the lowest quality and 1.0 is the highest quality.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/MediaStreamStats.ts:317
getSenderNetworkQuality
▸ getSenderNetworkQuality(): number
Gets the senders' minimum estimated network quality.
The value ranges from 0.0 to 1.0, where 0.0 is the lowest quality and 1.0 is the highest quality.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/MediaStreamStats.ts:338
getSenders
▸ getSenders(): MediaSenderStats[]
Gets the senders' stats.
Returns: MediaSenderStats[]
Defined in: Generated/TypeScript/fm.liveswitch/MediaStreamStats.ts:357
getTimestamp
▸ getTimestamp(): DateTime
Gets the timestamp when these stats were generated.
Returns: DateTime
Inherited from: StreamStats
Defined in: Generated/TypeScript/fm.liveswitch/BaseStats.ts:70
getTransport
▸ getTransport(): TransportStats
Gets the transport's stats.
Returns: TransportStats
Inherited from: StreamStats
Defined in: Generated/TypeScript/fm.liveswitch/StreamStats.ts:106
getType
▸ getType(): StreamType
Gets the type.
Returns: StreamType
Inherited from: StreamStats
Defined in: Generated/TypeScript/fm.liveswitch/StreamStats.ts:118
getTypeString
▸ getTypeString(): string
Returns: string
Overrides: StreamStats
Defined in: Generated/TypeScript/fm.liveswitch/MediaStreamStats.ts:10
serializeProperties
▸ Protected
serializeProperties(jsonObject
: Hash<string, string>): void
Serializes the properties.
Parameters:
Name | Type | Description |
---|---|---|
jsonObject |
Hash<string, string> | The JSON object. |
Returns: void
Overrides: StreamStats
Defined in: Generated/TypeScript/fm.liveswitch/MediaStreamStats.ts:370
toJson
▸ toJson(): string
Serializes this to JSON.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/MediaStreamStats.ts:433
fromJson
▸ Static
fromJson(mediaStreamJson
: string): MediaStreamStats
Derializes media stream stats from JSON.
Parameters:
Name | Type | Description |
---|---|---|
mediaStreamJson |
string | The media stream's stats JSON. |
Returns: MediaStreamStats
Defined in: Generated/TypeScript/fm.liveswitch/MediaStreamStats.ts:47
fromJsonArray
▸ Static
fromJsonArray(mediaStreamsJson
: string): MediaStreamStats[]
Derializes an array of media stream stats from JSON.
Parameters:
Name | Type | Description |
---|---|---|
mediaStreamsJson |
string | The media streams' stats JSON. |
Returns: MediaStreamStats[]
Defined in: Generated/TypeScript/fm.liveswitch/MediaStreamStats.ts:64
toJson
▸ Static
toJson(mediaStream
: MediaStreamStats): string
Serializes media stream stats to JSON.
Parameters:
Name | Type | Description |
---|---|---|
mediaStream |
MediaStreamStats | The media stream's stats. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/MediaStreamStats.ts:81
toJsonArray
▸ Static
toJsonArray(mediaStreams
: MediaStreamStats[]): string
Serializes an array of media stream stats to JSON.
Parameters:
Name | Type | Description |
---|---|---|
mediaStreams |
MediaStreamStats[] | The media streams' stats. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/MediaStreamStats.ts:96