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

Re: [mediacapture-main] what is the default channelCount (#775)

From: henbos via GitHub <sysbot+gh@w3.org>
Date: Mon, 01 Mar 2021 19:01:39 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-788191385-1614625298-sysbot+gh@w3.org>
> What's the point of constraints if the defaults are known?

The point of constraints is to 1) not have to expose every possible device configuration, and 2) not have to write your own algorithm similar to constraints processing. It is perfectly reasonable to question these decisions, but that is a separate discussion to whether or not it would be useful for constraints to be more predictable and testable.

> There's another contradiction: defaults may be device dependent, like channelCount in Firefox.

Not a contradiction. You can always downsample to 1 or have a default that is device-dependent like defaulting to the maximum of the device's capability. The default does not have to be "exact" either, it could be "give me what is closest to the default when not specified". For example if you have a 360p camera the "default" could still be 480p and you could open in what is closes to 480p, which would be 360p. I assume the browsers don't crash if such a camera exists? Similarly if we think stereo is the future, we could have the "default" be 2 channels but have mono devices open with 1 channel because 1 is the closest value to 2 that is possible with that device.

> Not to pile on the contradictions, but: applications should know better than the user, yet somehow don't know to constrain the settings they rely on to not break miserably?

Not a contradiction. This has more to do with testability. If an app developer writes code and tries it out with a couple of devices on a couple of browsers and consistently get the same result they might think that the behavior is well-defined and have no idea that some user in the wild is able to change this in OS settings. They might not go through the spec and specify defaults for every possible constraint available, like channel count, they'll probably fix it on a case-by-case basis if problems crop up.

Embarassingly enough, Chrome shipped its stereo=1 hack and so by the sound of it has probably been upsampling to stereo when talking to Firefox. Not what was wanted, but slipped through the cracks. This illustrates that everything is not sufficiently tested.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 1 March 2021 19:01:41 UTC

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