Mobile SDK statistics
This article will help you to receive basic and advanced statistics from the SDKs.
Basic
Voximplant SDKs provide dedicated events on call quality. You can subscribe to them to handle the following errors:
Codec mismatch (Android, iOS) is triggered when the local audio, video or screen sharing is encoded by a codec different than the one specified in initialization config or call settings.
High media latency (Android, iOS) is triggered when network-based media latency is detected during the call.
ICE disconnected (Android, iOS) is triggered when the ICE connection is switched to the "disconnected" state during the call.
Local video degradation (Android, iOS) is triggered when the video resolution sent to the endpoint is lower than a captured video resolution.
Packet loss (Android, iOS) is triggered every 2.5 seconds and indicates packet loss for the last period.
No audio signal (Android, iOS) is triggered when no audio is captured by the microphone. You can measure how critical an issue is by looking at its code name returned in the event.
No audio received (Android, iOS) is triggered when no audio stream is received from the remote side.
No video received (Android, iOS) is triggered when no video stream is received from the remote side.
Advanced
We recommend the following approaches for gathering connection stats and/or developing custom tools for tracking issues.
The stats are received constantly during an active call. There are two stats interfaces: CallStats (the general stats of a call) and EndpointStats (the stats of each participant of a call/conference).
In Web SDK, during a simple call with two participants, CallStats equal EndpointStats.
The stats are retrieved from the didReceiveStatistics event for iOS or onCallStatsReceived event for Android, which contains an object with a special field for an endpoint (VICallStats for iOS or CallStats for Android), the other fields contain details on general stats.
By default, the stats arrive every 5 seconds for iOS and Android. You can adjust this value by changing the statsCollectionInterval property:
Stats is accumulated in RAM during the interval specified in StatsCollectionInterval. Thus, the bigger the interval is, the higher RAM utilization is.
Another point worth mentioning is the timestamp value in the received stats. Bear in mind that it should differ from the previous received value; if not, you are probably experiencing some issue with gathering stats.