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

Re: [webrtc-pc] {iceRestart: true} works poorly with negotiationneeded (#2167)

From: Bernard Aboba via GitHub <sysbot+gh@w3.org>
Date: Thu, 11 Apr 2019 12:14:08 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-482089479-1554984847-sysbot+gh@w3.org>
@alvestrand Not clear to me that a `restart` method can't be emulated:

. . .
var options = {iceRestart: false} ;

async function negotiate() {
  await pc.setLocalDescription(await pc.createOffer(options));
  io.send({desc: pc.localDescription});
}
pc.onnegotiationneeded = () => negotiate();
pc.oniceconnectionstatechange = (e) => {
  if (pc.iceConnectonState == 'failed') {
    options.iceRestart = true);
  }
};
. . .

-- 
GitHub Notification of comment by aboba
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/2167#issuecomment-482089479 using your GitHub account
Received on Thursday, 11 April 2019 12:14:10 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 6 May 2023 21:19:47 UTC