Protocols

The following protocols are available globally.

  • The delegate of a SinchAudioController object must adopt the SinchAudioControllerDelegate protocol. The methods handle audio related state changes.

    See more

    Declaration

    Swift

    public protocol SinchAudioControllerDelegate : AnyObject
  • The delegate for local audio recording events.

    The callbacks allow observing and modifying the raw PCM audio captured from the microphone before it is handed to the WebRTC engine for processing, encoding and transmission.

    Assign via SinchAudioController.localAudioFrameDelegate.

    Important

    All callbacks are delivered synchronously on the SDK’s internal real-time audio threads, in the order audioRecordingDidStart(with:), onLocalAudioFrame(_:), audioRecordingDidStop(with:). Implementations must not block — any significant delay will cause audio glitches.
    See more

    Declaration

    Swift

    public protocol SinchLocalAudioFrameDelegate : AnyObject
  • The delegate for remote audio playout events.

    The callbacks allow observing and modifying the decoded PCM audio received from the remote party before it is written to the audio output device.

    Assign via SinchAudioController.remoteAudioFrameDelegate.

    Important

    All callbacks are delivered synchronously on the SDK’s internal real-time audio threads, in the order audioPlayoutDidStart(with:), onRemoteAudioFrame(_:), audioPlayoutDidStop(with:). Implementations must not block — any significant delay will cause audio glitches.
    See more

    Declaration

    Swift

    public protocol SinchRemoteAudioFrameDelegate : AnyObject
  • The delegate of a SinchCall object must adopt the SinchCallDelegate 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 SinchClientDelegate client:didReceiveIncomingCall: has been called:

    • `callDidAnswer:
    • callDidEstablish:
    • callDidEnd:
    See more

    Declaration

    Swift

    public protocol SinchCallDelegate : AnyObject
  • SinchCallClient delegate protocol

    See more

    Declaration

    Swift

    public protocol SinchCallClientDelegate : AnyObject
  • The delegate of a SinchClient object must adopt the SinchClientDelegate protocol. The required methods allows responding to client state changes (start and stop), and providing user registration credentials (JWT).

    See more

    Declaration

    Swift

    public protocol SinchClientDelegate : AnyObject
  • Delegate of SinchManagedPush

    See more

    Declaration

    Swift

    public protocol SinchManagedPushDelegate : AnyObject
  • Protocol that should be adopted by video frame callback

    See more

    Declaration

    Swift

    public protocol SinchVideoFrameCallback : AnyObject