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 moreDeclaration
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.See moreImportant
All callbacks are delivered synchronously on the SDK’s internal real-time audio threads, in the orderaudioRecordingDidStart(with:),onLocalAudioFrame(_:),audioRecordingDidStop(with:). Implementations must not block — any significant delay will cause audio glitches.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.See moreImportant
All callbacks are delivered synchronously on the SDK’s internal real-time audio threads, in the orderaudioPlayoutDidStart(with:),onRemoteAudioFrame(_:),audioPlayoutDidStop(with:). Implementations must not block — any significant delay will cause audio glitches.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:
Declaration
Swift
public protocol SinchCallDelegate : AnyObject -
SinchCallClient delegate protocol
See moreDeclaration
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 moreDeclaration
Swift
public protocol SinchClientDelegate : AnyObject -
Delegate of SinchManagedPush
See moreDeclaration
Swift
public protocol SinchManagedPushDelegate : AnyObject -
Delegate for locally captured video frames: observe or modify each frame before it is encoded and sent. Assign via
SinchVideoController.localVideoFrameDelegate.The
cvPixelBufferpassed toonLocalVideoFrame(_:completionHandler:)is the SDK-owned frame captured from the camera; do not retain or release it. Call the completion handler exactly once with that buffer (optionally mutated in place) or a new one you created. The SDK takes ownership of whatever you pass and releases the input itself.See moreImportant
Calling the completion handler is mandatory (otherwise the pipeline stalls) and may occur on any queue.Declaration
Swift
public protocol SinchLocalVideoFrameDelegate : AnyObject -
Delegate for received remote video frames: observe or modify each decoded frame before it is rendered. Assign via
SinchVideoController.remoteVideoFrameDelegate.The
cvPixelBufferpassed toonRemoteVideoFrame(_:completionHandler:)is the SDK-owned frame decoded from the remote stream; do not retain or release it. Call the completion handler exactly once with that buffer (optionally mutated in place) or a new one you created. The SDK takes ownership of whatever you pass and releases the input itself.See moreImportant
Calling the completion handler is mandatory (otherwise rendering stalls) and may occur on any queue.Declaration
Swift
public protocol SinchRemoteVideoFrameDelegate : AnyObject
Protocols Reference