Call
Provides access to methods for managing outgoing or incoming calls.
Call objects are obtained calling CallManager#createCall method or handling
the onIncoming
event of a connected CallManager instance.
Events
localOnlyStreams
(ImmutableSet<ManagedStream> currentValue, ImmutableSet<ManagedStream> oldValue)- Emitted every time localOnlyStreams changes.
remoteStreams
(ImmutableSet<ManagedStream> currentValue, ImmutableSet<ManagedStream> oldValue)- Emitted every time remoteStreams changes.
transferred
- Emitted every time remote end of the call changes.
context
(Object)- Emitted every time context changes.
status
(CallStatus)- Emitted every time status changes.
Member Summary
Public Members | ||
public |
emitter: EventEmitter |
Method Summary
Public Methods | ||
public |
Attempts to reach the call recipient and establish a connection. |
|
public |
Create an object to manage the remote recording |
|
public |
async disconnect(): Promise<Call> Disconnects or rejects the call |
|
public |
getContext(): Object Returns actual call context |
|
public |
Returns the direction of the call |
|
public |
Returns the end reason of the call. |
|
public |
|
|
public |
Allows access to local streams and actions related to changing which local media is shared |
|
public |
Returns a set containing the local only streams |
|
public |
Returns a the remote gateway user |
|
public |
Returns a set containing the remote streams |
|
public |
Returns a user object representing the remote user if exists |
|
public |
Returns the current status of the call |
|
public |
Returns a boolean value indicating if the call has a local only video track |
|
public |
Returns a boolean value indicating if the call has a remote audio track |
|
public |
Returns a boolean value indicating if the call has a remote video track |
|
public |
hasStatus(args: ...CallStatus): boolean Returns true if Call is in any of the specified status |
|
public |
Holds this call |
|
public |
Returns true if the Call is polling |
|
public |
Resumes this call |
|
public |
Send a DTMF tone |
|
public |
setContext(context: Object): Call Set some optional data that will be sent when creating the call. |
|
public |
|
|
public |
waitForStatus(statusList: ...CallStatus): Promise<CallStatus> Returns a promise that is resolved when the call changes to the requested status |
Public Members
public emitter: EventEmitter source
Public Methods
public async connect(): Promise<Call, Error> source
Attempts to reach the call recipient and establish a connection.
public createCallRecorder(type: String): CallRemoteRecorder source
Create an object to manage the remote recording
Params:
Name | Type | Attribute | Description |
type | String |
|
Type of the recording |
public getEndReason(): CallEndReason source
Returns the end reason of the call. This value is only specified when the status of the call is DISCONNECTED
public getLocalMediaHandler(): LocalMediaHandler source
Allows access to local streams and actions related to changing which local media is shared
public getLocalOnlyStreams(): ImmutableSet<ManagedStream> source
Returns a set containing the local only streams
public getRemoteStreams(): ImmutableSet<ManagedStream> source
Returns a set containing the remote streams
public hasLocalOnlyVideo(): boolean source
Returns a boolean value indicating if the call has a local only video track
public hasRemoteAudio(): boolean source
Returns a boolean value indicating if the call has a remote audio track
public hasRemoteVideo(): boolean source
Returns a boolean value indicating if the call has a remote video track
public hasStatus(args: ...CallStatus): boolean source
Returns true if Call is in any of the specified status
Params:
Name | Type | Attribute | Description |
args | ...CallStatus |
public sendDtmf(key: string) source
Send a DTMF tone
Params:
Name | Type | Attribute | Description |
key | string | The key of the DTMF tone to send |
public setContext(context: Object): Call source
Set some optional data that will be sent when creating the call. Note that this method must be used before the call is connected.
Params:
Name | Type | Attribute | Description |
context | Object | Any JSON serializable object that will be sent to the server when the call starts |
public async transfer(to: string): Promise<boolean, Error> source
Params:
Name | Type | Attribute | Description |
to | string |
public waitForStatus(statusList: ...CallStatus): Promise<CallStatus> source
Returns a promise that is resolved when the call changes to the requested status
Params:
Name | Type | Attribute | Description |
statusList | ...CallStatus |