Re: [mediacapture-main] Should we revisit and document getUserMedia() track order? (#1028)

> It seems incumbent on those making unsubstantiated claims of "breakage" to provide evidence, and explain how breakage would manifest. 
> 

What's unsubstantiated is claiming that this change is risk-free.

> I've provided plenty of evidence of absence: years of different browser orders without bug reports.

That's only evidence that the status quo does not cause problems to anyone, which is strong evidence in favor of maintaining the status quo. It is not evidence of absence of harm after we deploy the change.

> > > Any site depending on a particular browser’s order is already non-interoperable, since the spec explicitly allows any order.
> > 
> > 
> > We don't want to break those sites either.
> 
> Which sites are those?
> 

I don't want to find out.

> > Let's unify then around Chrome's behavior.
> 
> Unifying on Chrome’s historic ordering seems arbitrary.

No more arbitrary than any other ordering.


>  If we truly suspect real-world reliance, a usage counter could confirm that. Otherwise, there is no evidence of harm in converging on a single, simpler order that aligns [track set](https://w3c.github.io/mediacapture-main/#dfn-track-set) with https://infra.spec.whatwg.org/#sets
> 

In the past, behavior changes to established APIs like this one have caused breakage for Chrome users.
The benefit of making this change (aligning the spec with a new infra guideline) does not outweigh this risk.
Given this, the only change I find acceptable is aligning the spec with Chrome's ordering. It has the following benefits:
* Aligns the spec with the infra guideline, which is the motivation for the proposal.
* Trivial to implement for any UA that implements getAudioTracks() and getVideoTracks() using addition order (for which we seem to have agreement). 
* Zero risk for users of Chromium-based browsers. Any other ordering fails to address this concern.
* Zero risk for Firefox users, as per Mozilla's analysis.

But we still need to wait for WebKit's assessment.

> > If we want to guarantee order for getTracks() we should also do it for getAudioTracks() and getVideoTracks().
> 
> Agreed. Those already appear expressed as the `track set` filtered on `kind`, so we'd just need to remove _"The conversion from the [track set](https://w3c.github.io/mediacapture-main/getusermedia.html#dfn-track-set) to the sequence is [User Agent](https://w3c.github.io/mediacapture-main/getusermedia.html#dfn-user-agent) defined and the order does not have to be stable between calls."_

I support proceeding with this one if no one objects.


-- 
GitHub Notification of comment by guidou
Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/1028#issuecomment-2669944226 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 19 February 2025 22:54:19 UTC