Skip to main content
Version: 2.0.x

Network Events - iOS

VideoSDK provides the onQualityLimitation event to keep your app informed whenever media quality is affected or recovers during a meeting. This gives you the context you need to respond in real time and keep the experience smooth for your users.

onQualityLimitation

  • This event will be triggered when a quality limitation is detected or resolved during the meeting.

  • It will pass type as an event callback parameter which will indicate the type of quality limitation affecting media performance. All possible types are :

    • CPU: Quality is limited due to high CPU usage.
    • BANDWIDTH: Quality is limited due to insufficient available bandwidth.
    • CONGESTION: Quality is limited due to network congestion.
  • It will pass state as an event callback parameter which will indicate whether a quality limitation is currently active or has been resolved. All possible states are :

    • DETECTED: The limitation is detected.
    • RESOLVED: The limitation is resolved.
  • It will pass timestamp as an event callback parameter which will indicate the time (in milliseconds since epoch) when the event occurred.

  • You can implement this method of the abstract Class MeetingEventListener and add the listener to Meeting class using the addEventListener() method of Meeting Class.

Example

Here is the usage of the event mentioned in this page.

extension MeetingViewController: MeetingEventListener {
meeting.listeners.onQualityLimitation(type: QualityLimitationType,
state: QualityLimitationState,
timestamp: Int) {
switch type {
case .CPU:
print("Quality limited due to high CPU usage: \(state) at \(timestamp)")

case .BANDWIDTH:
print("Quality limited due to low bandwidth: \(state) at \(timestamp)")

case .CONGESTION:
print("Quality limited due to network congestion: \(state) at \(timestamp)")
}
}
}

API Reference

The API references for all the methods and events utilised in this guide are provided below.

Got a Question? Ask us on discord