new NXMCall(application, conversation, from)
Conversation NXMCall Object.
Parameters:
| Name | Type | Description |
|---|---|---|
application |
Application | The Application object. |
conversation |
Conversation | The Conversation object that belongs to this nxmCall. |
from |
Member | The member that initiated the nxmCall. |
- Source:
Properties:
| Name | Type | Default | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
application |
Application | The Application object that the nxmCall belongs to. |
|||||||||||||||||||||||||
conversation |
Conversation | The Conversation object that belongs to this nxmCall. |
|||||||||||||||||||||||||
from |
Member | The caller. The member object of the caller (not a reference to the one in conversation.members) |
|||||||||||||||||||||||||
to |
Map.<string, Member> | The callees keyed by a member's id. The members that receive the nxmCall (not a reference to conversation.members) |
|||||||||||||||||||||||||
id |
String | The nxmCall id (our member's leg_id, comes from rtc:answer event, or member:media) |
|||||||||||||||||||||||||
CALL_STATUS |
NXMCall.CALL_STATUS | "started" | the available nxmCall statuses |
||||||||||||||||||||||||
direction |
NXMCall.CALL_DIRECTION | the Direction of the nxmCall, Outbound, Inbound |
|||||||||||||||||||||||||
STATUS_PERMITTED_FLOW |
NXMCall.STATUS_PERMITTED_FLOW | the permitted nxmCall status transition map, describes the "from" and allowed "to" transitions |
|||||||||||||||||||||||||
rtcObjects |
Array.<object> | data related to the rtc connection Properties
|
|||||||||||||||||||||||||
stream |
Stream | the remote stream |
Fires:
Members
-
<static, readonly> CALL_DIRECTION :string
-
Enum for NXMCall direction.
Type:
- string
- Source:
Properties:
Name Type Default Description INBOUNDstring inbound The NXMCall started from another end
OUTBOUNDstring outbound The NXMCall started from this client
-
<static, readonly> CALL_STATUS :string
-
Enum for NXMCall status.
Type:
- string
- Source:
Properties:
Name Type Default Description STARTEDstring started The NXMCall is in started status
RINGINGstring ringing The NXMCall is in ringing status
ANSWEREDstring answered The NXMCall is in answered status
COMPLETEDstring completed The NXMCall is in completed status
BUSYstring busy The NXMCall is in busy status
TIMEOUTstring timeout The NXMCall is in timeout status
UNANSWEREDstring unanswered The NXMCall is in unanswered status
REJECTEDstring rejected The NXMCall is in rejected status
FAILEDstring failed The NXMCall is in failed status
-
<static, readonly> STATUS_PERMITTED_FLOW :Map.<string, Set.<NXMCall.CALL_STATUS>>
-
Enum for the permitted call status transition.
Type:
- Map.<string, Set.<NXMCall.CALL_STATUS>>
- Source:
Methods
-
<async> answer(autoPlayAudio)
-
Answers an incoming nxmCall
Join the conversation that you are invited
Create autoplay Audio objectParameters:
Name Type Argument Default Description autoPlayAudioboolean <optional>
true attach the audio stream automatically to start playing (default true)
- Source:
Returns:
- Type
- Promise.<Audio>
-
<async> hangUp(reason)
-
Hangs up the nxmCall
If there is a knocking active, do a knocking:delete
otherwise
Leave from the conversation
Disable the audioParameters:
Name Type Argument Description reasonobject <optional>
the reason for hanging up the nxmCall
Properties
Name Type Argument Description reason_codestring <optional>
the code of the reason
reason_textstring <optional>
the description of the reason
- Source:
Returns:
- Type
- Promise
-
hangUpIfAllLeft()
-
Go through the members of the conversation and if .me is the only one (JOINED or INVITED)
nxmCall nxmCall.hangUp().- Source:
Returns:
- empty promise or the nxmCall.hangUp promise chain
- Type
- Promise
-
reject(reason)
-
Rejects an incoming nxmCall
Leave from the conversation that you are invitedParameters:
Name Type Argument Description reasonobject <optional>
the reason for rejecting the nxmCall
Properties
Name Type Argument Description reason_codestring <optional>
the code of the reason
reason_textstring <optional>
the description of the reason
- Source:
Returns:
- Type
- Promise