W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > March 2020

Re: [webrtc-pc] When is negotiation complete? (#2495)

From: Jan-Ivar Bruaroey via GitHub <sysbot+gh@w3.org>
Date: Mon, 30 Mar 2020 18:10:21 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-606156550-1585591820-sysbot+gh@w3.org>
> Why would the app need to know that negotiation is complete?
> ... Needs to know when it can be certain the track is signalled to the other side

That's specific to *addTransceiver* and *addTrack*.  [Here](https://docs.google.com/presentation/d/1UrXARLbAfwmfK686rX_9W_-FGIc62ZDwVd079wIoX7I/edit?ts=5cdd966f#slide=id.g5b048ace1b_24_128) are all our modification methods:

1. pc.addTransceiver(kind) - _When does other side have transceiver mid/track & can send/recv?_
2. pc.addTrack(track, stream) - _same as above_
3. pc.createDataChannel(name) - _dc.onopen_
4. pc.restartIce() - _Was ICE restart successful?_
5. pc.removeTrack(sender) - _When has track been removed remotely?_
6. transceiver.direction = newDirection - _When has track been added/removed remotely?_
7. transceiver.sender.setStreams(streams) - _When have streams appeared remotely?_
8. transceiver.stop() - pc.onsigalingstate in "stable" && _transceiver.currentDirection == "stopped"_

There are still 4 question marks in that list. Solving them all with one solution seems desirable.

Moreover, I wouldn't dismiss the value of this information to an application. E.g.
async function addParticipant(someArgs) {
  return pc.negotiationcomplete;

button.onclick = async () => {
  await addParticipant(someArgs);
  writeOnScreen(`User ${name} has joined. Say hello!`);
Being able to authoritatively make statements about a connection seems desirable over, e.g. 
writeOnScreen(`User ${name} should have joined. Try saying hello!`);

GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/2495#issuecomment-606156550 using your GitHub account
Received on Monday, 30 March 2020 18:10:24 UTC

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