/ fm / liveswitch / ConnectionStats
Class: ConnectionStats
fm.liveswitch.ConnectionStats
Connection stats.
Hierarchy
-
↳ ConnectionStats
Table of contents
Constructors
Methods
- deserializeProperties
- getAudioMediaQuality
- getAudioNetworkQuality
- getAudioReceiverNetworkScore
- getAudioStream
- getAudioStreams
- getDataStream
- getExternalId
- getId
- getIsHost
- getIsReflexive
- getIsRelayed
- getMediaQuality
- getMediaStream
- getMediaStreams
- getNetworkQuality
- getReceiverNetworkScore
- getState
- getStreams
- getTimestamp
- getTypeString
- getVideoMediaQuality
- getVideoNetworkQuality
- getVideoReceiverNetworkScore
- getVideoStream
- getVideoStreams
- serializeProperties
- setExternalId
- setState
- toJson
- fromJson
- toJson
Constructors
constructor
+ new ConnectionStats(): ConnectionStats
Returns: ConnectionStats
Inherited from: BaseStats
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStats.ts:20
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: BaseStats
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStats.ts:72
getAudioMediaQuality
▸ getAudioMediaQuality(): number
Gets the audio streams' 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/ConnectionStats.ts:104
getAudioNetworkQuality
▸ getAudioNetworkQuality(): number
Gets the audio streams' 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/ConnectionStats.ts:125
getAudioReceiverNetworkScore
▸ getAudioReceiverNetworkScore(): number
Gets the audio receiver streams' 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/ConnectionStats.ts:146
getAudioStream
▸ getAudioStream(): MediaStreamStats
Gets the first audio stream's stats.
Returns: MediaStreamStats
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStats.ts:165
getAudioStreams
▸ getAudioStreams(): MediaStreamStats[]
Gets the audio streams' stats.
Returns: MediaStreamStats[]
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStats.ts:177
getDataStream
▸ getDataStream(): DataStreamStats
Gets the data stream's stats.
Returns: DataStreamStats
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStats.ts:198
getExternalId
▸ getExternalId(): string
Gets the external identifier.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStats.ts:210
getId
▸ getId(): string
Gets the identifier of the object generating these stats.
Returns: string
Inherited from: BaseStats
Defined in: Generated/TypeScript/fm.liveswitch/BaseStats.ts:57
getIsHost
▸ getIsHost(): boolean
Gets whether any of the streams are using a transport whose active candidate pair has a host candidate.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStats.ts:223
getIsReflexive
▸ getIsReflexive(): boolean
Gets whether any of the streams are using a transport whose active candidate pair has a reflexive candidate.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStats.ts:244
getIsRelayed
▸ getIsRelayed(): boolean
Gets whether any of the streams are using a transport whose active candidate pair has a relayed candidate.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStats.ts:265
getMediaQuality
▸ getMediaQuality(): number
Gets the connection's estimated media quality as the minimum of the [[fm.liveswitch.connectionStats.audioMediaQuality]] and the [[fm.liveswitch.connectionStats.videoMediaQuality]].
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/ConnectionStats.ts:287
getMediaStream
▸ getMediaStream(): MediaStreamStats
Gets the first media stream's stats.
Returns: MediaStreamStats
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStats.ts:299
▸ getMediaStream(mediaStreamId
: string): MediaStreamStats
Gets a media stream by its identifier.
Parameters:
Name | Type | Description |
---|---|---|
mediaStreamId |
string | The media stream identifier. |
Returns: MediaStreamStats
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStats.ts:306
getMediaStreams
▸ getMediaStreams(): MediaStreamStats[]
Gets the media streams' stats.
Returns: MediaStreamStats[]
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStats.ts:327
getNetworkQuality
▸ getNetworkQuality(): number
Gets the connection's estimated network quality as the minimum of the [[fm.liveswitch.connectionStats.audioNetworkQuality]] and the [[fm.liveswitch.connectionStats.videoNetworkQuality]].
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/ConnectionStats.ts:341
getReceiverNetworkScore
▸ getReceiverNetworkScore(): number
Gets the connection's estimated network score as the minimum of the [[fm.liveswitch.connectionStats.audioReceiverNetworkScore]] and the [[fm.liveswitch.connectionStats.videoReceiverNetworkScore]].
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/ConnectionStats.ts:355
getState
▸ getState(): ConnectionState
Gets the state.
Returns: ConnectionState
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStats.ts:367
getStreams
▸ getStreams(): StreamStats[]
Gets the streams' stats.
Returns: StreamStats[]
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStats.ts:379
getTimestamp
▸ getTimestamp(): DateTime
Gets the timestamp when these stats were generated.
Returns: DateTime
Inherited from: BaseStats
Defined in: Generated/TypeScript/fm.liveswitch/BaseStats.ts:70
getTypeString
▸ getTypeString(): string
Returns: string
Overrides: BaseStats
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStats.ts:10
getVideoMediaQuality
▸ getVideoMediaQuality(): number
Gets the video streams' 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/ConnectionStats.ts:404
getVideoNetworkQuality
▸ getVideoNetworkQuality(): number
Gets the video streams' 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/ConnectionStats.ts:425
getVideoReceiverNetworkScore
▸ getVideoReceiverNetworkScore(): number
Gets the video receiver streams' 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/ConnectionStats.ts:446
getVideoStream
▸ getVideoStream(): MediaStreamStats
Gets the first video stream's stats.
Returns: MediaStreamStats
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStats.ts:465
getVideoStreams
▸ getVideoStreams(): MediaStreamStats[]
Gets the video streams' stats.
Returns: MediaStreamStats[]
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStats.ts:477
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: BaseStats
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStats.ts:499
setExternalId
▸ setExternalId(value
: string): void
Sets the external identifier.
Parameters:
Name | Type |
---|---|
value |
string |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStats.ts:529
setState
▸ setState(value
: ConnectionState): void
Sets the state.
Parameters:
Name | Type |
---|---|
value |
ConnectionState |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStats.ts:549
toJson
▸ toJson(): string
Serializes this to JSON.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStats.ts:617
fromJson
▸ Static
fromJson(connectionJson
: string): ConnectionStats
Derializes connection stats from JSON.
Parameters:
Name | Type | Description |
---|---|---|
connectionJson |
string | The connection's stats JSON. |
Returns: ConnectionStats
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStats.ts:39
toJson
▸ Static
toJson(connection
: ConnectionStats): string
Serializes connection stats to JSON.
Parameters:
Name | Type | Description |
---|---|---|
connection |
ConnectionStats | The connection's stats. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStats.ts:56