OpenTera WebRTC API (JavaScript) 1.2.6
|
Represents the base class of DataChannelClient, StreamClient and StreamDataChannelClient. More...
Public Member Functions | |
constructor (signalingServerConfiguration, logger) | |
Creates a signaling client with the specified configurations. More... | |
_connectSignalingClientCallbacks () | |
async | connect () |
Connects the client the signaling server. More... | |
_disconnect () | |
async | _peerCallReceived (data) |
async | _peerCallAnswerReceived (data) |
async | _addIceCandidate (data) |
async | _makePeerCall (ids) |
async | _getCallAcceptance (id) |
_connectRtcPeerConnectionEvents (id, rtcPeerConnection) | |
_disconnectRtcPeerConnectionEvents (rtcPeerConnection) | |
_removeConnection (id, callOnClientDisconnect) | |
_addConnectionStateToClients (clients) | |
_updateClientNamesById (clients) | |
_updateClientDatumById (clients) | |
_hasRtcPeerConnection (id) | |
_getAllRtcPeerConnection () | |
_closeAllRtcPeerConnections () | |
updateRoomClients () | |
close () | |
Closes all client connections. | |
callAll () | |
Calls all room clients. | |
callIds (ids) | |
Calls the specified clients. More... | |
hangUpAll () | |
Hangs up all clients. | |
closeAllRoomPeerConnections () | |
Closes all room peer connections. | |
getClientName (id) | |
Gets the client name from the client id. More... | |
getClientData (id) | |
Gets the client data from the client id. More... | |
get | isConnected () |
Indicates if the client is connected to the signaling server. More... | |
get | isRtcConnected () |
Indicates if the client is connected to at least one client (RTCPeerConnection). More... | |
get | id () |
Returns the client id. More... | |
get | connectedRoomClientIds () |
Returns the connected room client ids. More... | |
get | roomClients () |
Returns the room clients. More... | |
set | onSignalingConnectionOpen (onSignalingConnectionOpen) |
Sets the callback that is called when the signaling connection opens. More... | |
set | onSignalingConnectionClose (onSignalingConnectionClose) |
Sets the callback that is called when the signaling connection closes. More... | |
set | onSignalingConnectionError (onSignalingConnectionError) |
Sets the callback that is called when a signaling connection error occurs. More... | |
set | onRoomClientsChange (onRoomClientsChange) |
Sets the callback that is called when the room client changes. More... | |
set | callAcceptor (callAcceptor) |
Sets the callback that is used to accept or reject a call. More... | |
set | onCallReject (onCallReject) |
Sets the callback that is called when a call is rejected. More... | |
set | onClientConnect (onClientConnect) |
Sets the callback that is called when a client peer connection opens. More... | |
set | onClientDisconnect (onClientDisconnect) |
Sets the callback that is called when a client peer connection closes. More... | |
set | onClientConnectionFail (onClientConnectionFail) |
Sets the callback that is called when a client peer connection fails. More... | |
Represents the base class of DataChannelClient, StreamClient and StreamDataChannelClient.
|
inline |
Sets the callback that is used to accept or reject a call.
Callback parameters:
Callback return value:
{CallableFunction} | callAcceptor The callback |
|
inline |
Calls the specified clients.
{Array<String>} | ids The client ids to call |
|
inline |
Connects the client the signaling server.
|
inline |
Returns the connected room client ids.
|
inline |
Creates a signaling client with the specified configurations.
{Object} | signalingServerConfiguration The signaling server configuration {
url: 'signaling server URL',
name: 'client name',
data: {}, // Client custom data
room: 'room name',
password: 'password'
}
|
{CallableFunction} | logger An optional logger callback |
|
inline |
Gets the client data from the client id.
{String} | id The client id |
|
inline |
Gets the client name from the client id.
{String} | id The client id |
|
inline |
Returns the client id.
|
inline |
Indicates if the client is connected to the signaling server.
|
inline |
Indicates if the client is connected to at least one client (RTCPeerConnection).
|
inline |
Sets the callback that is called when a call is rejected.
Callback parameters:{CallableFunction} | onCallReject The callback |
|
inline |
Sets the callback that is called when a client peer connection opens.
Callback parameters:{CallableFunction} | onClientConnect The callback |
|
inline |
Sets the callback that is called when a client peer connection fails.
Callback parameters:{CallableFunction} | onClientConnectionFail The callback |
|
inline |
Sets the callback that is called when a client peer connection closes.
Callback parameters:{CallableFunction} | onClientDisconnect The callback |
|
inline |
Sets the callback that is called when the room client changes.
Callback parameter:{CallableFunction} | onRoomClientsChange The callback |
|
inline |
Sets the callback that is called when the signaling connection closes.
Callback parameter: None{CallableFunction} | onSignalingConnectionClose The callback |
|
inline |
Sets the callback that is called when a signaling connection error occurs.
Callback parameter:{CallableFunction} | onSignalingConnectionError The callback |
|
inline |
Sets the callback that is called when the signaling connection opens.
Callback parameter: None{CallableFunction} | onSignalingConnectionOpen The callback |
|
inline |
Returns the room clients.