Re: [mediacapture-image] The (bool or ConstrainDouble) case for pan/tilt/zoom is unclear (#225)

> impossible for C++ to tell the difference between {foo: {}} and {} 

Mozilla's webidl compiler was updated to allow detecting absence of dictionary-typed dictionary members in [bug 1368949](https://bugzilla.mozilla.org/show_bug.cgi?id=1368949). I believe the relevant spec change was https://github.com/heycam/webidl/pull/750. So I don't see a WebIDL issue here.

Also, I don't see that we need to tell the difference: `pan: true` is semantic sugar for `pan: {}` with the same semantic meaning.

The purpose is to detect interest in pan/tilt/zoom from the presence of the same-named constraints, which works even without the boolean overloads. I think that's simple and great.

I have some nits around usage of `null` here in the prose which isn't 100% correct, and I think the prose should be explicit about it only applying to `getUserMedia` and not `applyConstraints` https://github.com/w3c/mediacapture-image/issues/223 but other than that I don't see a problem.

While I'm not a super-fan of the boolean overloads, but I don't see that they do any harm, and I agree they have a slight leg up on readability, so I think they work.

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/mediacapture-image/issues/225#issuecomment-624945928 using your GitHub account

Received on Wednesday, 6 May 2020 23:37:37 UTC