Skip to content

Instantly share code, notes, and snippets.

@Abhi1code
Created April 11, 2020 09:36
Show Gist options
  • Save Abhi1code/3b297b0c48ecce9aa88ea4dc90c0eab1 to your computer and use it in GitHub Desktop.
Save Abhi1code/3b297b0c48ecce9aa88ea4dc90c0eab1 to your computer and use it in GitHub Desktop.
public void createAnswer(){
peerConnection.createAnswer(new CustomSdpObserver(){
@Override
public void onCreateSuccess(SessionDescription sessionDescription) {
super.onCreateSuccess(sessionDescription);
peerConnection.setLocalDescription(new CustomSdpObserver(), sessionDescription);
// sessionDescription.description is string which needs to the shared across network
}
@Override
public void onCreateFailure(String s) {
super.onCreateFailure(s);
// Answer creation failed
}
}, new MediaConstraints());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment