VIQualityIssueDelegate
Interface to monitor issues that affect the call quality during a call.
Quality issues are detected only if a call is connected. If a call is reconnecting, all previously detected issues (if any) are reset, their issue level is changed to VIQualityIssueLevelNone.
Methods
call:didDetectCodecMismatch:issueLevel:
- (void
)call:(VICall *
)call
didDetectCodecMismatch:(nullable NSString *
)codec
issueLevel:()level
Triggered if the local video is encoded by a codec different from specified in [VICallSettings preferredVideoCodec].
Issue level is VIQualityIssueLevelCritical if video is not sent, VIQualityIssueLevelMajor in case of codec mismatch or VIQualityIssueLevelNone if the issue is not detected.
Possible reasons:
- The video is not sent for some reason. In this case the codec parameter is nil
- Different codecs are specified in the call endpoints
Parameters
call:
VICall *
Call the issue belongs to
codec:
nullable NSString *
Codec that is currently used or nil if the video is not sent
level:
Issue level
Returns
type:
void
call:didDetectHighMediaLatency:issueLevel:
- (void
)call:(VICall *
)call
didDetectHighMediaLatency:(NSTimeInterval
)latency
issueLevel:()level
Triggered if network-based media latency is detected in the call. Network-based media latency is calculated based on rtt (round trip time) and jitter buffer. Latency refers to the time it takes a voice/video packet to reach its destination. Sufficient latency causes call participants to speak over the top of each other.
Issue level may vary during the call.
Possible reasons:
- Network congestion/delays
- Lack of bandwidth
Parameters
call:
VICall *
Call the issue belongs to
latency:
NSTimeInterval
Network-based latency measured in milliseconds at the moment the issue triggered
level:
Issue level
Returns
type:
void
call:didDetectIceDisconnected:
- (void
)call:(VICall *
)call
didDetectIceDisconnected:()level
Triggered if the ICE connection is switched to the "disconnected" state during the call.
Issue level is always VIQualityIssueLevelCritical, because there is no media in the call until the issue is resolved.
Event may be triggered intermittently and be resolved just as spontaneously on less reliable networks, or during temporary disconnections.
Possible reasons:
- Network issues
Parameters
call:
VICall *
Call the issue belongs to
level:
Issue level
Returns
type:
void
call:didDetectLocalVideoDegradation:targetSize:issueLevel:
- (void
)call:(VICall *
)call
didDetectLocalVideoDegradation:(CGSize
)actualSize
targetSize:(CGSize
)targetSize
issueLevel:()level
Triggered if the video resolution sent to the endpoint is lower than a captured video resolution. As a result it affects remote video quality on the remote participant side, but do not affect the quality of local video preview on the iOS application.
The issue level may vary during the call.
Possible reasons:
- High CPU load during the video call
- Network issues such as poor internet connection or low bandwidth
Parameters
call:
VICall *
Call the issue belongs to
actualSize:
CGSize
Sent frame size
targetSize:
CGSize
Captured frame size
level:
Issue level
Returns
type:
void
call:didDetectLowBandwidth:targetBitrate:issueLevel:
- (void
)call:(VICall *
)call
didDetectLowBandwidth:(double
)actualBitrate
targetBitrate:(double
)targetBitrate
issueLevel:()level
Triggered if the current bitrate is insufficient for sending video with the current resolution.
Issue level may vary during the call. SDK may report VIQualityIssueLevelMajor or VIQualityIssueLevelMinor while detecting network capabilities right after the call start.
Target bitrate depends on the sent video frame resolution. If the resolution of video frames sent is changed, target bitrate can also be changed (increased or degraded).
It is not recommended to change the resolution or other video call parameters once the issue is detected; in such case, SDK tries to adapt to the current congestion automatically. Only if the issue level is constantly VIQualityIssueLevelMajor or VIQualityIssueLevelCritical, you can change the video call parameters.
Issue may be triggered and constantly report VIQualityIssueLevelMajor or VIQualityIssueLevelCritical if the application is running in the background.
Possible reasons:
- Network issues
- Background state of an application
Parameters
call:
VICall *
Call the issue belongs to
actualBitrate:
double
Actual bitrate. Measured in bits per second
targetBitrate:
double
Bitrate required to send video with the current resolution with a good quality. Measured in bits per second.
level:
Issue level
Returns
type:
void
call:didDetectNoAudioReceiveOnStream:fromEndpoint:issueLevel:
- (void
)call:(VICall *
)call
didDetectNoAudioReceiveOnStream:()audioStream
fromEndpoint:()endpoint
issueLevel:()level
Triggered if no audio is received on a remote audio stream.
Issue level can be only VIQualityIssueLevelCritical if the issue is detected or VIQualityIssueLevelNone if the issue is not detected or resolved.
If no audio receive is detected on several remote audio streams, the event is invoked for each of the remote audio streams with the issue.
If the issue level is VIQualityIssueLevelCritical, the event is not invoked with the level VIQualityIssueLevelNone in cases:
- The (conference) call ended
- The endpoint left the conference call - [VIEndpointDelegate endpointDidRemove:] is invoked
The issue is not detected for the following cases:
- The endpoint put the call on hold via [VICall setHold:completion:]
- The endpoint stopped sending audio during a call via [VICall sendAudio]
Possible reasons:
- Poor internet connection on the client or the endpoint
- Connection lost on the endpoint
Parameters
call:
VICall *
Call the issue belongs to
audioStream:
Remote audio stream the issue occured on
endpoint:
Endpoint the issue belongs to
level:
Issue level
Returns
type:
void
call:didDetectNoAudioSignal:
- (void
)call:(VICall *
)call
didDetectNoAudioSignal:()level
Triggered if no audio is captured by the microphone.
Issue level can be only VIQualityIssueLevelCritical if the issue is detected or VIQualityIssueLevelNone if the issue is not detected or resolved.
Possible reasons:
- Access to microphone is denied
- Category of AVAudioSession is not AVAudioSessionCategoryPlayAndRecord
Parameters
call:
VICall *
Call the issue belongs to
level:
Issue level
Returns
type:
void
call:didDetectNoVideoReceiveOnStream:fromEndpoint:issueLevel:
- (void
)call:(VICall *
)call
didDetectNoVideoReceiveOnStream:()videoStream
fromEndpoint:()endpoint
issueLevel:()level
Triggered if no video is received on a remote video stream.
Issue level can be only VIQualityIssueLevelCritical if the issue is detected or VIQualityIssueLevelNone if the issue is not detected or resolved.
If no receiving video is detected on several remote video streams, the event is invoked for each of the remote video streams with the issue.
If the issue level is VIQualityIssueLevelCritical, the event is not invoked with the level VIQualityIssueLevelNone in cases:
- The (conference) call ended
- The remote video stream has been removed - [VIEndpointDelegate endpoint:didRemoveRemoteVideoStream:] is invoked
- The endpoint left the conference call - [VIEndpointDelegate endpointDidRemove:] is invoked
The issue is not detected for the following cases:
- The endpoint put the call on hold via [VICall setHold:completion:]
- The endpoint stopped sending video during a call via [VICall setSendVideo:completion:]
- Receiving video has been stopped on the remote video stream via [VIRemoteVideoStream stopReceiving]
Possible reasons:
- Poor internet connection on the client or the endpoint
- Connection lost on the endpoint
- The endpoint's application has been moved to the background state on an iOS device (camera usage is prohibited while in the background on iOS)
Parameters
call:
VICall *
Call the issue belongs to
videoStream:
Remote video stream the issue occured on
endpoint:
Endpoint the issue belongs to
level:
Issue level
Returns
type:
void
call:didDetectPacketLoss:issueLevel:
- (void
)call:(VICall *
)call
didDetectPacketLoss:(double
)packetLoss
issueLevel:()level
Triggered on packet loss detection. Packet loss can lead to missing of entire sentences, awkward pauses in the middle of a conversation or robotic voice during the call.
Issue level may vary during the call.
Possible reasons:
- Network congestion
- Bad hardware (parts of the network infrastructure)
Parameters
call:
VICall *
Call the issue belongs to
packetLoss:
double
Average packet loss for 2.5 seconds
level:
Issue level
Returns
type:
void