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
RemonException
public 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.PeerConnectionEvents
onLocalDescription
in interface PeerConnectionClient.PeerConnectionEvents
public void onIceCandidate(IceCandidate candidate)
PeerConnectionClient.PeerConnectionEvents
onIceCandidate
in interface PeerConnectionClient.PeerConnectionEvents
public void onIceCandidatesRemoved(IceCandidate[] candidates)
PeerConnectionClient.PeerConnectionEvents
onIceCandidatesRemoved
in interface PeerConnectionClient.PeerConnectionEvents
public void onIceConnected()
PeerConnectionClient.PeerConnectionEvents
onIceConnected
in interface PeerConnectionClient.PeerConnectionEvents
public void onIceDisconnected()
PeerConnectionClient.PeerConnectionEvents
onIceDisconnected
in interface PeerConnectionClient.PeerConnectionEvents
public void onPeerConnectionClosed()
PeerConnectionClient.PeerConnectionEvents
onPeerConnectionClosed
in interface PeerConnectionClient.PeerConnectionEvents
public void onPeerConnectionStatsReady(StatsReport[] reports)
PeerConnectionClient.PeerConnectionEvents
onPeerConnectionStatsReady
in interface PeerConnectionClient.PeerConnectionEvents
public void onPeerConnectionError(java.lang.String description)
PeerConnectionClient.PeerConnectionEvents
onPeerConnectionError
in interface PeerConnectionClient.PeerConnectionEvents
public 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)