Intent to Prototype & Ship: Change MediaSettingsRange & PhotoCapabilities interfaces to dictionaries

103 views
Skip to first unread message

François Beaufort

unread,
Jul 28, 2020, 1:37:37 AM7/28/20
to blink-dev

Contact emails


fbea...@chromium.org, rei...@chromium.org


Spec


Specification: 

https://w3c.github.io/mediacapture-image/#mediasettingsrange-section

https://w3c.github.io/mediacapture-image/#photocapabilities-section

PR: https://github.com/w3c/mediacapture-image/pull/238

Summary


Allow web developers to aggregate and easily log media settings ranges and photo capabilities in JSON.


Motivation


Changing MediaSettingsRange and PhotoCapabilities interfaces to dictionaries will improve developer ergonomics by allowing web developers to easily log and aggregate exposureCompensation, exposureTime, colorTemperature, iso, brightness, contrast, saturation, sharpness, focusDistance, pan, tilt, zoom, and photo capabilities (redEyeReduction, imageHeight, imageWidth, fillLightMode).

This is possible because MediaSettingsRange and PhotoCapabilities are simple data holders, and not classes/interfaces with data and behavior and inheritance.

Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?


The feature will be supported on all platforms.


Interoperability: None
Gecko: Positive

Webkit: No Signal


Compatibility: None

Is this feature fully tested by web-platform-tests? Link to test suite results from wpt.fyi.

Web platform tests will be updated and available at https://wpt.fyi/results/mediacapture-image.


Feature dashboard

https://www.chromestatus.com/feature/5677894124699648

Mike West

unread,
Jul 30, 2020, 2:13:52 PM7/30/20
to blink-dev, Francois Beaufort
LGTM1. This is a minor change that would only affect sites which are testing for the existence of the interfaces on the global; no other code should be affected. I skimmed briefly through HTTP Archive, and didn't find any occurrence of `"MediaSettingsRange" in window` or `typeof MediaSettingsRange` in the most recent run.

I'd note, though, that the signals gathered from our friends on Gecko and WebKit ought to be solicited as described in https://docs.google.com/document/d/1xkHRXnFS8GDqZi7E0SSbR3a7CZsGScdxPUWBsNgo-oo/edit#heading=h.tgzhprxcmw4u, or listed as "No signal" with an explanation that the feature is too small to go through that process.

Thanks!

-mike

Chris Harrelson

unread,
Jul 30, 2020, 2:58:00 PM7/30/20
to Mike West, blink-dev, Francois Beaufort

See comment below.

On Thu, Jul 30, 2020 at 11:13 AM Mike West <mk...@chromium.org> wrote:
LGTM1. This is a minor change that would only affect sites which are testing for the existence of the interfaces on the global; no other code should be affected. I skimmed briefly through HTTP Archive, and didn't find any occurrence of `"MediaSettingsRange" in window` or `typeof MediaSettingsRange` in the most recent run.

I'd note, though, that the signals gathered from our friends on Gecko and WebKit ought to be solicited as described in https://docs.google.com/document/d/1xkHRXnFS8GDqZi7E0SSbR3a7CZsGScdxPUWBsNgo-oo/edit#heading=h.tgzhprxcmw4u, or listed as "No signal" with an explanation that the feature is too small to go through that process.

Thanks!

-mike

On Tuesday, July 28, 2020 at 7:37:37 AM UTC+2 Francois Beaufort wrote:

Contact emails


fbea...@chromium.org, rei...@chromium.org


Spec


Specification: 

https://w3c.github.io/mediacapture-image/#mediasettingsrange-section

https://w3c.github.io/mediacapture-image/#photocapabilities-section

PR: https://github.com/w3c/mediacapture-image/pull/238

Summary


Allow web developers to aggregate and easily log media settings ranges and photo capabilities in JSON.


Motivation


Changing MediaSettingsRange and PhotoCapabilities interfaces to dictionaries will improve developer ergonomics by allowing web developers to easily log and aggregate exposureCompensation, exposureTime, colorTemperature, iso, brightness, contrast, saturation, sharpness, focusDistance, pan, tilt, zoom, and photo capabilities (redEyeReduction, imageHeight, imageWidth, fillLightMode).

This is possible because MediaSettingsRange and PhotoCapabilities are simple data holders, and not classes/interfaces with data and behavior and inheritance.

Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?


The feature will be supported on all platforms.


Interoperability: None
Gecko: Positive

Webkit: No Signal


Compatibility: None


Isn't there a compatibility risk of the change to a dictionary and removal of toJson?
 



Is this feature fully tested by web-platform-tests? Link to test suite results from wpt.fyi.

