W3C home > Mailing lists > Public > public-device-apis-log@w3.org > August 2022

Re: [ambient-light] Add camera permission requirement to spec? (#79)

From: Raphael Kubo da Costa via GitHub <sysbot+gh@w3.org>
Date: Tue, 30 Aug 2022 16:04:14 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-1231870047-1661875452-sysbot+gh@w3.org>
One extra option that @mikewest mentioned when we talked about this today: experiment with handling it as a camera in the implementation side and, if that makes sense, incorporate the idea into the spec. As such, I'd appreciate some input here too.

In other words, since the original idea is requiring the "camera" permission and some of the use cases listed in https://w3c.github.io/ambient-light/#usecases-requirements are already tied to camera use, we could require the "camera" permission without requesting it -- if `AmbientLightSensor.start()` is called without camera access (via a previous call to `getUserMedia()`, for example), it would fail instead of prompting for access.

A few opens:
- Not sure if it would make sense to tie the availability of sensor readings to whether a camera is in use or just the camera permission (i.e. if permission to use the camera is granted once, it could be turned off and a subsequent call to `AmbientLightSensor.start()` would still work)
- I'm not sure it this would be a great solution for some other use cases in the list ("A Web application provides input for a smart home system to control lighting" and "A Web aplication checks whether light level at work space is sufficient") though, but that would be the case with requiring the "camera" permission too.

GitHub Notification of comment by rakuco
Please view or discuss this issue at https://github.com/w3c/ambient-light/issues/79#issuecomment-1231870047 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 30 August 2022 16:04:15 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 30 August 2022 16:04:16 UTC