/ fm / liveswitch / MediaTrackStats
Class: MediaTrackStats
fm.liveswitch.MediaTrackStats
Media track stats.
Hierarchy
-
↳ MediaTrackStats
Implements
Table of contents
Constructors
Methods
- deserializeProperties
- fmliveswitchMediaTrackStatsInit
- getBitrate
- getDetached
- getExpectedFrameRate
- getFrameHeight
- getFrameRate
- getFrameWidth
- getFramesCorrupted
- getFramesDecoded
- getFramesDropped
- getFramesEncoded
- getFramesReceived
- getFramesSent
- getId
- getMaxBitrate
- getMediaQuality
- getMinBitrate
- getMuted
- getRepairedRtpStreamId
- getRepairedRtpStreamIds
- getRtpStreamId
- getRtpStreamIds
- getStopped
- getSynchronizationSource
- getSynchronizationSources
- getTimestamp
- getTypeString
- isEquivalent
- serializeProperties
- toJson
- fromJson
- fromJsonArray
- toJson
- toJsonArray
Constructors
constructor
+ new MediaTrackStats(): MediaTrackStats
Returns: MediaTrackStats
Inherited from: BaseStats
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:70
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/MediaTrackStats.ts:152
fmliveswitchMediaTrackStatsInit
▸ Private
fmliveswitchMediaTrackStatsInit(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:52
getBitrate
▸ getBitrate(): number
Gets the bitrate. Set by the encoder.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:217
getDetached
▸ getDetached(): boolean
Gets whether the track is detached.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:229
getExpectedFrameRate
▸ getExpectedFrameRate(): number
Gets the expected frame rate. Video-only. Set by the stream.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:242
getFrameHeight
▸ getFrameHeight(): number
Gets the frame height. Video-only. Set by the encoder or decoder.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:255
getFrameRate
▸ getFrameRate(): number
Gets the number of decoded frames in the last second. Video-only. Set by the encoder or decoder.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:268
getFrameWidth
▸ getFrameWidth(): number
Gets the frame width. Video-only. Set by the encoder or decoder.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:359
getFramesCorrupted
▸ getFramesCorrupted(): number
Gets the number of corrupted frames. Video-only. Set by the depacketizer.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:281
getFramesDecoded
▸ getFramesDecoded(): number
Gets the number of frames decoded. Set by the decoder.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:294
getFramesDropped
▸ getFramesDropped(): number
Gets the number of frames dropped. Video-only. Set by the depacketizer.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:307
getFramesEncoded
▸ getFramesEncoded(): number
Gets the number of frames encoded. Set by the encoder.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:320
getFramesReceived
▸ getFramesReceived(): number
Gets the number of frames received. Set by the depacketizer.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:333
getFramesSent
▸ getFramesSent(): number
Gets the number of frames sent. Set by the packetizer.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:346
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
getMaxBitrate
▸ getMaxBitrate(): number
Gets the maximum bitrate. Set by the encoder.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:372
getMediaQuality
▸ getMediaQuality(audio
: boolean): number
Gets the track's 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.
Parameters:
Name | Type | Description |
---|---|---|
audio |
boolean | Whether these are audio stats. |
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:387
getMinBitrate
▸ getMinBitrate(): number
Gets the minimum bitrate. Set by the encoder.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:411
getMuted
▸ getMuted(): boolean
Gets whether the track is muted.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:423
getRepairedRtpStreamId
▸ getRepairedRtpStreamId(): string
Gets the first repaired RTP stream identifier.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:435
getRepairedRtpStreamIds
▸ getRepairedRtpStreamIds(): string[]
Gets the repaired RTP stream identifiers.
Returns: string[]
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:451
getRtpStreamId
▸ getRtpStreamId(): string
Gets the first RTP stream identifier.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:463
getRtpStreamIds
▸ getRtpStreamIds(): string[]
Gets the RTP stream identifiers.
Returns: string[]
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:479
getStopped
▸ getStopped(): boolean
Gets whether the track is stopped. Set by source.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:492
getSynchronizationSource
▸ getSynchronizationSource(): number
Gets the first synchronization source.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:504
getSynchronizationSources
▸ getSynchronizationSources(): number[]
Gets the synchronization sources.
Returns: number[]
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:520
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/MediaTrackStats.ts:10
isEquivalent
▸ isEquivalent(instance
: MediaTrackStats): boolean
Checks if a track is equivalent to this one.
Parameters:
Name | Type | Description |
---|---|---|
instance |
MediaTrackStats | The track. |
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:533
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/MediaTrackStats.ts:549
toJson
▸ toJson(): string
Serializes this to JSON.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:740
fromJson
▸ Static
fromJson(mediaTrackJson
: string): MediaTrackStats
Derializes media track stats from JSON.
Parameters:
Name | Type | Description |
---|---|---|
mediaTrackJson |
string | The media track's stats JSON. |
Returns: MediaTrackStats
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:89
fromJsonArray
▸ Static
fromJsonArray(mediaTracksJson
: string): MediaTrackStats[]
Derializes an array of media track stats from JSON.
Parameters:
Name | Type | Description |
---|---|---|
mediaTracksJson |
string | The media tracks' stats JSON. |
Returns: MediaTrackStats[]
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:106
toJson
▸ Static
toJson(mediaTrack
: MediaTrackStats): string
Serializes media track stats to JSON.
Parameters:
Name | Type | Description |
---|---|---|
mediaTrack |
MediaTrackStats | The media track's stats. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:123
toJsonArray
▸ Static
toJsonArray(mediaTracks
: MediaTrackStats[]): string
Serializes an array of media track stats to JSON.
Parameters:
Name | Type | Description |
---|---|---|
mediaTracks |
MediaTrackStats[] | The media tracks' stats. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/MediaTrackStats.ts:138