Re: [mediacapture-image] Use constrainable pattern for ImageCapture (#124)

Let's bring the list here for conveniency (apologies, `iso` can be 
seen immediately in the video feed).

| Setting | |
|---|---|
| whiteBalanceMode | immediate |    
| colorTemperature | immediate |
| exposureMode | delayed |
| exposureCompensation |  immediate |
| iso | **immediate** | 
| redEyeReduction | delayed |
| focusMode | delayed |
| pointsOfInterest | probably immediate |
| brightness | immediate |
| contrast | immediate |
| saturation | immediate |
| sharpness |  immediate |
| imageHeight | delayed |
| imageWidth | delayed
| zoom | immediate |
| fillLightMode | both |        

Code wise we could 
1. keep the current `Promise<PhotoCapabilities> 
getPhotoCapabilities();`   returning the "delayed" capabilities (might
 need some tweaking), i.e. 
```
interface PhotoCapabilities {
  readonly attribute MeteringMode       exposureMode;
  readonly attribute boolean            redEyeReduction;
  readonly attribute MeteringMode       focusMode;
  readonly attribute MediaSettingsRange imageHeight;
  readonly attribute MediaSettingsRange imageWidth;
  readonly attribute FillLightMode      fillLightMode;
};
```
2. nuke the current `setOptions()` and instead pass the mentioned 
Capabilities directly into `takePhoto()`, i.e. 
`takePhoto({redEyeReduction : yes, fillLightMode : "auto"});`

3. All the other settings/capabilities would be inspected and/or set 
via the MediaStreamTrack, e.g. ( `iso` only for clarity):
`track.getCapabilities()` ==> `{ iso : { min:1000, max : 8000, step : 
100, default : 3000}}` 
then
`track.applyConstraints({ iso : { ideal:1234}});` ==> works or not
`track.getSettings()` ==> `{iso : 1234}`
 

So essentially this is the `Separate video and photo settings is more 
logical, less convenient.` case of yours.  If you agree, I will make a
 separate PR with this approach extended so we can decide on 
actualities, wdyt?

-- 
GitHub Notification of comment by miguelao
Please view or discuss this issue at 
https://github.com/w3c/mediacapture-image/pull/146#issuecomment-283861376
 using your GitHub account

Received on Friday, 3 March 2017 04:18:14 UTC