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 InMeetingService interface provides a method querySessionNetworkStatus() to the MobileRTCNetworkQuality object, which provides both sent and received video network quality data for the local user. You can also use the callback onSinkMeetingVideoQualityChanged() under InMeetingServiceListener to get the video quality data for all users. 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 (EnumComponentType_VIDEO) network quality for local user
// The withDataFlow parameter of TRUE indicates send data and FALSE indicates receive data.
ZoomSDK.getInstance().inMeetingService.querySessionNetworkStatus(EnumComponentType.EnumComponentType_VIDEO, true);
ZoomSDK.getInstance().inMeetingService.querySessionNetworkStatus(EnumComponentType.EnumComponentType_VIDEO, false);
// Return result of queryNetworkQuality is the enum MobileRTCNetworkQuality
typedef NS_ENUM(NSInteger, MobileRTCNetworkQuality) {
MobileRTCNetworkQuality_Unknown = -1,
MobileRTCNetworkQuality_VeryBad = 0,
MobileRTCNetworkQuality_Bad = 1,
MobileRTCNetworkQuality_NotGood = 2,
MobileRTCNetworkQuality_Normal = 3,
MobileRTCNetworkQuality_Good = 4,
MobileRTCNetworkQuality_Excellent = 5,
};
// Callback for getting all users video quality.
override fun onSinkMeetingVideoQualityChanged(p0: VideoQuality?, p1: Long) {
}
// Return result of onSinkMeetingVideoQualityChanged is the enum VideoQuality
public enum VideoQuality {
VideoQuality_Unknown,
VideoQuality_Bad,
VideoQuality_Normal,
VideoQuality_Good;
}
// Get video (EnumComponentType.EnumComponentType_VIDEO) network quality for local user
// The bSending parameter of TRUE indicates send data and FALSE indicates receive data.
ZoomSDK.getInstance().getInMeetingService().querySessionNetworkStatus(EnumComponentType.EnumComponentType_VIDEO, true);
ZoomSDK.getInstance().getInMeetingService().querySessionNetworkStatus(EnumComponentType.EnumComponentType_VIDEO, false);
// Return result of querySessionNetworkStatus is the SessionNetQualityLevel int
/* int value of SessionNetQualityLevel representation
SESSION_NET_QUALITY_UNKNOWN = -1,
SESSION_NET_QUALITY_VeryBad = 0,
SESSION_NET_QUALITY_Bad = 1,
SESSION_NET_QUALITY_NotGood = 2,
SESSION_NET_QUALITY_Normal = 3,
SESSION_NET_QUALITY_Good = 4,
SESSION_NET_QUALITY_Excellent = 5,
*/
// Callback for getting all users video quality under InMeetingServiceListener
@Override
public void onSinkMeetingVideoQualityChanged(VideoQuality videoQuality, long userId) {
}
// Return result of onSinkMeetingVideoQualityChanged is the enum VideoQuality
public enum VideoQuality {
VideoQuality_Unknown,
VideoQuality_Bad,
VideoQuality_Normal,
VideoQuality_Good;
}
See audio quality
The InMeetingService interface provides a method querySessionNetworkStatus() to the MobileRTCNetworkQuality object, which provides both sent and received audio network quality data for the local user. 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 video (EnumComponentType_AUDIO) network quality for local user
// The withDataFlow parameter of TRUE indicates send data and FALSE indicates receive data.
ZoomSDK.getInstance().inMeetingService.querySessionNetworkStatus(EnumComponentType.EnumComponentType_AUDIO, true);
ZoomSDK.getInstance().inMeetingService.querySessionNetworkStatus(EnumComponentType.EnumComponentType_AUDIO, false);
// Return result of queryNetworkQuality is the enum MobileRTCNetworkQuality
typedef NS_ENUM(NSInteger, MobileRTCNetworkQuality) {
MobileRTCNetworkQuality_Unknown = -1,
MobileRTCNetworkQuality_VeryBad = 0,
MobileRTCNetworkQuality_Bad = 1,
MobileRTCNetworkQuality_NotGood = 2,
MobileRTCNetworkQuality_Normal = 3,
MobileRTCNetworkQuality_Good = 4,
MobileRTCNetworkQuality_Excellent = 5,
};
// Get video (EnumComponentType_AUDIO) network quality for local user
// The bSending parameter of TRUE indicates send data and FALSE indicates receive data.
ZoomSDK.getInstance().getInMeetingService().querySessionNetworkStatus(EnumComponentType.EnumComponentType_AUDIO, true);
ZoomSDK.getInstance().getInMeetingService().querySessionNetworkStatus(EnumComponentType.EnumComponentType_AUDIO, false);
// Return result of querySessionNetworkStatus is the SessionNetQualityLevel int
/* int value of SessionNetQualityLevel representation
SESSION_NET_QUALITY_UNKNOWN = -1,
SESSION_NET_QUALITY_VeryBad = 0,
SESSION_NET_QUALITY_Bad = 1,
SESSION_NET_QUALITY_NotGood = 2,
SESSION_NET_QUALITY_Normal = 3,
SESSION_NET_QUALITY_Good = 4,
SESSION_NET_QUALITY_Excellent = 5,
*/
See screen sharing quality
The InMeetingService interface provides a method querySessionNetworkStatus() to the MobileRTCNetworkQuality object, which provides both sent and received share network quality data for the local user. 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 video (EnumComponentType_AS) network quality for local user
// The withDataFlow parameter of TRUE indicates send data and FALSE indicates receive data.
ZoomSDK.getInstance().inMeetingService.querySessionNetworkStatus(EnumComponentType.EnumComponentType_AS, true);
ZoomSDK.getInstance().inMeetingService.querySessionNetworkStatus(EnumComponentType.EnumComponentType_AS, false);
// Return result of queryNetworkQuality is the enum MobileRTCNetworkQuality
typedef NS_ENUM(NSInteger, MobileRTCNetworkQuality) {
MobileRTCNetworkQuality_Unknown = -1,
MobileRTCNetworkQuality_VeryBad = 0,
MobileRTCNetworkQuality_Bad = 1,
MobileRTCNetworkQuality_NotGood = 2,
MobileRTCNetworkQuality_Normal = 3,
MobileRTCNetworkQuality_Good = 4,
MobileRTCNetworkQuality_Excellent = 5,
};
// Get video (EnumComponentType_AS) network quality for local user
// The bSending parameter of TRUE indicates send data and FALSE indicates receive data.
ZoomSDK.getInstance().getInMeetingService().querySessionNetworkStatus(EnumComponentType.EnumComponentType_AS, true);
ZoomSDK.getInstance().getInMeetingService().querySessionNetworkStatus(EnumComponentType.EnumComponentType_AS, false);
// Return result of querySessionNetworkStatus is the SessionNetQualityLevel int
/* int value of SessionNetQualityLevel representation
SESSION_NET_QUALITY_UNKNOWN = -1,
SESSION_NET_QUALITY_VeryBad = 0,
SESSION_NET_QUALITY_Bad = 1,
SESSION_NET_QUALITY_NotGood = 2,
SESSION_NET_QUALITY_Normal = 3,
SESSION_NET_QUALITY_Good = 4,
SESSION_NET_QUALITY_Excellent = 5,
*/