Class Index | File Index

Classes


Class Conversation


Defined in: Conversation.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Conversation(participants, id, owner, hosting, rtcEvtHandler, msgHandler)
Conversation class
Field Summary
Field Attributes Field Name and Description
<private>  
The list of Participant in the Conversation.
Method Summary
Method Attributes Method Name and Description
 
acceptInvitation(invitation, answer, constraints, pcConfig, pcConstraints, sdpConstraints, callback)
Opens a conversation by accepting an incoming invitation.
 
addParticipant(participant, invitation, sdpConstraints, callback)
Adds a participant to the conversation.
 
close(message)
Close the conversation with the given message.
 
Returns the participants of the conversation as an Array.
 
Returns the status of this conversation
 
open(rtcIdentity, invitation, constraints, stream, pcConfig, pcConstraints, callback)
A Conversation is open for invited participants.
 
sendMessage(message)
If to-field of the message is empty, then send message to all participants, send only to specified participants if to-field is filled.
 
setStatus(status)
Set the status of this conversation.
Class Detail
Conversation(participants, id, owner, hosting, rtcEvtHandler, msgHandler)
Conversation class
Parameters:
participants
list of Participant involved in the conversation
id
Unique Conversation identification
owner
the Participant organizing the conversation
hosting
the Identity that is providing the signalling message server
rtcEvtHandler
Event handler implemented by the Application to receive and process RTC events triggered by WebRTC Media Engine
msgHandler
Message handler implemented by the Application to receive and process Messages from the MessagingStub
Field Detail
<private> {Participant[]} participants
The list of Participant in the Conversation.
Method Detail
acceptInvitation(invitation, answer, constraints, pcConfig, pcConstraints, sdpConstraints, callback)
Opens a conversation by accepting an incoming invitation. Sends the message to the addressed participant (the one who sent the invitation) Sets the Conversation status to OPENED.
Parameters:
{Message} invitation
: the invitation message received for the accepted conversation
{string} answer
: the answer to be sent with the accepted message
{string} constraints Optional
: any constraint on how the invitation was accepted e.g. only audio but not video
pcConfig
pcConstraints
sdpConstraints
callback

addParticipant(participant, invitation, sdpConstraints, callback)
Adds a participant to the conversation.
Parameters:
{Participant} participant
: the Participant to add to the conversation
{String} invitation Optional
: the invitation to be attached to the Message body
sdpConstraints
callback

close(message)
Close the conversation with the given message. Sends this message to ALL participants and sets the conversation status to CLOSED
Parameters:
{Message} message
: the final message to be sent to ALL participants of this conversation

{Participants[]} getParticipants()
Returns the participants of the conversation as an Array.
Returns:
{Participants[]}

getStatus()
Returns the status of this conversation

open(rtcIdentity, invitation, constraints, stream, pcConfig, pcConstraints, callback)
A Conversation is open for invited participants. Creates the remote participant, resolves and gets the stub, creates the peer connection, connects to the stub and sends invitation
Parameters:
{string[]} rtcIdentity
: list of users to be invited
{string} invitation Optional
: body to be attached to INVITATION MESSAGE
{string} constraints Optional
: any constraints about the Resources to be used eg only audio and video
{type} stream
pcConfig
pcConstraints
callback

sendMessage(message)
If to-field of the message is empty, then send message to all participants, send only to specified participants if to-field is filled. (Message.to-field is a list of identities.)
Parameters:
{MESSAGE} message
: the Message to be sent to the specified Identities or or ALL participants

setStatus(status)
Set the status of this conversation. TODO: This method should be private and only be changed by internal state-changes
Parameters:
status
: ConversationStatus ... the new status of the conversation

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Dec 10 2013 17:00:57 GMT-0000 (GMT)