Media statistics
PlanetKit provides PlanetKitStatistics
to keep recent media statistics.
Supported call type | Minimum SDK version |
---|---|
1-to-1 call, group call (conference) | 1-to-1 call: 0.8 Group call, screen share: 0.9 |
Overview of media statistics
Media statistics is updated internally every 200 milliseconds within the SDK, so the application can read the latest statistics to update associated user interface periodically.
Note that there may be no change if the reading interval is shorter than 200 milliseconds, which is the statistics update cycle. If you are unsure of an appropriate update interval, 1000 milliseconds is recommended.
The PlanetKitStatistics
is provided by stream type. The following table shows the statistical information provided for each stream type.
Stream type | Packet loss rate (0–1) | Network jitter (msec) | Bitrate (bps) | Latency (msec) | Video resolution (width x height) | Video FPS (frame per seconds) |
---|---|---|---|---|---|---|
Incoming audio | Provided | Provided | Provided | Provided | N/A | N/A |
Outgoing audio | Provided | Provided | Provided | Provided | N/A | N/A |
Incoming video | Provided | Provided | Provided | Provided | Provided | Provided |
Outgoing video | Provided | Provided | Provided | Provided | Provided | Provided |
Incoming screen share | Provided | Provided | Provided | Provided | Provided | Provided |
Outgoing screen share | Provided | Provided | Provided | Provided | Provided | Provided |
Enabling media statistics
To enable media statistics, apply the following settings.
- Media statistics is disabled by default.
- For more information on APIs related to media statistics, see API reference.
1-to-1 call
To enable media statistics on the caller side, set setEnableStatistics(true)
on PlanetKitMakeCallParamBuilder
before calling makeCall()
.
To enable media statistics on the callee side, set setEnableStatistics(true)
on PlanetKitVerifyCallParamBuilder
before calling verifyCall()
.
Group call
To enable media statistics in a group call, set setEnableStatistics(true)
on PlanetKitJoinConferenceParamBuilder
before calling joinConference()
.
Retrieving the media statistics
1-to-1 call
To retrieve the media statistics, call getStatistics()
of PlanetKitCall
.
Group call
To retrieve the media statistics, call getStatistics()
of PlanetKitConference
.
Related API
APIs related to the media statistics function are as follows.
Classes
Methods
1-to-1 call
-
setEnableStatistics()
ofPlanetKitMakeCallParamBuilder
-
setEnableStatistics()
ofPlanetKitVerifyCallParamBuilder
-
getStatistics()
ofPlanetKitCall