BCXCall

Objective-C

@protocol BCXCall <NSObject>

Swift

protocol BCXCall : NSObjectProtocol

It is the item representing a call in Bandyer platform. The object provides information about the current state of the call (e.g if it’s dialing, connecting, ended and so on), information about the kind of call it’s being performed (e.g. a group call, or a one to one call), the call direction, and the call type (Audio Only, Audio Upgradable or Audio / Video). It also provides information regarding call participants and their state within the call (e.g if a participant has answered, declined and so on).

Changes in the state of a call object will be notified to its observers. You can register as a call observer using the methods addObserver: addObserver:queue: provided. Beware that observer methods will be called an a private background queue. If you want to be notified on a different queue, you can provide one yourself in the addObserver:queue: method.

Properties

  • The local id of the call.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) NSUUID *_Nonnull uuid;

    Swift

    var uuid: UUID { get }
  • sid

    The remote id of the call.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) NSString *sid;

    Swift

    var sid: String? { get }
  • The call options specified when creating a call.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) BCXCallOptions *options;

    Swift

    var options: BCXCallOptions? { get }
  • The call’s end reason.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BCXCallEndReason endReason;

    Swift

    var endReason: BCXCallEndReason { get }
  • If the call has been declined, this property will contain the decline reason.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BCXDeclineReason declineReason;

    Swift

    var declineReason: BCXDeclineReason { get }
  • The room where the call will take place.

    This property will return nil, until the call has connected successfully with its host.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) BAVRoom *room;

    Swift

    var room: BAVRoom? { get }

Observers

  • Adds an observer that will be notified synchronously on a private background queue. The observer object will be held weakly.

    Declaration

    Objective-C

    - (void)addObserver:(nonnull id<BCXCallObserver>)observer;

    Parameters

    observer

    The observer to be added.

  • Adds an observer specifying on which dispatch queue it must be notified. If a nil queue is provided the observer will be notified synchronously on a private background queue. Otherwise the observer will be notified asynchronously on the queue provided. The observer object will be held weakly.

    Declaration

    Objective-C

    - (void)addObserver:(nonnull id<BCXCallObserver>)observer
                  queue:(nullable dispatch_queue_t)queue;

    Parameters

    observer

    The observer to add.

    queue

    The dispatch queue onto which the observer will be notified.

  • Removes an observer.

    Declaration

    Objective-C

    - (void)removeObserver:(nonnull id<BCXCallObserver>)observer;

    Parameters

    observer

    The observer to be removed.

Participants

  • The call participants.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) id<BCXCallParticipants> _Nonnull participants;
  • Returns a flag indicating whether the call is a group call, or not.

    Declaration

    Objective-C

    - (BOOL)isGroupCall;

    Swift

    func isGroupCall() -> Bool

    Return Value

    YES if the call is a group call, NO otherwise.

Call Direction

  • The call’s direction.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BCXCallDirection direction;

    Swift

    var direction: BCXCallDirection { get }
  • An utility method that returns a boolean value indicating whether the call is incoming or not.

    Declaration

    Objective-C

    - (BOOL)isIncoming;

    Swift

    func isIncoming() -> Bool

    Return Value

    YES if the call is incoming, NO otherwise

  • An utility method that returns a boolean value indicating whether the call is outgoing or not.

    Declaration

    Objective-C

    - (BOOL)isOutgoing;

    Swift

    func isOutgoing() -> Bool

    Return Value

    YES if the call is outgoing, NO otherwise

Call Type

  • A flag indicating the call type of the receiver. Once set, this flag doesn’t change even if the receiver has upgraded to a video call. If you want to know whether the call has upgraded to a video call in case it’s of type BCXCallTypeAudioUpgradable you should check the didUpgradeToVideo flag.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BCXCallType callType;

    Swift

    var callType: BCXCallType { get }
  • Returns a boolean flag indicating whether the call is a BCXCallTypeAudioVideo call, or not.

    Declaration

    Objective-C

    - (BOOL)isAudioVideo;

    Swift

    func isAudioVideo() -> Bool

    Return Value

    YES if the call is a BCXCallTypeAudioVideo call, NO otherwise.

  • Returns a boolean flag indicating whether the call is a BCXCallTypeAudioUpgradable call, or not.

    Declaration

    Objective-C

    - (BOOL)isAudioUpgradable;

    Swift

    func isAudioUpgradable() -> Bool

    Return Value

    YES if the call is a BCXCallTypeAudioUpgradable call, NO otherwise.

  • Returns a boolean flag indicating whether the call is a BCXCallTypeAudioOnly call, or not.

    Declaration

    Objective-C

    - (BOOL)isAudioOnly;

    Swift

    func isAudioOnly() -> Bool

    Return Value

    YES if the call is a BCXCallTypeAudioOnly call, NO otherwise.

  • Returns a boolean flag indicating whether the call can be upgraded to video, or not.

    Declaration

    Objective-C

    - (BOOL)canUpgradeToVideo;

    Swift

    func canUpgradeToVideo() -> Bool

    Return Value

    YES if the call can be upgraded to video, NO otherwise.

  • Returns a boolean flag indicating whether the call has upgraded to video, or not. When an BCXCallTypeAudioUpgradable call is upgraded to a video call either by the current user or by another call participant, this flag will be updated to YES.

    Declaration

    Objective-C

    - (BOOL)didUpgradeToVideo;

    Swift

    func didUpgradeToVideo() -> Bool

    Return Value

    YES if the call has upgraded to video, NO otherwise.

Call State

  • The call’s current state.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BCXCallState state;

    Swift

    var state: BCXCallState { get }
  • An utility method that returns a boolean value indicating whether the call has ended or not.

    Declaration

    Objective-C

    - (BOOL)hasEnded;

    Swift

    func hasEnded() -> Bool

    Return Value

    YES if the call has ended, NO otherwise.

  • An utility method that returns a boolean value indicating whether the call has failed or not.

    Declaration

    Objective-C

    - (BOOL)hasFailed;

    Swift

    func hasFailed() -> Bool

    Return Value

    YES if the call has failed, NO otherwise.

  • An utility method that returns a boolean value indicating whether the call is idle or not.

    Declaration

    Objective-C

    - (BOOL)isIdle;

    Swift

    func isIdle() -> Bool

    Return Value

    YES if the call is idle, NO otherwise.

  • An utility method that returns a boolean value indicating whether the call is ringing or not.

    Declaration

    Objective-C

    - (BOOL)isRinging;

    Swift

    func isRinging() -> Bool

    Return Value

    YES if the call is ringing, NO otherwise.

  • An utility method that returns a boolean value indicating whether the call is dialing or not.

    Declaration

    Objective-C

    - (BOOL)isDialing;

    Swift

    func isDialing() -> Bool

    Return Value

    YES if the call is dialing, NO otherwise.

  • An utility method that returns a boolean value indicating whether the call is connecting or not.

    Declaration

    Objective-C

    - (BOOL)isConnecting;

    Swift

    func isConnecting() -> Bool

    Return Value

    YES if the call is connecting, NO otherwise.

  • An utility method that returns a boolean value indicating whether the call is connected or not.

    Declaration

    Objective-C

    - (BOOL)isConnected;

    Swift

    func isConnected() -> Bool

    Return Value

    YES if the call is connected, NO otherwise.

  • An utility method that returns a boolean value indicating whether the call is answering or not.

    Declaration

    Objective-C

    - (BOOL)isAnswering;

    Swift

    func isAnswering() -> Bool

    Return Value

    YES if the call is answering, NO otherwise.

  • An utility method that returns a boolean value indicating whether the call is declining or not.

    Declaration

    Objective-C

    - (BOOL)isDeclining;

    Swift

    func isDeclining() -> Bool

    Return Value

    YES if the call is declining, NO otherwise.

  • An utility method that returns a boolean value indicating whether the call is hanging up or not.

    Declaration

    Objective-C

    - (BOOL)isHangingUp;

    Swift

    func isHangingUp() -> Bool

    Return Value

    YES if the call is hanging up, NO otherwise.

Mute

  • A property indicating whether the local audio is muted or not

    Declaration

    Objective-C

    @property (nonatomic, getter=isMuted) BOOL muted;

    Swift

    var isMuted: Bool { get set }