# Get service quality information

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

> 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 `IMeetingService` interface provides a method `GetVideoConnQuality()` to the `ConnectionQuality` object, which provides both sent and received video network quality data for the local user. The callback `onUserNetworkStatusChanged()` under `IMeetingServiceEvent` is also available to retrieve the video quality data for all users. You can also get statistics information by calling the `GetStatisticSettings` under `ISettingService`. 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.

```cpp
/// TRUE indicates to get the connection quality of sending the video.
// FALSE indicates to get the connection quality of receiving the video.
ConnectionQuality quality = meetingService->GetVideoConnQuality(true);
printf("Video Quality for Sent Video: %d\n", quality);
ConnectionQuality quality = meetingService->GetVideoConnQuality(false);
printf("Video Quality for Received Video: %d\n", quality);

enum ConnectionQuality
{
	Conn_Quality_Unknown,///<Unknown connection status
	Conn_Quality_Very_Bad,///<The connection quality is very poor.
	Conn_Quality_Bad,///<The connection quality is poor.
	Conn_Quality_Not_Good,///<The connection quality is not good.
	Conn_Quality_Normal,///<The connection quality is normal.
	Conn_Quality_Good,///<The connection quality is good.
	Conn_Quality_Excellent,///<The connection quality is excellent.
};

/// Callback for getting all users audio, video and screen share quality.
void MeetingServiceEventListener::onUserNetworkStatusChanged (MeetingComponentType type, ConnectionQuality level, unsigned int userId, bool uplink)
{
}

enum MeetingComponentType
{
    MeetingComponentType_Def = 0,
    MeetingComponentType_AUDIO,
    MeetingComponentType_VIDEO,
    MeetingComponentType_SHARE,
};

// Get video statistic information such as latency, package loss and more here
ASVSessionStatisticInfo info_;
settingservice->GetStatisticSettings()->QueryVideoStatisticInfo(info_);
```

## See audio quality

The `IMeetingService` interface provides a method `GetAudioConnQuality()` to the `ConnectionQuality` object, which provides both sent and received audio network quality data for the local user. The callback `onUserNetworkStatusChanged()` under `IMeetingServiceEvent` is also available to retrieve the audio quality data for all users. You can also get statistics information by calling the `GetStatisticSettings` under `ISettingService`. 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.

```cpp
// TRUE indicates to get the connection quality of sending the audio.
// FALSE indicates to get the connection quality of receiving the audio.
ConnectionQuality quality = meetingService->GetAudioConnQuality(true);
printf("Audio Quality for Sent Audio: %d\n", quality);
ConnectionQuality quality = meetingService->GetAudioConnQuality(false);
printf("Audio Quality for Received Audio: %d\n", quality);

enum ConnectionQuality
{
	Conn_Quality_Unknown,///<Unknown connection status
	Conn_Quality_Very_Bad,///<The connection quality is very poor.
	Conn_Quality_Bad,///<The connection quality is poor.
	Conn_Quality_Not_Good,///<The connection quality is not good.
	Conn_Quality_Normal,///<The connection quality is normal.
	Conn_Quality_Good,///<The connection quality is good.
	Conn_Quality_Excellent,///<The connection quality is excellent.
};

// Callback for getting all users audio, video and screen share quality.
void MeetingServiceEventListener::onUserNetworkStatusChanged (MeetingComponentType type, ConnectionQuality level, unsigned int userId, bool uplink)
{
}

enum MeetingComponentType
{
    MeetingComponentType_Def = 0,
    MeetingComponentType_AUDIO,
    MeetingComponentType_VIDEO,
    MeetingComponentType_SHARE,
};

// Get audio statistic information such as latency, package loss and more here
ASVSessionStatisticInfo info_;
settingservice->GetStatisticSettings()->QueryAudioStatisticInfo(info_);
```

## See screen sharing quality

The `IMeetingService` interface provides a method `GetSharingConnQuality()` to the `ConnectionQuality` object, which provides both sent and received screenshare network quality data for the local user. The callback `onUserNetworkStatusChanged()` under `IMeetingServiceEvent` is also available to retrieve the screenshare quality data for all users. You can also get statistics information by calling the `GetStatisticSettings` under `ISettingService`. 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.

```cpp
// TRUE indicates to get the connection quality of sending the screen.
// FALSE indicates to get the connection quality of receiving the screenshare.
ConnectionQuality quality = meetingService->GetSharingConnQuality(true);
printf("Video Quality for Sent Sharescreen: %d\n", quality);
ConnectionQuality quality = meetingService->GetSharingConnQuality(false);
printf("Video Quality for Received Sharescreen: %d\n", quality);

enum ConnectionQuality
{
	Conn_Quality_Unknown,///<Unknown connection status
	Conn_Quality_Very_Bad,///<The connection quality is very poor.
	Conn_Quality_Bad,///<The connection quality is poor.
	Conn_Quality_Not_Good,///<The connection quality is not good.
	Conn_Quality_Normal,///<The connection quality is normal.
	Conn_Quality_Good,///<The connection quality is good.
	Conn_Quality_Excellent,///<The connection quality is excellent.
};

// Callback for getting all users audio, video and screen share quality.
void MeetingServiceEventListener::onUserNetworkStatusChanged (MeetingComponentType type, ConnectionQuality level, unsigned int userId, bool uplink)
{
}

enum MeetingComponentType
{
    MeetingComponentType_Def = 0,
    MeetingComponentType_AUDIO,
    MeetingComponentType_VIDEO,
    MeetingComponentType_SHARE,
};

// Get share statistic information such as latency, package loss and more here
	ASVSessionStatisticInfo info_;
	settingservice->GetStatisticSettings()->QueryShareStatisticInfo(info_);
```

---
