Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feat)ice restart #154

Closed
adwpc opened this issue Feb 10, 2021 · 0 comments · Fixed by #155
Closed

(feat)ice restart #154

adwpc opened this issue Feb 10, 2021 · 0 comments · Fixed by #155

Comments

@adwpc
Copy link
Contributor

adwpc commented Feb 10, 2021

https://developer.mozilla.org/en-US/docs/Web/API/RTCOfferOptions/iceRestart

pc.oniceconnectionstatechange = function(evt) {
  if (pc.iceConnectionState === "failed") {
    if (pc.restartIce) {
      pc.restartIce();
    } else {
      pc.createOffer({ iceRestart: true })
      .then(pc.setLocalDescription)
      .then(sendOfferToServer);
    }
  }
}

https://github.com/webrtc/samples/blob/4b198b679350f836809b40516c25d4b17eb22e9d/src/content/peerconnection/restart-ice/js/main.js#L89

This was referenced Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant