![]() |
Intel® Collaboration Suite for WebRTC
version 4.3
Open WebRTC Toolkit (OWT) Client SDK for Android*
|
P2PClient handles PeerConnection interactions between clients. More...
Classes | |
interface | P2PClientObserver |
Interface for observing client events. More... | |
Public Member Functions | |
P2PClient (P2PClientConfiguration configuration, SignalingChannelInterface signalingChannel) | |
Constructor for P2PClient. More... | |
void | addObserver (P2PClientObserver observer) |
Add a P2PClientObserver. More... | |
void | removeObserver (P2PClientObserver observer) |
Remove a P2PClientObserver. More... | |
String | id () |
Get the id of the P2PClient. More... | |
void | addAllowedRemotePeer (String peerId) |
Add an id of remote P2PClient that allowed to interact with. More... | |
void | removeAllowedRemotePeer (String peerId) |
Remove an id of remote P2PClient from allowing to interact with. More... | |
synchronized void | connect (final String token, final ActionCallback< String > callback) |
Connect to signaling server. More... | |
void | disconnect () |
Disconnect from the signaling server. More... | |
synchronized void | publish (final String peerId, final LocalStream localStream, final ActionCallback< Publication > callback) |
Publish a LocalStream to remote P2PClient. More... | |
synchronized void | stop (String peerId) |
Clean all resources associated with given remote endpoint. More... | |
synchronized void | getStats (String peerId, final ActionCallback< RTCStatsReport > callback) |
Get the PeerConnection stats. More... | |
synchronized void | send (String peerId, String message, ActionCallback< Void > callback) |
Send a text message to a remote P2PClient. More... | |
![]() | |
void | onMessage (String peerId, String message) |
Called upon receiving a message. More... | |
void | onServerDisconnected () |
Called upon server disconnected. | |
P2PClient handles PeerConnection interactions between clients.
|
inline |
Constructor for P2PClient.
configuration | P2PClientConfiguration for P2PClient. |
signalingChannel | SignalingChannelInterface that P2PClient replied on for sending and receiving data. |
|
inline |
|
inline |
Add a P2PClientObserver.
observer | P2PClientObserver to be added. |
|
inline |
Connect to signaling server.
Since signaling channel can be customized, this method does not define how a token should look like. Token will be passed into SignalingChannelInterface implemented by the app without any changes.
token | token information for connecting to the signaling server. |
callback | ActionCallback.onSuccess will be invoked with the id when succeeds to connect the signaling server. Otherwise when fails to do so, ActionCallback.onFailure will be invoked with the corresponding OwtError. |
|
inline |
Disconnect from the signaling server.
This will stop all current active sessions with other P2PClients.
|
inline |
Get the PeerConnection stats.
peerId | id of remote P2PClient. |
callback | ActionCallback.onSuccess will be invoked with RTCStatsReport when succeeds to get the stats. Otherwise when fails to do so, ActionCallback.onFailure will be invoked with the corresponding OwtError. |
|
inline |
Publish a LocalStream to remote P2PClient.
peerId | id of remote P2PClient. |
localStream | LocalStream to be published. |
callback | ActionCallback.onSuccess will be invoked with the Publication when succeeds to publish the LocalStream. Otherwise when fails to do so, ActionCallback .onFailure will be invoked with the corresponding OwtError. |
|
inline |
|
inline |
Remove a P2PClientObserver.
observer | P2PClientObserver to be removed. |
|
inline |
Send a text message to a remote P2PClient.
peerId | id of remote P2PClient. |
message | message to be sent. |
callback | ActionCallback.onSuccess will be invoked succeeds to send the message. Otherwise when fails to do so, ActionCallback.onFailure will be invoked with the corresponding OwtError. |
|
inline |