SinchCall

public final class SinchCall

The SinchCall represents a call.

  • State describes possible states the call can be in

    See more

    Declaration

    Swift

    public enum State : String, CaseIterable
  • Direction of the call

    See more

    Declaration

    Swift

    @frozen
    public enum Direction : String, CaseIterable
  • The object that acts as the delegate of the call.

    The delegate object handles call state change events and must adopt the SinchCallDelegate protocol.

    Declaration

    Swift

    public weak var delegate: SinchCallDelegate? { get set }
  • String that is used as an identifier for this particular call.

    Declaration

    Swift

    public let callId: String
  • The id of the remote participant in the call.

    Declaration

    Swift

    public let remoteUserId: String
  • 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 also

    SinchCallDetails

    Declaration

    Swift

    public var details: SinchCallDetails { get }
  • Declaration

    Swift

    public var state: State { get }
  • The direction of the call. It may be one of the following:

    Declaration

    Swift

    public let direction: Direction
  • 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 SinchCallDelegate.callDidProgress: or SinchCallDelegate.callDidEstablish: .

    Declaration

    Swift

    public let headers: [AnyHashable : Any]
  • The user data property may be used to associate an arbitrary contextual object with a particular instance of a call.

    Declaration

    Swift

    public var userInfo: Any?
  • Answer an incoming call.

    Declaration

    Swift

    public 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.

    Declaration

    Swift

    public func hangup()
  • Sends a DTMF tone for tone dialing. (Only applicable for calls terminated to PSTN (Publicly Switched Telephone Network)).

    • return: true if DTMF was sent correctly, false otherwise.

    Declaration

    Swift

    public func sendDTMF(key: String) -> Bool

    Parameters

    key

    DTMF key must be in [0-9, #, *, A-D].

  • Pause video track for this call

    Declaration

    Swift

    public func pauseVideo()
  • Start video track for this call

    Declaration

    Swift

    public func resumeVideo()