Media statistics
PlanetKit provides PlanetKitStatistics
to keep recent media statistics.
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 their 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 |
How to enable media statistics
To enable media statistics, apply the following settings depending on the call type.
1-to-1 call
To enable media statistics on the caller side, set withEnableStatisticsKey(enable: true)
on PlanetKitMakeCallSettingBuilder
before calling makeCall()
.
To enable media statistics on the callee side, set withEnableStatisticsKey(enable: true)
on PlanetKitVerifyCallSettingBuilder
before calling verifyCall()
.
Group call
To enable media statistics in a group call, set withEnableStatisticsKey(enable: true)
on PlanetKitJoinConferenceSettingBuilder
before calling joinConference()
.
Related API
APIs related to the media statistics function are as follows.
Classes
Methods
1-to-1 call
-
withEnableStatisticsKey()
ofPlanetKitMakeCallSettingBuilder
iOS, macOS -
withEnableStatisticsKey()
ofPlanetKitVerifyCallSettingBuilder
iOS, macOS