Re: [mediacapture-image] [PTZ] Should `applyConstraints` request permission? (#223)

> @andypaicu You're right, sites may achieve the same effect by calling `getUserMedia` again. It shouldn't even require replacing the stream, since permission is per (top-level) document, not per stream. But doesn't that undermine the argument that the permission model remains simpler in any way by restricting it to `getUserMedia`? (since it allows permission to be requested mid-stream)

While I suppose it's possible for the `pan`/`tilt`/`zoom` constraints to become available for the previously existing `MediaStreamTrack` object, I was actually envisioning an implementation where only the newly-obtained `MediaStreamTrack` object would have access to them. That is the sense in which I mean it simplifies the implementation model, the MediaStreamTrack object's ability to access/use PTZ would never change, you would just need to get an entirely new one.

If the mid-stream use case seems like something that is worth supporting, then I'm fine with allowing `allowConstraints` to request the permission, with the caveat that the constraints won't actually be available to the developer before so they would have to use the `{pan: true, tilt: true, zoom: true}` syntax first (since they can't provide meaningful constraints in the first place).

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

Received on Tuesday, 19 May 2020 15:08:11 UTC