/ fm / liveswitch / MediaStats
Class: MediaStats
fm.liveswitch.MediaStats
Media stats.
Hierarchy
-
↳ MediaStats
Table of contents
Constructors
Methods
- deserializeProperties
- getId
- getTimestamp
- getTrack
- getTracks
- getTypeString
- serializeProperties
- toJson
- fromJson
- toJson
Constructors
constructor
+ new MediaStats(): MediaStats
Returns: MediaStats
Inherited from: BaseStats
Defined in: Generated/TypeScript/fm.liveswitch/MediaStats.ts:14
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/MediaStats.ts:66
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
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
getTrack
▸ getTrack(): MediaTrackStats
Gets the first track's stats.
Returns: MediaTrackStats
Defined in: Generated/TypeScript/fm.liveswitch/MediaStats.ts:82
▸ getTrack(trackId
: string): MediaTrackStats
Gets a track by its identifier.
Parameters:
Name | Type | Description |
---|---|---|
trackId |
string | The track identifier. |
Returns: MediaTrackStats
Defined in: Generated/TypeScript/fm.liveswitch/MediaStats.ts:89
getTracks
▸ getTracks(): MediaTrackStats[]
Gets the tracks' stats.
Returns: MediaTrackStats[]
Defined in: Generated/TypeScript/fm.liveswitch/MediaStats.ts:110
getTypeString
▸ getTypeString(): string
Returns: string
Overrides: BaseStats
Defined in: Generated/TypeScript/fm.liveswitch/MediaStats.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: BaseStats
Defined in: Generated/TypeScript/fm.liveswitch/MediaStats.ts:123
toJson
▸ toJson(): string
Serializes this to JSON.
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/MediaStats.ts:146
fromJson
▸ Static
fromJson(mediaJson
: string): MediaStats
Derializes media stats from JSON.
Parameters:
Name | Type | Description |
---|---|---|
mediaJson |
string | The media's stats JSON. |
Returns: MediaStats
Defined in: Generated/TypeScript/fm.liveswitch/MediaStats.ts:33
toJson
▸ Static
toJson(media
: MediaStats): string
Serializes media stats to JSON.
Parameters:
Name | Type | Description |
---|---|---|
media |
MediaStats | The media's stats. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/MediaStats.ts:50