Web platform tests will be updated and available at https://wpt.fyi/results/mediacapture-image.


Feature dashboard

https://www.chromestatus.com/feature/5677894124699648

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/b97666a1-20c0-4b53-a725-08acc2130b60n%40chromium.org.

François Beaufort

unread,
Jul 30, 2020, 3:51:23 PM7/30/20
to Chris Harrelson, Mike West, blink-dev
toJSON is not removed as it was not implemented.
Only spec was updated until blink-dev folks suggested there was a better way to do this. See https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/AqKdWOB7O8c

François Beaufort

unread,
Aug 7, 2020, 1:24:27 AM8/7/20
to Chris Harrelson, Mike West, blink-dev
Kindly ping on other owners on this. Thanks!

Yoav Weiss

unread,
Aug 7, 2020, 4:10:20 AM8/7/20
to François Beaufort, Chris Harrelson, Mike West, blink-dev
Do I understand correctly that there's no risk of developers somehow relying on MediaSettingsRange and PhotoCapabilities currently being interfaces?

Yoav Weiss

unread,
Aug 7, 2020, 4:35:58 AM8/7/20
to François Beaufort, Chris Harrelson, Mike West, blink-dev
Apologies, I missed the comment from Mike about what the risk looks like and the fact that HA contained 0 occurrences.

LGTM2

Manuel Rego Casasnovas

unread,
Aug 7, 2020, 5:15:44 AM8/7/20
to Yoav Weiss, François Beaufort, Chris Harrelson, Mike West, blink-dev
LGTM3

On 07/08/2020 10:35, Yoav Weiss wrote:
> Apologies, I missed the comment from Mike about what the risk looks like
> and the fact that HA contained 0 occurrences.
>
> *LGTM2*
> exposureTime,colorTemperature, iso, brightness,
> contrast, saturation, sharpness, focusDistance,
> pan, tilt, zoom, and photo capabilities
> (redEyeReduction, imageHeight, imageWidth,
> fillLightMode).
>
> This is possible because MediaSettingsRange and
> PhotoCapabilities are simple data holders, and
> not classes/interfaces with data and behavior
> and inheritance.
>
> Is this feature supported on all six Blink
> platforms (Windows, Mac, Linux, Chrome OS,
> Android, and Android WebView)?
>
>
> The feature will be supported on all platforms.
>
>
> Interoperability: None
> Gecko: Positive
> <https://github.com/w3c/mediacapture-image/pull/238#issuecomment-663998834>
>
> Webkit: No Signal
> <https://github.com/w3c/mediacapture-image/pull/238#issuecomment-664133544>
>
>
> Compatibility:None
>
>
> Isn't there a compatibility risk of the change to a
> dictionary and removal of toJson?
>
>
> toJSON is not removed as it was not implemented.
> Only spec was updated until blink-dev folks suggested there
> was a better way to do this.
> See https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/AqKdWOB7O8c
>
>  
>
>
>
> Is this feature fully tested
> byweb-platform-tests
> <https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md>?
> Link to test suite results fromwpt.fyi
> <https://wpt.fyi/results/?label=experimental>.
>
> Web platform tests will be updated and available
> at https://wpt.fyi/results/mediacapture-image.
>
>
> Feature dashboard
>
> https://www.chromestatus.com/feature/5677894124699648
>
> --
> You received this message because you are subscribed
> to the Google Groups "blink-dev" group.
> To unsubscribe from this group and stop receiving
> emails from it, send an email to
> blink-dev+...@chromium.org
> <mailto:blink-dev+...@chromium.org>.
> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/b97666a1-20c0-4b53-a725-08acc2130b60n%40chromium.org?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the
> Google Groups "blink-dev" group.
> To unsubscribe from this group and stop receiving emails from
> it, send an email to blink-dev+...@chromium.org
> <mailto:blink-dev+...@chromium.org>.
> To view this discussion on the web visit
> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAMuz0%2Bq5FEDedLEOv5Er5-cKNEWt9kppSQVW83HXr5WMkzixjw%40mail.gmail.com
> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAMuz0%2Bq5FEDedLEOv5Er5-cKNEWt9kppSQVW83HXr5WMkzixjw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "blink-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to blink-dev+...@chromium.org
> <mailto:blink-dev+...@chromium.org>.
> To view this discussion on the web visit
> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACj%3DBEjXV5Oh3U%3DRWnzcK4Qk%2BO0XG%3DCoa9szRy7-JprCqjHByw%40mail.gmail.com
> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACj%3DBEjXV5Oh3U%3DRWnzcK4Qk%2BO0XG%3DCoa9szRy7-JprCqjHByw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages