fm.liveswitch.ConnectionStats Class Reference

Connection stats. More...

Public Member Functions

 ConnectionStats ()
 
double getAudioMediaQuality ()
 Gets the audio streams' minimum estimated media quality. More...
 
double getAudioNetworkQuality ()
 Gets the audio streams' minimum estimated network quality. More...
 
fm.liveswitch.MediaStreamStats getAudioStream ()
 Gets the first audio stream's stats. More...
 
fm.liveswitch.MediaStreamStats[] getAudioStreams ()
 Gets the audio streams' stats. More...
 
fm.liveswitch.DataStreamStats getDataStream ()
 Gets the data stream's stats. More...
 
String getExternalId ()
 Gets the external identifier. More...
 
boolean getIsHost ()
 Gets whether any of the streams are using a transport whose active candidate pair has a host candidate. More...
 
boolean getIsReflexive ()
 Gets whether any of the streams are using a transport whose active candidate pair has a reflexive candidate. More...
 
boolean getIsRelayed ()
 Gets whether any of the streams are using a transport whose active candidate pair has a relayed candidate. More...
 
double getMediaQuality ()
 Gets the connection's estimated media quality as the minimum of the fm.liveswitch.ConnectionStats#getAudioMediaQuality and the fm.liveswitch.ConnectionStats#getVideoMediaQuality. More...
 
fm.liveswitch.MediaStreamStats getMediaStream ()
 Gets the first media stream's stats. More...
 
fm.liveswitch.MediaStreamStats getMediaStream (String mediaStreamId)
 Gets a media stream by its identifier. More...
 
fm.liveswitch.MediaStreamStats[] getMediaStreams ()
 Gets the media streams' stats. More...
 
double getNetworkQuality ()
 Gets the connection's estimated network quality as the minimum of the fm.liveswitch.ConnectionStats#getAudioNetworkQuality and the fm.liveswitch.ConnectionStats#getVideoNetworkQuality. More...
 
fm.liveswitch.ConnectionState getState ()
 Gets the state. More...
 
fm.liveswitch.StreamStats[] getStreams ()
 Gets the streams' stats. More...
 
double getVideoMediaQuality ()
 Gets the video streams' minimum estimated media quality. More...
 
double getVideoNetworkQuality ()
 Gets the video streams' minimum estimated network quality. More...
 
fm.liveswitch.MediaStreamStats getVideoStream ()
 Gets the first video stream's stats. More...
 
fm.liveswitch.MediaStreamStats[] getVideoStreams ()
 Gets the video streams' stats. More...
 
void setExternalId (String value)
 Sets the external identifier. More...
 
void setState (fm.liveswitch.ConnectionState value)
 Sets the state. More...
 
String toJson ()
 Serializes this to JSON. More...
 
- Public Member Functions inherited from fm.liveswitch.BaseStats
String getId ()
 Gets the identifier of the object generating these stats. More...
 
java.util.Date getTimestamp ()
 Gets the timestamp when these stats were generated. More...
 

Static Public Member Functions

static fm.liveswitch.ConnectionStats fromJson (String connectionJson)
 Derializes connection stats from JSON. More...
 
static String toJson (fm.liveswitch.ConnectionStats connection)
 Serializes connection stats to JSON. More...
 

Protected Member Functions

void deserializeProperties (String key, String valueJson)
 Deserializes the properties. More...
 
void serializeProperties (java.util.HashMap< String, String > jsonObject)
 Serializes the properties. More...
 
- Protected Member Functions inherited from fm.liveswitch.BaseStats
 BaseStats ()
 

Detailed Description

Connection stats.

Constructor & Destructor Documentation

◆ ConnectionStats()

fm.liveswitch.ConnectionStats.ConnectionStats ( )

Member Function Documentation

◆ deserializeProperties()

void fm.liveswitch.ConnectionStats.deserializeProperties ( String  key,
String  valueJson 
)
protected

Deserializes the properties.

Parameters
keyThe key.
valueJsonThe value in JSON format.

Reimplemented from fm.liveswitch.BaseStats.

◆ fromJson()

static fm.liveswitch.ConnectionStats fm.liveswitch.ConnectionStats.fromJson ( String  connectionJson)
static

Derializes connection stats from JSON.

Parameters
connectionJsonThe connection's stats JSON.

◆ getAudioMediaQuality()

double fm.liveswitch.ConnectionStats.getAudioMediaQuality ( )

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.

◆ getAudioNetworkQuality()

double fm.liveswitch.ConnectionStats.getAudioNetworkQuality ( )

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.

◆ getAudioStream()

fm.liveswitch.MediaStreamStats fm.liveswitch.ConnectionStats.getAudioStream ( )

Gets the first audio stream's stats.

◆ getAudioStreams()

fm.liveswitch.MediaStreamStats [] fm.liveswitch.ConnectionStats.getAudioStreams ( )

Gets the audio streams' stats.

◆ getDataStream()

fm.liveswitch.DataStreamStats fm.liveswitch.ConnectionStats.getDataStream ( )

Gets the data stream's stats.

◆ getExternalId()

String fm.liveswitch.ConnectionStats.getExternalId ( )

Gets the external identifier.

◆ getIsHost()

boolean fm.liveswitch.ConnectionStats.getIsHost ( )

Gets whether any of the streams are using a transport whose active candidate pair has a host candidate.

◆ getIsReflexive()

boolean fm.liveswitch.ConnectionStats.getIsReflexive ( )

Gets whether any of the streams are using a transport whose active candidate pair has a reflexive candidate.

◆ getIsRelayed()

boolean fm.liveswitch.ConnectionStats.getIsRelayed ( )

Gets whether any of the streams are using a transport whose active candidate pair has a relayed candidate.

◆ getMediaQuality()

double fm.liveswitch.ConnectionStats.getMediaQuality ( )

Gets the connection's estimated media quality as the minimum of the fm.liveswitch.ConnectionStats#getAudioMediaQuality and the fm.liveswitch.ConnectionStats#getVideoMediaQuality.


The value ranges from 0.0 to 1.0, where 0.0 is the lowest quality and 1.0 is the highest quality.

◆ getMediaStream() [1/2]

fm.liveswitch.MediaStreamStats fm.liveswitch.ConnectionStats.getMediaStream ( )

Gets the first media stream's stats.

◆ getMediaStream() [2/2]

fm.liveswitch.MediaStreamStats fm.liveswitch.ConnectionStats.getMediaStream ( String  mediaStreamId)

Gets a media stream by its identifier.

Parameters
mediaStreamIdThe media stream identifier.

◆ getMediaStreams()

fm.liveswitch.MediaStreamStats [] fm.liveswitch.ConnectionStats.getMediaStreams ( )

Gets the media streams' stats.

◆ getNetworkQuality()

double fm.liveswitch.ConnectionStats.getNetworkQuality ( )

Gets the connection's estimated network quality as the minimum of the fm.liveswitch.ConnectionStats#getAudioNetworkQuality and the fm.liveswitch.ConnectionStats#getVideoNetworkQuality.


The value ranges from 0.0 to 1.0, where 0.0 is the lowest quality and 1.0 is the highest quality.

◆ getState()

fm.liveswitch.ConnectionState fm.liveswitch.ConnectionStats.getState ( )

Gets the state.

◆ getStreams()

fm.liveswitch.StreamStats [] fm.liveswitch.ConnectionStats.getStreams ( )

Gets the streams' stats.

◆ getVideoMediaQuality()

double fm.liveswitch.ConnectionStats.getVideoMediaQuality ( )

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.

◆ getVideoNetworkQuality()

double fm.liveswitch.ConnectionStats.getVideoNetworkQuality ( )

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.

◆ getVideoStream()

fm.liveswitch.MediaStreamStats fm.liveswitch.ConnectionStats.getVideoStream ( )

Gets the first video stream's stats.

◆ getVideoStreams()

fm.liveswitch.MediaStreamStats [] fm.liveswitch.ConnectionStats.getVideoStreams ( )

Gets the video streams' stats.

◆ serializeProperties()

void fm.liveswitch.ConnectionStats.serializeProperties ( java.util.HashMap< String, String >  jsonObject)
protected

Serializes the properties.

Parameters
jsonObjectThe JSON object.

Reimplemented from fm.liveswitch.BaseStats.

◆ setExternalId()

void fm.liveswitch.ConnectionStats.setExternalId ( String  value)

Sets the external identifier.

◆ setState()

void fm.liveswitch.ConnectionStats.setState ( fm.liveswitch.ConnectionState  value)

Sets the state.

◆ toJson() [1/2]

String fm.liveswitch.ConnectionStats.toJson ( )

Serializes this to JSON.

◆ toJson() [2/2]

static String fm.liveswitch.ConnectionStats.toJson ( fm.liveswitch.ConnectionStats  connection)
static

Serializes connection stats to JSON.

Parameters
connectionThe connection's stats.