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

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