New issue
Advanced search Search tips

Issue 909684 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug


Participants' hotlists:
WebRTC-Unified-Plan

Show other hotlists

Other hotlists containing this issue:
WebRTC-1.0-Spec-Compliance


Sign in to add a comment

unified plan: ice connection state goes to disconnected when adding a new m-line

Project Member Reported by philipp....@googlemail.com, Nov 28

Issue description

Chrome 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 :-)
 
Components: Blink>WebRTC>PeerConnection
Cc: -jonasolsson@chromium.org hbos@chromium.org
Labels: -Pri-3 M-72 Pri-2
Owner: jonasolsson@chromium.org
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?
Cc: shampson@chromium.org steveanton@chromium.org
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.
I might mix up the different connection state types :)
Status: Assigned (was: Untriaged)
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.
the new transport should be in 'new' state, no? What does that mean for the connectionState even?
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.
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?)

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".

Status: Started (was: Assigned)
Jonas, now that the PR (https://github.com/w3c/webrtc-pc/pull/2036) has landed, what is the status of implementation and target milestone?
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