unified plan: ice connection state goes to disconnected when adding a new m-line |
|||||
Issue descriptionChrome Version: 70.0.3538.110, also 72.0.3610.2 OS: Linux What steps will reproduce the problem? (1) go to https://webrtc.github.io/samples/src/content/peerconnection/pc1/ (2) make a call using unified plan sdp semantics (3) paste this into the console: const stream = await navigator.mediaDevices.getDisplayMedia({video: true}); pc1.addTrack(stream.getTracks()[0], stream); pc1.createOffer().then(offer => pc1.setLocalDescription(offer)); What is the expected result? this doesn't reset the ice connection state. At least it does not in plan-b. What happens instead? iceconnection state goes to disconnected. Which might (if applications do not follow the spec note about when to do ice restarts) trigger an ice restart. jonasolsson: you are probably an expert now on whether that should happen per spec. Doesn't seem to be related to your recent changes (and I am not sure if the linux dev channel contains them yet) hta: you can rewrite the spec if necessary :-)
,
Nov 28
My iceConnectionState changes have been reverted, so they're probably not to blame. On the other hand I intended to port the current disconnect semantics, so they won't fix this either. :) 'disconnected' is the vaguest state in the standard. We are supposed to be in it if we're not in 'closed'/'failed' and at least one ICE transport is disconnected. The 'disconnected' transport state is implementation-defined, so effectively the entire 'disconnected' state is implementation-defined. The standard doesn't really matter here though, because we do something entirely different in webrtc. The current implementation is the hack: "If we used to be 'connected' or 'completed' but are about to become 'connecting' again, instead report 'disconnected'". I could imagine us needlessly signalling disconnected if for some reason add new ice transports to a peerconnection whose current ice transports are already up and running. Maybe something like that is happening here?
,
Nov 28
Whether bundling is or is not used, why would any transport end up in 'disconnected' when an m= section is added? I would think that either the existing already-connected transport is used again (bundling?) or a new transport is added that is attempting to connect (non-bundling?), but in either case no transport would in any sense stop being connected.
,
Nov 28
I might mix up the different connection state types :)
,
Nov 28
,
Nov 28
My guess was that we'd end up with an old 'connected' transport and a new 'connecting' one. With a mixture of these we're supposed to be 'connecting', and the hack would replace that with 'disconnected'. No individual transport is disconnected, but we still report that as the aggregate state. Actually, I went and double-checked. The hack is the only current implementation of 'disconnected' in webrtc, we don't base anything on information from the transports.
,
Nov 28
the new transport should be in 'new' state, no? What does that mean for the connectionState even?
,
Nov 28
new + connected/completed => new, which I disagree with. See https://github.com/w3c/webrtc-pc/issues/2031 for some talk about the PeerConnectionState, which has a similar issue.
,
Nov 29
is this for bundle-less? with bundle, nothing should happen with transports. with bundle-less, we're adding another transport, so we could argue for "new" state when created, and "connecting" state until it connects. what naive users will expect is that the new transport doesn't affect the overall state until it's operational, but it seems very puzzling to specify that in a sane manner (what if it never becomes operational?)
,
Nov 30
thinking: the overall state should be "new" only when all transports are "new". If some of them have progressed further, the overall state should be "connecting".
,
Dec 7
Jonas, now that the PR (https://github.com/w3c/webrtc-pc/pull/2036) has landed, what is the status of implementation and target milestone?
,
Dec 7
Once https://webrtc-review.googlesource.com/c/src/+/111964 lands I'll make a 10-lie CL in chrome to switch the ice state, and that should be it. I expect the code to land next week, so M73 unless we want to back-merge things. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by philipp....@googlemail.com
, Nov 28