/ fm / liveswitch / DataStreamStats
Class: DataStreamStats
fm.liveswitch.DataStreamStats
Data stream stats.
Hierarchy
-
↳ DataStreamStats
Table of contents
Constructors
Methods
- deserializeProperties
- fmliveswitchDataStreamStatsInit
- getBytesReceived
- getBytesSent
- getChannel
- getChannels
- getDataChannel
- getDataChannels
- getId
- getIsHost
- getIsReflexive
- getIsRelayed
- getMessagesReceived
- getMessagesSent
- getTimestamp
- getTransport
- getType
- getTypeString
- serializeProperties
- toJson
- fromJson
- fromJsonArray
- toJson
- toJsonArray
Constructors
constructor
+ new DataStreamStats(): DataStreamStats
Returns: DataStreamStats
Inherited from: StreamStats
Defined in: Generated/TypeScript/fm.liveswitch/DataStreamStats.ts:30
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/DataStreamStats.ts:112
fmliveswitchDataStreamStatsInit
▸ Private
fmliveswitchDataStreamStatsInit(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/DataStreamStats.ts:24
getBytesReceived
▸ getBytesReceived(): number
Gets the number of bytes received.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/DataStreamStats.ts:146
getBytesSent
▸ getBytesSent(): number
Gets the number of bytes sent.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/DataStreamStats.ts:158
getChannel
▸ getChannel(): DataChannelStats
Gets the first channel's stats.
Returns: DataChannelStats
Defined in: Generated/TypeScript/fm.liveswitch/DataStreamStats.ts:170
▸ getChannel(channelId
: string): DataChannelStats
Gets a channel by its identifier.
Parameters:
Name | Type | Description |
---|---|---|
channelId |
string | The channel identifier. |
Returns: DataChannelStats
Defined in: Generated/TypeScript/fm.liveswitch/DataStreamStats.ts:177
getChannels
▸ getChannels(): DataChannelStats[]
Gets the channels' stats.
Returns: DataChannelStats[]
Defined in: Generated/TypeScript/fm.liveswitch/DataStreamStats.ts:198
getDataChannel
▸ getDataChannel(): DataChannelStats
Gets the first channel's stats.
deprecated
Use Channel instead.
Returns: DataChannelStats
Defined in: Generated/TypeScript/fm.liveswitch/DataStreamStats.ts:211
▸ getDataChannel(dataChannelId
: string): DataChannelStats
Gets a channel by its identifier.
deprecated
Use GetChannel instead.
Parameters:
Name | Type | Description |
---|---|---|
dataChannelId |
string | The channel identifier. |
Returns: DataChannelStats
Defined in: Generated/TypeScript/fm.liveswitch/DataStreamStats.ts:219
getDataChannels
▸ getDataChannels(): DataChannelStats[]
Gets the channels' stats.
deprecated
Use Channels instead.
Returns: DataChannelStats[]
Defined in: Generated/TypeScript/fm.liveswitch/DataStreamStats.ts:236
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
getMessagesReceived
▸ getMessagesReceived(): number
Gets the number of messages received.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/DataStreamStats.ts:248
getMessagesSent
▸ getMessagesSent(): number
Gets the number of messages sent.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/DataStreamStats.ts:260
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/DataStreamStats.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/DataStreamStats.ts:273
toJson
▸ toJson(): string
Serializes this to JSON.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/DataStreamStats.ts:336
fromJson
▸ Static
fromJson(dataStreamJson
: string): DataStreamStats
Derializes data stream stats from JSON.
Parameters:
Name | Type | Description |
---|---|---|
dataStreamJson |
string | The data stream's stats JSON. |
Returns: DataStreamStats
Defined in: Generated/TypeScript/fm.liveswitch/DataStreamStats.ts:49
fromJsonArray
▸ Static
fromJsonArray(dataStreamsJson
: string): DataStreamStats[]
Derializes an array of data stream stats from JSON.
Parameters:
Name | Type | Description |
---|---|---|
dataStreamsJson |
string | The data streams' stats JSON. |
Returns: DataStreamStats[]
Defined in: Generated/TypeScript/fm.liveswitch/DataStreamStats.ts:66
toJson
▸ Static
toJson(dataStream
: DataStreamStats): string
Serializes data stream stats to JSON.
Parameters:
Name | Type | Description |
---|---|---|
dataStream |
DataStreamStats | The data stream's stats. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/DataStreamStats.ts:83
toJsonArray
▸ Static
toJsonArray(dataStreams
: DataStreamStats[]): string
Serializes an array of data stream stats to JSON.
Parameters:
Name | Type | Description |
---|---|---|
dataStreams |
DataStreamStats[] | The data streams' stats. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/DataStreamStats.ts:98