Skip to content

Instantly share code, notes, and snippets.

@Abhi1code
Created April 11, 2020 09:15
Show Gist options
  • Save Abhi1code/f6d51f0253cac8e6744e13c17c94af1c to your computer and use it in GitHub Desktop.
Save Abhi1code/f6d51f0253cac8e6744e13c17c94af1c to your computer and use it in GitHub Desktop.
public void createOffer(){
peerConnection.createOffer(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);
// Offer creation failed
}
}, new MediaConstraints());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment