Get service quality information
The code on this page works with either the default UI or the custom UI.
Use service quality callbacks to get insight on video, audio, and screen sharing quality during a session and notify users of unstable network conditions.
See video quality
The ZoomSDKMeetingService interface provides a method getConnectionQuality() to the ZoomSDKConnectionQuality object, which provides both sent and received video network quality data for the local user. The callback onSinkMeetingVideoQualityChanged() under ZoomSDKMeetingActionControllerDelegate is also available to retrieve the video quality data for all users. You can also get statistics information by calling the getStatisticsSetting under ZoomSDKSettingService. See the code snippet and SDK reference for details.
To receive this data, there must be at least two users sending or transmitting video to the session.
// Get video (ConnectionComponent_Video) network quality for local user
// The withDataFlow parameter of TRUE indicates send data and FALSE indicates receive data.
ZoomSDK.shared().getMeetingService()?.getConnectionQuality(ConnectionComponent_Video, sending: true)
ZoomSDK.shared().getMeetingService()?.getConnectionQuality(ConnectionComponent_Video, sending: false)
// Return result of queryNetworkQuality is the enum ZoomSDKConnectionQuality
typedef enum{
ZoomSDKConnectionQuality_Unknown,
ZoomSDKConnectionQuality_VeryBad,
ZoomSDKConnectionQuality_Bad,
ZoomSDKConnectionQuality_NotGood,
ZoomSDKConnectionQuality_Normal,
ZoomSDKConnectionQuality_Good,
ZoomSDKConnectionQuality_Excellent
}ZoomSDKConnectionQuality;
// Callback for getting all users video quality.
func onUserVideoQualityChanged(_ quality: ZoomSDKVideoQuality, userID: UInt32) {
}
// Return result of onUserVideoQualityChanged is the enum ZoomSDKVideoQuality
typedef enum{
/** Unknown video quality status. */
ZoomSDKVideoQuality_Unknown,
/** The video quality is poor. */
ZoomSDKVideoQuality_Bad,
/** The video quality is normal. */
ZoomSDKVideoQuality_Normal,
/** The video quality is good. */
ZoomSDKVideoQuality_Good
}ZoomSDKVideoQuality;
// Get video statistic information such as latency, package loss and more here
ZoomSDK.shared().getSettingService()?.getStatisticsSetting()?.getVideoASStatisticsInfo(true)
// Get video (ConnectionComponent_Video) network quality for local user
// The withDataFlow parameter of TRUE indicates send data and FALSE indicates receive data.
[[[ZoomSDK sharedSDK] getMeetingService] getConnectionQuality:ConnectionComponent_Video Sending:TRUE];
[[[ZoomSDK sharedSDK] getMeetingService] getConnectionQuality:ConnectionComponent_Video Sending:FALSE];
// Return result of queryNetworkQuality is the enum ZoomSDKConnectionQuality
typedef enum{
ZoomSDKConnectionQuality_Unknown,
ZoomSDKConnectionQuality_VeryBad,
ZoomSDKConnectionQuality_Bad,
ZoomSDKConnectionQuality_NotGood,
ZoomSDKConnectionQuality_Normal,
ZoomSDKConnectionQuality_Good,
ZoomSDKConnectionQuality_Excellent
}ZoomSDKConnectionQuality;
// Callback for getting all users video quality.
- (void)onUserVideoQualityChanged:(ZoomSDKVideoQuality)quality userID:(unsigned int)userID {
}
// Return result of onUserVideoQualityChanged is the enum ZoomSDKVideoQuality
typedef enum{
/** Unknown video quality status. */
ZoomSDKVideoQuality_Unknown,
/** The video quality is poor. */
ZoomSDKVideoQuality_Bad,
/** The video quality is normal. */
ZoomSDKVideoQuality_Normal,
/** The video quality is good. */
ZoomSDKVideoQuality_Good
}ZoomSDKVideoQuality;
// Get video statistic information such as latency, package loss and more here
[[[[ZoomSDK sharedSDK] getSettingService] getStatisticsSetting] getVideoASStatisticsInfo:TRUE];
See audio quality
The ZoomSDKMeetingService interface provides a method getConnectionQuality() to the ZoomSDKConnectionQuality object, which provides both sent and received audio network quality data for the local user. You can also get statistics information by calling the getStatisticsSetting under ZoomSDKSettingService. See the code snippet and SDK reference for details.
To receive this data, there must be at least two users actively sending audio to the session.
// Get audio (ConnectionComponent_Audio) network quality for local user
// The withDataFlow parameter of TRUE indicates send data and FALSE indicates receive data.
[[[ZoomSDK sharedSDK] getMeetingService] getConnectionQuality:ConnectionComponent_Audio Sending:TRUE];
[[[ZoomSDK sharedSDK] getMeetingService] getConnectionQuality:ConnectionComponent_Audio Sending:FALSE];
// Return result of queryNetworkQuality is the enum ZoomSDKConnectionQuality
typedef enum{
ZoomSDKConnectionQuality_Unknown,
ZoomSDKConnectionQuality_VeryBad,
ZoomSDKConnectionQuality_Bad,
ZoomSDKConnectionQuality_NotGood,
ZoomSDKConnectionQuality_Normal,
ZoomSDKConnectionQuality_Good,
ZoomSDKConnectionQuality_Excellent
}ZoomSDKConnectionQuality;
// Get audio statistic information such as latency, package loss and more here
[[[[ZoomSDK sharedSDK] getSettingService] getStatisticsSetting] getAudioStatisticsInfo];
// Get audio (ConnectionComponent_Audio) network quality for local user
// The withDataFlow parameter of TRUE indicates send data and FALSE indicates receive data.
[[[ZoomSDK sharedSDK] getMeetingService] getConnectionQuality:ConnectionComponent_Audio Sending:TRUE];
[[[ZoomSDK sharedSDK] getMeetingService] getConnectionQuality:ConnectionComponent_Audio Sending:FALSE];
// Return result of queryNetworkQuality is the enum ZoomSDKConnectionQuality
typedef enum{
ZoomSDKConnectionQuality_Unknown,
ZoomSDKConnectionQuality_VeryBad,
ZoomSDKConnectionQuality_Bad,
ZoomSDKConnectionQuality_NotGood,
ZoomSDKConnectionQuality_Normal,
ZoomSDKConnectionQuality_Good,
ZoomSDKConnectionQuality_Excellent
}ZoomSDKConnectionQuality;
// Get audio statistic information such as latency, package loss and more here
[[[[ZoomSDK sharedSDK] getSettingService] getStatisticsSetting] getAudioStatisticsInfo];
See screen sharing quality
The ZoomSDKMeetingService interface provides a method getConnectionQuality() to the ZoomSDKConnectionQuality object, which provides both sent and received share network quality data for the local user. You can also get statistics information by calling the getStatisticsSetting under ZoomSDKSettingService. See the code snippet and SDK reference for details.
To receive this data, there must be at least two users in the session, with at least one sharing their screen.
// Get share (ConnectionComponent_Share) network quality for local user
// The withDataFlow parameter of TRUE indicates send data and FALSE indicates receive data.
[[[ZoomSDK sharedSDK] getMeetingService] getConnectionQuality:ConnectionComponent_Video Sending:TRUE];
[[[ZoomSDK sharedSDK] getMeetingService] getConnectionQuality:ConnectionComponent_Video Sending:FALSE];
// Return result of queryNetworkQuality is the enum ZoomSDKConnectionQuality
typedef enum{
ZoomSDKConnectionQuality_Unknown,
ZoomSDKConnectionQuality_VeryBad,
ZoomSDKConnectionQuality_Bad,
ZoomSDKConnectionQuality_NotGood,
ZoomSDKConnectionQuality_Normal,
ZoomSDKConnectionQuality_Good,
ZoomSDKConnectionQuality_Excellent
}ZoomSDKConnectionQuality;
// Get share statistic information such as latency, package loss and more here
[[[[ZoomSDK sharedSDK] getSettingService] getStatisticsSetting] getVideoASStatisticsInfo:FALSE];
// Get share (ConnectionComponent_Share) network quality for local user
// The withDataFlow parameter of TRUE indicates send data and FALSE indicates receive data.
[[[ZoomSDK sharedSDK] getMeetingService] getConnectionQuality:ConnectionComponent_Video Sending:TRUE];
[[[ZoomSDK sharedSDK] getMeetingService] getConnectionQuality:ConnectionComponent_Video Sending:FALSE];
// Return result of queryNetworkQuality is the enum ZoomSDKConnectionQuality
typedef enum{
ZoomSDKConnectionQuality_Unknown,
ZoomSDKConnectionQuality_VeryBad,
ZoomSDKConnectionQuality_Bad,
ZoomSDKConnectionQuality_NotGood,
ZoomSDKConnectionQuality_Normal,
ZoomSDKConnectionQuality_Good,
ZoomSDKConnectionQuality_Excellent
}ZoomSDKConnectionQuality;
// Get share statistic information such as latency, package loss and more here
[[[[ZoomSDK sharedSDK] getSettingService] getStatisticsSetting] getVideoASStatisticsInfo:FALSE];