public class RespokeCall
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
RespokeCall.Listener
An interface to notify the receiver of events occurring with the call
|
Modifier and Type | Field and Description |
---|---|
boolean |
audioOnly |
RespokeEndpoint |
endpoint |
java.util.Date |
timestamp |
Constructor and Description |
---|
RespokeCall(RespokeSignalingChannel channel,
org.json.JSONObject sdp,
java.lang.String newSessionID,
java.lang.String newConnectionID,
java.lang.String endpointID,
java.lang.String fromType,
RespokeEndpoint newEndpoint,
boolean directConnectionOnly,
java.util.Date newTimestamp)
Constructor used for inbound calls
|
RespokeCall(RespokeSignalingChannel channel,
RespokeEndpoint newEndpoint,
boolean directConnectionOnly)
Constructor used for outbound calls
|
RespokeCall(RespokeSignalingChannel channel,
java.lang.String remoteEndpoint,
java.lang.String remoteType)
Constructor primarily used for starting conference calls
|
Modifier and Type | Method and Description |
---|---|
void |
answer(android.content.Context context,
RespokeCall.Listener newListener)
Answer the call and start the process of obtaining media.
|
void |
answerReceived(org.json.JSONObject remoteSDP,
java.lang.String remoteConnection)
Process an answer message received from the remote endpoint.
|
void |
attachVideoRenderer(android.opengl.GLSurfaceView glView)
Attach the call's video renderers to the specified GLSurfaceView
|
boolean |
audioIsMuted()
Indicates if the local audio stream is muted
|
void |
connectedReceived()
Process a connected messsage received from the remote endpoint.
|
void |
directConnectionDidAccept(android.content.Context context) |
void |
directConnectionDidClose(RespokeDirectConnection sender) |
void |
directConnectionDidOpen(RespokeDirectConnection sender) |
PeerConnection |
getPeerConnection()
Retrieve the WebRTC peer connection handling the call
|
java.lang.String |
getSessionID()
Get the session ID of this call
|
void |
hangup(boolean shouldSendHangupSignal)
Tear down the call and release resources
|
void |
hangupReceived()
Process a hangup message received from the remote endpoint.
|
void |
iceCandidatesReceived(org.json.JSONArray candidates)
Process ICE candidates suggested by the remote endpoint.
|
boolean |
isActive()
Indicate whether a call is being setup or is in progress.
|
boolean |
isCaller()
Indicates if the local client initiated the call
|
void |
muteAudio(boolean mute)
Mute or unmute the local audio
|
void |
muteVideo(boolean mute)
Mute or unmute the local video
|
void |
pause()
Notify the call that the UI controls associated with rendering video are no longer available, such as during activity lifecycle changes
|
void |
resume()
Notify the call that the UI controls associated with rendering video are available again
|
static boolean |
sdpHasVideo(org.json.JSONObject sdp)
Determines if the specified SDP data contains definitions for a video stream
|
void |
setListener(RespokeCall.Listener listener)
Set a receiver for the Listener interface
|
void |
startCall(android.content.Context context,
android.opengl.GLSurfaceView glView,
boolean isAudioOnly)
Start the outgoing call process.
|
boolean |
videoIsMuted()
Indicates if the local video stream is muted
|
public RespokeEndpoint endpoint
public boolean audioOnly
public java.util.Date timestamp
public RespokeCall(RespokeSignalingChannel channel, java.lang.String remoteEndpoint, java.lang.String remoteType)
channel
- The signaling channel to use for the callremoteEndpoint
- The remote recipient of the callremoteType
- The type of remote recipient (i.e. "conference", "web", etc)public RespokeCall(RespokeSignalingChannel channel, RespokeEndpoint newEndpoint, boolean directConnectionOnly)
channel
- The signaling channel to use for the callnewEndpoint
- The remote recipient of the calldirectConnectionOnly
- Specify true if this call is only for establishing a direct data connection (i.e. no audio/video)public RespokeCall(RespokeSignalingChannel channel, org.json.JSONObject sdp, java.lang.String newSessionID, java.lang.String newConnectionID, java.lang.String endpointID, java.lang.String fromType, RespokeEndpoint newEndpoint, boolean directConnectionOnly, java.util.Date newTimestamp)
channel
- The signaling channel to use for the callsdp
- The SDP data from the call offernewSessionID
- The session ID to use for the call signalingnewConnectionID
- The ID of the remote connection initiating the callendpointID
- The ID of the remote endpointfromType
- The type of remote recipient (i.e. "conference", "web", etc)newEndpoint
- The remote recipient of the calldirectConnectionOnly
- Specify true if this call is only for establishing a direct data connection (i.e. no audio/video)newTimestamp
- The timestamp when the call was initiated remotelypublic static boolean sdpHasVideo(org.json.JSONObject sdp)
sdp
- The SDP data to examinepublic void setListener(RespokeCall.Listener listener)
listener
- The new receiver for events from the Listener interface for this call instancepublic java.lang.String getSessionID()
public void startCall(android.content.Context context, android.opengl.GLSurfaceView glView, boolean isAudioOnly)
context
- An application context with which to access shared resourcesglView
- The GLSurfaceView on which to render video if applicableisAudioOnly
- Specify true if this call should be audio onlypublic void attachVideoRenderer(android.opengl.GLSurfaceView glView)
glView
- The GLSurfaceView on which to render videopublic void answer(android.content.Context context, RespokeCall.Listener newListener)
context
- An application context with which to access shared resourcesnewListener
- A listener to receive notifications of call-related eventspublic void hangup(boolean shouldSendHangupSignal)
shouldSendHangupSignal
- Send a hangup signal to the remote party if signal is not false and we have not received a hangup signal from the remote party.public void muteVideo(boolean mute)
mute
- If true, mute the video. If false, unmute the videopublic boolean videoIsMuted()
public void muteAudio(boolean mute)
mute
- If true, mute the audio. If false, unmute the audiopublic boolean audioIsMuted()
public void pause()
public void resume()
public void hangupReceived()
public void answerReceived(org.json.JSONObject remoteSDP, java.lang.String remoteConnection)
remoteSDP
- Remote SDP dataremoteConnection
- Remote connection that answered the callpublic void connectedReceived()
public void iceCandidatesReceived(org.json.JSONArray candidates)
candidates
- Array of candidates to evaluatepublic boolean isCaller()
public PeerConnection getPeerConnection()
public boolean isActive()
public void directConnectionDidAccept(android.content.Context context)
public void directConnectionDidOpen(RespokeDirectConnection sender)
public void directConnectionDidClose(RespokeDirectConnection sender)