SINCall
Objective-C
@protocol SINCall <NSObject>
Swift
protocol SINCall : NSObjectProtocol
The SINCall represents a call.
Important
Thread safety notes: All interaction should be done on main thread/main GCD queue.-
The object that acts as the delegate of the call.
The delegate object handles call state change events and must adopt the SINCallDelegate protocol.
See
SINCallDelegateDeclaration
Objective-C
@property (nonatomic, weak, readwrite) id<SINCallDelegate> delegate;Swift
weak var delegate: SINCallDelegate! { get set } -
String that is used as an identifier for this particular call.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *callId;Swift
var callId: String! { get } -
The id of the remote participant in the call.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *remoteUserId;Swift
var remoteUserId: String! { get } -
Metadata about a call, such as start time.
When a call has ended, the details object contains information about the reason the call ended and error information if the call ended unexpectedly.
See
SINCallDetailsDeclaration
Objective-C
@property (nonatomic, strong, readonly) id<SINCallDetails> details; -
The state the call is currently in. It may be one of the following:
SINCallStateInitiatingSINCallStateProgressingSINCallStateEstablishedSINCallStateEnded
Initially, the call will be in the
SINCallStateInitiatingstate.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readonly) SINCallState state;Swift
var state: SINCallState { get } -
The direction of the call. It may be one of the following:
SINCallDirectionIncomingSINCallDirectionOutgoing
Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readonly) SINCallDirection direction;Swift
var direction: SINCallDirection { get } -
Call headers.
Any application-defined call meta-data can be passed via headers.
E.g. a human-readable “display name / username” can be convenient to send as an application-defined header.
Important
If a call is initially received via remote push notifications, headers may not be immediately available due to push payload size limitations (especially pre- iOS 8). If it’s not immediately available, it will be available after the event callbacks-[SINCallDelegate callDidProgress:]or-[SINCallDelegate callDidEstablish:].Declaration
Objective-C
@property (nonatomic, readonly) NSDictionary *headers;Swift
var headers: [AnyHashable : Any]! { get } -
The user data property may be used to associate an arbitrary contextual object with a particular instance of a call.
Declaration
Objective-C
@property (nonatomic, strong, readwrite) id userInfo;Swift
var userInfo: Any! { get set } -
Answer an incoming call. *
- - Important: Thread safety notes: Should be called on main thread/main GCD queue.
Declaration
Objective-C
- (void)answer;Swift
func answer() -
Ends the call, regardless of what state it is in. If the call is an incoming call that has not yet been answered, the call will be reported as denied to the caller.
Important
Thread safety notes: Should be called on main thread/main GCD queue.Declaration
Objective-C
- (void)hangup;Swift
func hangup() -
Sends a DTMF tone for tone dialing. (Only applicable for calls terminated to PSTN (Publicly Switched Telephone Network)).
Important
Thread safety notes: Should be called on main thread/main GCD queue.
Declaration
Objective-C
- (BOOL)sendDTMF:(NSString *)key;Swift
func sendDTMF(_ key: String!) -> BoolParameters
keyDTMF key must be in [0-9, #, *, A-D].
Return Value
YES if DTMF was sent correctly, NO otherwise
-
Pause video track for this call
Important
Thread safety notes: Should be called on main thread/main GCD queue.Declaration
Objective-C
- (void)pauseVideo;Swift
func pauseVideo() -
Start video track for this call
Important
Thread safety notes: Should be called on main thread/main GCD queue.Declaration
Objective-C
- (void)resumeVideo;Swift
func resumeVideo()
SINCall Protocol Reference