-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add changes and required hooks for ALS and Media Capture integration #451
Open
rakuco
wants to merge
5
commits into
w3c:main
Choose a base branch
from
rakuco:als-media-capture
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
anssiko
approved these changes
Dec 14, 2022
reillyeon
approved these changes
Dec 16, 2022
rakuco
force-pushed
the
als-media-capture
branch
from
January 17, 2023 15:50
de8a032
to
a00776d
Compare
Extension specifications may need to use to queue tasks in their own operations.
…ents". The new algorithms were defined in the "Sensor Type" section, but it makes sense to list them when describing what extension specifications may do.
Related to w3c/ambient-light#79, where we want to replace the "ambient-light" powerful feature with an integration with the Media Capture and Streams spec by only providing illuminance readouts if the same page has an active local video source. Part of it requires checking the above condition when `Sensor.start()` is called; the new algorithm introduced here does it in the "activate a sensor object" abstract operation. Additionally, `Sensor.start()` is now invoking "activate a sensor object" as a queued task, as we want it to run in the main event loop rather than in parallel since at least the Ambient Light Sensor implementation of the "pre-activation checks algorithm" needs access to the relevant global object and its internal slots.
Related to w3c/ambient-light#79, where we want to replace the "ambient-light" powerful feature with an integration with the Media Capture and Streams spec by only providing illuminance readouts if the same page has an active local video source. In this case, we rely on the Media Capture and Streams' permission model, as having an active local video source implicitly means the "camera" permission has already been granted. Mention the Ambient Light Sensor case and change the requirement for the snesor permissions name set.
See the discussion in w3c/ambient-light#83 -- "local video source" could end up including screen capture sessions.
rakuco
force-pushed
the
als-media-capture
branch
from
January 17, 2023 15:52
a00776d
to
cbdb022
Compare
rakuco
changed the title
Editorial: Add changes and required hooks for ALS and Media Capture integration
Add changes and required hooks for ALS and Media Capture integration
Jan 17, 2023
reillyeon
approved these changes
Jan 28, 2023
@rakuco would you prefer us to merge this now or coordinate the landing with w3c/ambient-light#83? |
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
rely on (but not request) the "camera" permission instead.
specifications can implement and that is run as part of the "activate a
sensor object" abstract operation.
Preview | Diff