CallObserver

@available(iOS 12.0, *)
@objc(BDKCallObserver)
public protocol CallObserver : NSObjectProtocol

A call observer, notified about call events.

You subscribe as a call observer adding a class conforming to this protocol to a Call object by calling the Call.add(observer:) method

  • An optional method called when the call changes state.

    Declaration

    Swift

    @objc(call:didChangeState:)
    optional func call(_ call: Call, didChangeState state: CallState)

    Parameters

    call

    The call object.

    state

    The new state of the call.

  • An optional method called when the call updates its options.

    Declaration

    Swift

    @objc(call:didUpdateOptions:)
    optional func call(_ call: Call, didUpdateOptions options: CallOptions)

    Parameters

    call

    The call object.

    options

    The new options of the call.

  • An optional method called when the call updates its participants.

    Declaration

    Swift

    @objc(call:didUpdateParticipants:)
    optional func call(_ call: Call, didUpdateParticipants participants: CallParticipants)

    Parameters

    call

    The call object.

    participants

    The updated participants of the call.

  • An optional method called when the call updates its mute state.

    Declaration

    Swift

    @objc(call:didSetMute:)
    optional func call(_ call: Call, didSetMute muted: Bool)

    Parameters

    call

    The call object.

    muted

    A boolean flag indicating whether the call has been muted or unmuted.

  • An optional method called when the call upgrades to a video call.

    Declaration

    Swift

    @objc(callDidUpgradeToVideoCall:)
    optional func callDidUpgradeToVideoCall(_ call: Call)

    Parameters

    call

    The call object.

  • An optional method called when the call is connected.

    Declaration

    Swift

    @objc(callDidConnect:)
    optional func callDidConnect(_ call: Call)

    Parameters

    call

    The call object.

  • An optional method called when the has ended.

    Declaration

    Swift

    @objc(callDidEnd:)
    optional func callDidEnd(_ call: Call)

    Parameters

    call

    The call object.

  • An optional method called when the call has failed.

    Declaration

    Swift

    @objc(call:didFailWithError:)
    optional func call(_ call: Call, didFailWithError error: Error)

    Parameters

    call

    The call object.

    error

    The error occurred.