TVOCallDelegate

Objective-C

@protocol TVOCallDelegate <NSObject>

Swift

protocol TVOCallDelegate : NSObjectProtocol

TVOCallDelegate provides callbacks when important changes to a TVOCall occur.

Required Methods

  • @brief Notifies the delegate that a Call has connected.

    See

    TVOCall

    Declaration

    Objective-C

    - (void)callDidConnect:(nonnull TVOCall *)call;

    Swift

    func callDidConnect(_ call: TVOCall)

    Parameters

    call

    The <TVOCall> that was connected.

  • @brief Notifies the delegate that a Call has failed to connect.

    See

    TVOCall

    Declaration

    Objective-C

    - (void)call:(nonnull TVOCall *)call
        didFailToConnectWithError:(nonnull NSError *)error;

    Swift

    func call(_ call: TVOCall, didFailToConnectWithError error: any Error)

    Parameters

    call

    The <TVOCall> that failed to connect.

    error

    The <NSError> that occurred.

  • @brief Notifies the delegate that a Call has disconnected.

    See

    TVOCall

    Declaration

    Objective-C

    - (void)call:(nonnull TVOCall *)call
        didDisconnectWithError:(nullable NSError *)error;

    Swift

    func call(_ call: TVOCall, didDisconnectWithError error: (any Error)?)

    Parameters

    call

    The <TVOCall> that was disconnected.

    error

    An NSError describing why disconnect occurred, or nil if the disconnect was expected.

Optional Methods

  • @brief Notifies the delegate that the called party is being alerted of a Call.

    @discussion This callback is invoked once before the [TVOCallDelegate callDidConnect:] callback. If the answerOnBridge is true this represents the callee is being alerted of a Call.

    See

    TVOCall

    Declaration

    Objective-C

    - (void)callDidStartRinging:(nonnull TVOCall *)call;

    Swift

    optional func callDidStartRinging(_ call: TVOCall)

    Parameters

    call

    The <TVOCall> that the called party is being alerted of.

  • @brief Notifies the delegate that a Call starts to reconnect due to network change event.

    @discussion Reconnect is triggered when a network change is detected and Call is already in TVOCallStateConnected state. If the call is either in TVOCallStateConnecting or in TVOCallStateRinging when network change happened then the current call will disconnect.

    See

    TVOCall

    Declaration

    Objective-C

    - (void)call:(nonnull TVOCall *)call
        isReconnectingWithError:(nonnull NSError *)error;

    Swift

    optional func call(_ call: TVOCall, isReconnectingWithError error: any Error)

    Parameters

    call

    The <TVOCall> that is reconnecting.

    error

    The <NSError> that describes the reconnect reason. This would have one of the two possible values with error codes TVOErrorSignalingConnectionDisconnectedError and TVOErrorMediaConnectionError.

  • @brief Notifies the delegate that a Call is reconnected.

    See

    TVOCall

    Declaration

    Objective-C

    - (void)callDidReconnect:(nonnull TVOCall *)call;

    Swift

    optional func callDidReconnect(_ call: TVOCall)

    Parameters

    call

    The <TVOCall> that is reconnected.

  • @brief Notifies the delegate that network quality warnings have changed for the Call.

    @discussion The trigger conditions for the warnings defined in the <TVOCallQualityWarning> enumeration are defined as follows:

    • TVOCallQualityWarningHighRtt - Round Trip Time (RTT) > 400 ms for 3 out of last 5 samples.
    • TVOCallQualityWarningHighJitter - Jitter > 30 ms for 3 out of last 5 samples.
    • TVOCallQualityWarningHighPacketsLostFraction - Raised when average packet loss > 3% in last 7 samples. Cleared when average packet loss <= 1% in last 7 samples.
    • TVOCallQualityWarningLowMos - Mean Opinion Score (MOS) < 3.5 for 3 out of last 5 samples.
    • TVOCallQualityWarningConstantAudioInputLevel - Raised when the standard deviation of audio input levels for last 10 samples is less than or equals 1% of the maximum possible audio input level (32767) i.e. 327.67 and the call is not in the muted state. Cleared when the standard deviation of audio input levels for last 10 samples is greater than 3% of the maximum possible audio input level.
    • TVOCallQualityWarningConstantAudioOutputLevel - Raised when the standard deviation of audio output levels for last 10 samples is less than or equals 1% of the maximum possible audio output level (32767) i.e. 327.67 and the local call is not placed on Hold. Cleared when the standard deviation of audio output levels for last 10 samples is greater than 3% of the maximum possible audio output level.

    The two sets will help the delegate find out what warnings have changed since the last callback was received.

    Declaration

    Objective-C

    - (void)call:(nonnull TVOCall *)call
        didReceiveQualityWarnings:(nonnull NSSet<NSNumber *> *)currentWarnings
                 previousWarnings:(nonnull NSSet<NSNumber *> *)previousWarnings;

    Swift

    optional func call(_ call: TVOCall, didReceiveQualityWarnings currentWarnings: Set<NSNumber>, previousWarnings: Set<NSNumber>)

    Parameters

    call

    The <TVOCall> that received quality warning updates.

    currentWarnings

    An <NSSet> that contains the warnings at the instant of receiving this callback. Values in the <NSSet> are <NSNumber> with values of <TVOCallQualityWarning>.

    previousWarnings

    An <NSSet> that contains the warnings before receiving this callback. Values in the <NSSet> are <NSNumber> with values of <TVOCallQualityWarning>.