W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > April 2019

Re: [webrtc-pc] ICE restart deserves a first-class API. (#2167)

From: Philipp Hancke via GitHub <sysbot+gh@w3.org>
Date: Mon, 08 Apr 2019 06:35:50 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-480702388-1554705349-sysbot+gh@w3.org>
What keeps the app from doing this:
```
async function negotiate(offerOptions) {
  await pc.setLocalDescription(await pc.createOffer(offerOptions));
  io.send({desc: pc.localDescription});
}
pc.onnegotiationneeded = () => negotiate();
pc.oniceconnectionstatechange = (e) => {
  if (pc.icecConnectonState == 'failed') {
    negotiate({iceRestart: true});
  }
};
```
Adding a restartIce method leads down the slippery slope of triggering it based on peerconnection logic, not application logic.

-- 
GitHub Notification of comment by fippo
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/2167#issuecomment-480702388 using your GitHub account
Received on Monday, 8 April 2019 06:35:51 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 9 October 2019 15:15:03 UTC