SINCallDelegate

Objective-C

@protocol SINCallDelegate <NSObject>

Swift

protocol SINCallDelegate : NSObjectProtocol

The delegate of a SINCall object must adopt the SINCallDelegate protocol. The required methods handle call state changes.

Call State Progression

For a complete outgoing call, the delegate methods will be called in the following order:

  • callDidProgress:
  • callDidRing:
  • callDidAnswer:
  • callDidEstablish:
  • callDidEnd:

For a complete incoming call, the delegate methods will be called in the following order, after the client delegate method [SINClientDelegate client:didReceiveIncomingCall:] has been called:

  • callDidAnswer:
  • callDidEstablish:
  • callDidEnd:
  • Tells the delegate that the call ended.

    The call has entered the SINCallStateEnded state. This method is invoked on the queue specified via -[Sinch setCallbackQueue:], which defaults to the main queue.

    See

    SINCall

    Declaration

    Objective-C

    - (void)callDidEnd:(id<SINCall>)call;

    Swift

    optional func callDidEnd(_ call: (any SINCall)!)

    Parameters

    call

    The call that ended.

  • Tells the delegate that the outgoing call is progressing and a progress tone can be played.

    The call has entered the SINCallStateProgressing state. This method is invoked on the queue specified via -[Sinch setCallbackQueue:], which defaults to the main queue.

    See

    SINCall

    Declaration

    Objective-C

    - (void)callDidProgress:(id<SINCall>)call;

    Swift

    optional func callDidProgress(_ call: (any SINCall)!)

    Parameters

    call

    The outgoing call to the client on the other end.

  • Tells the delegate that the B side received the call.

    The call has entered the SINCallStateRinging state. This method is invoked on the queue specified via -[Sinch setCallbackQueue:], which defaults to the main queue.

    See

    SINCall

    Declaration

    Objective-C

    - (void)callDidRing:(id<SINCall>)call;

    Swift

    optional func callDidRing(_ call: (any SINCall)!)

    Parameters

    call

    The outgoing call to the client on the other end.

  • Tells the delegate that the call was answered.

    The call has entered the SINCallStateAnswered state. Note that it might take some time after this callback is invoked for media stream to connect. This method is invoked on the queue specified via -[Sinch setCallbackQueue:], which defaults to the main queue.

    See

    SINCall

    Declaration

    Objective-C

    - (void)callDidAnswer:(id<SINCall>)call;

    Swift

    optional func callDidAnswer(_ call: (any SINCall)!)

    Parameters

    call

    The call that was answered.

  • Tells the delegate that the call was established.

    This means both peers should be able to hear and communicate with each other. This callback ideally is invoked shortly after [callDidAnswer], however for various reasons (e.g bad network conditions) it might take few seconds to fully establish a connection after the call is answered. This method is invoked on the queue specified via -[Sinch setCallbackQueue:], which defaults to the main queue.

    See

    SINCall

    Declaration

    Objective-C

    - (void)callDidEstablish:(id<SINCall>)call;

    Swift

    optional func callDidEstablish(_ call: (any SINCall)!)

    Parameters

    call

    The call that was established.

  • Tells the delegate that a video track has been added to the call. A delegate can use SINVideoController to manage rendering views. This method is invoked on the queue specified via -[Sinch setCallbackQueue:], which defaults to the main queue.

    Declaration

    Objective-C

    - (void)callDidAddVideoTrack:(id<SINCall>)call;

    Swift

    optional func callDidAddVideoTrack(_ call: (any SINCall)!)
  • Tells the delegate that a video track has been paused in the call. A delegate can use SINVideoController to manage rendering views. This method is invoked on the queue specified via -[Sinch setCallbackQueue:], which defaults to the main queue.

    Declaration

    Objective-C

    - (void)callDidPauseVideoTrack:(id<SINCall>)call;

    Swift

    optional func callDidPauseVideoTrack(_ call: (any SINCall)!)
  • Tells the delegate that a video track has been resumed in the call. (A delegate can use SINVideoController to manage rendering views.) This method is invoked on the queue specified via -[Sinch setCallbackQueue:], which defaults to the main queue.

    Declaration

    Objective-C

    - (void)callDidResumeVideoTrack:(id<SINCall>)call;

    Swift

    optional func callDidResumeVideoTrack(_ call: (any SINCall)!)
  • Tells the delegate that the call emitted call quality warning event.

    This method is invoked on the queue specified via -[Sinch setCallbackQueue:], which defaults to the main queue.

    See

    SINCall

    Declaration

    Objective-C

    - (void)call:(id<SINCall>)call
        didEmitCallQualityWarningEvent:(id<SINCallQualityWarningEvent>)event;

    Swift

    optional func call(_ call: (any SINCall)!, didEmitCallQualityWarningEvent event: (any SINCallQualityWarningEvent)!)

    Parameters

    call

    The call that emitted event.

    event

    The event emitted during the call..