w3c / sensors

Generic Sensor API
https://www.w3.org/TR/generic-sensor/
Other
127 stars 59 forks source link

Add changes and required hooks for ALS and Media Capture integration #451

Open rakuco opened 1 year ago

rakuco commented 1 year ago

Related to w3c/ambient-light#79. See w3c/ambient-light#83 for the ALS side.

The idea in that issue is to only provide illuminance readouts if there is at least one active local video source together with ALS.

This is based on the assumptions that prompting users for ALS access is too confusing (too few people would know what an ambient light sensor is) and that, if illuminance readouts are provided only if a local video source is active, it means getUserMedia() has been called, a user has granted the "camera" permission and the user agent is showing that a camera is being used.

This pull request adds the required scaffolding to the main Generic Sensor spec:


Preview | Diff

anssiko commented 1 year ago

@rakuco would you prefer us to merge this now or coordinate the landing with https://github.com/w3c/ambient-light/pull/83?

rakuco commented 1 year ago

I think it makes sense to merge the two PRs together. I'm working on an explainer for these changes for wider circulation first and will ping you to merge both PRs once everything is ready.