Re: [mediacapture-main] Add constraint to avoid inefficient (compressed) pixel formats (#739)

> The idea of device-generated presets - "this set of constraints will work well together" - is appealing, but of course it's a huge fingerprinting surface, which means that it can only be available after opening the device.

Agreed.

> WRT reopening: yes, drivers have to reopen for reconfiguration, and for some drivers/cameras, this is an expensive, slow and error-prone operation

getUserMedia is often implemented as follow:
1. Get camera permission
2. Start opening the camera
3. Resolve promise with a stream and execute the correspondingJS handler
4. Finish opening the camera (asynchronous task).

A User-Agent could decide to execute step 3 before step 2.
This would allow the web application to call applyConstraints before the camera is started so that a single camera configuration is done.

This would delay opening the camera a bit. I haven't measured by how much in Safari but this may be acceptable.
The nice thing about this flow is that this allows getUserMedia to concentrate solely on selection, with a hopefully very limited perf penalty.

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


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

Received on Monday, 26 October 2020 08:03:21 UTC