CallClientState interface

Container for all of the state data proxied by StatefulCallClient. The calls, callsEnded, incomingCalls, and incomingCallsEnded states will be automatically provided if a callAgent has been created. The deviceManager will be empty initially until populated see DeviceManagerState. The userId state is provided as a convenience for the developer and is completely controled and set by the developer.

Properties

callAgent

Proxy of <xref:%40azure%2Fcommunication-calling%23CallAgent>. Please review CallAgentState.

calls

Proxy of <xref:%40azure%2Fcommunication-calling%23CallAgent.calls> as an object with CallState CallState fields. It is keyed by <xref:%40azure%2Fcommunication-calling%23Call.id>. Please note that <xref:%40azure%2Fcommunication-calling%23Call.id> could change. You should not cache the id itself but the entire <xref:%40azure%2Fcommunication-calling%23Call> and then use the id contained to look up data in this map.

callsEnded

Calls that have ended are stored here so the callEndReason could be checked. It is an object with <xref:%40azure%2Fcommunication-calling%23Call.id> keys and CallState values.

Only <xref:MAX_CALL_HISTORY_LENGTH> Calls are kept in the history. Oldest calls are evicted if required.

deviceManager

Proxy of <xref:%40azure%2Fcommunication-calling%23DeviceManager>. Please review DeviceManagerState.

incomingCalls

Proxy of <xref:%40azure%2Fcommunication-calling%23IncomingCall> as an object with <xref:IncomingCall> fields. It is keyed by <xref:%40azure%2Fcommunication-calling%23IncomingCall.id>.

incomingCallsEnded

Incoming Calls that have ended are stored here so the callEndReason could be checked. It is an as an object with <xref:%40azure%2Fcommunication-calling%23Call.id> keys and <xref:IncomingCall> values.

Only <xref:MAX_CALL_HISTORY_LENGTH> Calls are kept in the history. Oldest calls are evicted if required.

latestErrors

Stores the latest error for each API method.

See documentation of {@Link CallErrors} for details.

userId

Stores a userId. This is not used by the StatefulCallClient and is provided here as a convenience for the developer for easier access to userId. Must be passed in at initialization of the StatefulCallClient. Completely controlled by the developer.

Property Details

callAgent

Proxy of <xref:%40azure%2Fcommunication-calling%23CallAgent>. Please review CallAgentState.

callAgent?: CallAgentState

Property Value

calls

Proxy of <xref:%40azure%2Fcommunication-calling%23CallAgent.calls> as an object with CallState CallState fields. It is keyed by <xref:%40azure%2Fcommunication-calling%23Call.id>. Please note that <xref:%40azure%2Fcommunication-calling%23Call.id> could change. You should not cache the id itself but the entire <xref:%40azure%2Fcommunication-calling%23Call> and then use the id contained to look up data in this map.

calls: {[key: string]: CallState}

Property Value

{[key: string]: CallState}

callsEnded

Calls that have ended are stored here so the callEndReason could be checked. It is an object with <xref:%40azure%2Fcommunication-calling%23Call.id> keys and CallState values.

Only <xref:MAX_CALL_HISTORY_LENGTH> Calls are kept in the history. Oldest calls are evicted if required.

callsEnded: {[key: string]: CallState}

Property Value

{[key: string]: CallState}

deviceManager

Proxy of <xref:%40azure%2Fcommunication-calling%23DeviceManager>. Please review DeviceManagerState.

deviceManager: DeviceManagerState

Property Value

incomingCalls

Proxy of <xref:%40azure%2Fcommunication-calling%23IncomingCall> as an object with <xref:IncomingCall> fields. It is keyed by <xref:%40azure%2Fcommunication-calling%23IncomingCall.id>.

incomingCalls: {[key: string]: IncomingCallState}

Property Value

{[key: string]: IncomingCallState}

incomingCallsEnded

Incoming Calls that have ended are stored here so the callEndReason could be checked. It is an as an object with <xref:%40azure%2Fcommunication-calling%23Call.id> keys and <xref:IncomingCall> values.

Only <xref:MAX_CALL_HISTORY_LENGTH> Calls are kept in the history. Oldest calls are evicted if required.

incomingCallsEnded: {[key: string]: IncomingCallState}

Property Value

{[key: string]: IncomingCallState}

latestErrors

Stores the latest error for each API method.

See documentation of {@Link CallErrors} for details.

latestErrors: CallErrors

Property Value

userId

Stores a userId. This is not used by the StatefulCallClient and is provided here as a convenience for the developer for easier access to userId. Must be passed in at initialization of the StatefulCallClient. Completely controlled by the developer.

userId: CommunicationIdentifierKind

Property Value