Skip to content

Media Quality Indicator

knamoach edited this page Apr 5, 2022 · 6 revisions

Media Quality Indicator

Media Quality Indicator can be received after registering callback on call/Meeting. These api's are available from v3.4.0 onwards

The API provides an indication of network status and other information related to the user device, for an ongoing call. Network status includes poor uplink, poor downlink, network lost and good network.

NOTE: This feature is only available from sdk-version 3.4.0-SNAPSHOT

Media Quality Indicator API Examples

  1. Registering a onMediaQualityInfoChanged listener
    call.setObserver(object : CallObserver {
            override fun onMediaQualityInfoChanged(mediaQualityInfo: Call.MediaQualityInfo) {
                when (mediaQualityInfo) {
                    Call.MediaQualityInfo.NetworkLost -> {
                        // network lost
                    }
                    Call.MediaQualityInfo.Good -> {
                        // network quality is good
                    }
                    Call.MediaQualityInfo.PoorUplink -> {
                        // poor uplink local network condition, e.g. packets lost or jitter between media server and device while sending media
                    }
                    Call.MediaQualityInfo.PoorDownlink -> {
                        // poor downlink local network condition, e.g. packets lost or jitter between media server and device while receiving media
                    }
                    Call.MediaQualityInfo.HighCpuUsage -> {
                        // The device has high cpu usage
                    }
                    Call.MediaQualityInfo.DeviceLimitation -> {
                        // The device has poor capability, e.g. CPU core count is not enough or memory size is small
                    }
                }
            }
        })
  1. Unregistering a onMediaQualityInfoChanged listener
    call.setObserver(null)
Clone this wiki locally