public class PeerConnectionManager extends java.lang.Object implements PeerConnectionClient.PeerConnectionEvents
| Constructor and Description |
|---|
PeerConnectionManager(RemonContext recon,
PeerConnectionClient c) |
| Modifier and Type | Method and Description |
|---|---|
void |
addIceCandidate(java.lang.String candidate) |
void |
close() |
void |
createBroadcastOffer() |
MediaStream |
createMediaStream() |
void |
createOffer() |
void |
createPeerConnection(java.util.List<IceServer> iceServers,
VideoCapturer capturer) |
void |
createPeerConnection2(java.util.List<org.webrtc.PeerConnection.IceServer> iceServers,
VideoCapturer capturer) |
void |
createPeerConnectionFactory() |
PeerConnectionClient |
getPcClient() |
RemonContext |
getRecon() |
boolean |
getStats(StatsObserver observer) |
java.lang.String |
getTAG() |
void |
onIceCandidate(IceCandidate candidate)
Callback fired once local Ice candidate is generated.
|
void |
onIceCandidatesRemoved(IceCandidate[] candidates)
Callback fired once local ICE candidates are removed.
|
void |
onIceConnected()
Callback fired once connection is established (IceConnectionState is
CONNECTED).
|
void |
onIceDisconnected()
Callback fired once connection is closed (IceConnectionState is
DISCONNECTED).
|
void |
onLocalDescription(SessionDescription sdp)
Callback fired once local SDP is created and set.
|
void |
onPeerConnectionClosed()
Callback fired once peer connection is closed.
|
void |
onPeerConnectionError(java.lang.String description)
Callback fired once peer connection error happened.
|
void |
onPeerConnectionStatsReady(StatsReport[] reports)
Callback fired once peer connection statistics is ready.
|
void |
pauseLocalVideo() |
void |
setAudioEnabled(boolean audioEnabled) |
void |
setAudioVolume(int volume) |
void |
setLocalVideoEnabled(boolean videoEnabled) |
void |
setPcClient(PeerConnectionClient pcClient) |
void |
setRecon(RemonContext recon) |
void |
setRemoteDescription(java.lang.String sdp) |
void |
setRemoteVideoEnabled(boolean videoEnabled) |
void |
setVideoEnabled(boolean videoEnabled) |
void |
softClose() |
void |
startLocalVideo() |
void |
switchCamera() |
public PeerConnectionManager(RemonContext recon, PeerConnectionClient c)
public void switchCamera()
public void pauseLocalVideo()
public void startLocalVideo()
public void createPeerConnection2(java.util.List<org.webrtc.PeerConnection.IceServer> iceServers,
VideoCapturer capturer)
public void createPeerConnection(java.util.List<IceServer> iceServers, VideoCapturer capturer)
public MediaStream createMediaStream()
throws RemonException
RemonExceptionpublic void createPeerConnectionFactory()
public void createOffer()
public void createBroadcastOffer()
public void setRemoteDescription(java.lang.String sdp)
public void addIceCandidate(java.lang.String candidate)
public void onLocalDescription(SessionDescription sdp)
PeerConnectionClient.PeerConnectionEventsonLocalDescription in interface PeerConnectionClient.PeerConnectionEventspublic void onIceCandidate(IceCandidate candidate)
PeerConnectionClient.PeerConnectionEventsonIceCandidate in interface PeerConnectionClient.PeerConnectionEventspublic void onIceCandidatesRemoved(IceCandidate[] candidates)
PeerConnectionClient.PeerConnectionEventsonIceCandidatesRemoved in interface PeerConnectionClient.PeerConnectionEventspublic void onIceConnected()
PeerConnectionClient.PeerConnectionEventsonIceConnected in interface PeerConnectionClient.PeerConnectionEventspublic void onIceDisconnected()
PeerConnectionClient.PeerConnectionEventsonIceDisconnected in interface PeerConnectionClient.PeerConnectionEventspublic void onPeerConnectionClosed()
PeerConnectionClient.PeerConnectionEventsonPeerConnectionClosed in interface PeerConnectionClient.PeerConnectionEventspublic void onPeerConnectionStatsReady(StatsReport[] reports)
PeerConnectionClient.PeerConnectionEventsonPeerConnectionStatsReady in interface PeerConnectionClient.PeerConnectionEventspublic void onPeerConnectionError(java.lang.String description)
PeerConnectionClient.PeerConnectionEventsonPeerConnectionError in interface PeerConnectionClient.PeerConnectionEventspublic boolean getStats(StatsObserver observer)
public void softClose()
public void close()
public void setAudioEnabled(boolean audioEnabled)
public void setAudioVolume(int volume)
public void setVideoEnabled(boolean videoEnabled)
public void setLocalVideoEnabled(boolean videoEnabled)
public void setRemoteVideoEnabled(boolean videoEnabled)
public java.lang.String getTAG()
public PeerConnectionClient getPcClient()
public void setPcClient(PeerConnectionClient pcClient)
public RemonContext getRecon()
public void setRecon(RemonContext recon)