Skip to main content

ENUM

CallState

public enum CallState: Equatable

CallState represents the state of the call

Cases ​

NEW ​

case NEW

New call has been created in the client.

CONNECTING ​

case CONNECTING

The outbound call is being sent to the server.

RINGING ​

case RINGING

Call is pending to be answered. Someone is attempting to call you.

ACTIVE ​

case ACTIVE

Call is active when two clients are fully connected.

HELD ​

case HELD

Call has been held.

DONE(reason:) ​

case DONE(reason: CallTerminationReason? = nil)

Call has ended.

RECONNECTING(reason:) ​

case RECONNECTING(reason: Reason)

The active call is being recovered. Usually after a network switch or bad network

DROPPED(reason:) ​

case DROPPED(reason: Reason)

The active call is dropped. Usually when the network is lost.

Methods ​

getReason() ​

public func getReason() -> String?

Helper function to get the reason for the state (if applicable).

==(_:_:) ​

public static func == (lhs: CallState, rhs: CallState) -> Bool

Parameters ​

NameDescription
lhsA value to compare.
rhsAnother value to compare.