Skip to content

Instantly share code, notes, and snippets.

@Abhi1code
Created April 10, 2020 20:24
Show Gist options
  • Save Abhi1code/1f4851fb640ec0f0252a91acd3a6240f to your computer and use it in GitHub Desktop.
Save Abhi1code/1f4851fb640ec0f0252a91acd3a6240f to your computer and use it in GitHub Desktop.
peerConnection = peerConnectionFactory.createPeerConnection(rtcConfig, new CustomPeerConnectionObserver() {
@Override
public void onIceCandidate(IceCandidate iceCandidate) {
super.onIceCandidate(iceCandidate);
//
}
@Override
public void onDataChannel(DataChannel dataChannel) {
super.onDataChannel(dataChannel);
}
@Override
public void onIceConnectionChange(PeerConnection.IceConnectionState iceConnectionState) {
super.onIceConnectionChange(iceConnectionState);
if(iceConnectionState != null){
if(iceConnectionState == PeerConnection.IceConnectionState.CONNECTED){
}
if(iceConnectionState == PeerConnection.IceConnectionState.CLOSED){
}
if(iceConnectionState == PeerConnection.IceConnectionState.FAILED){
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment