Skip to content
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

Require transient activation #351

Open
wants to merge 3 commits into
base: gh-pages
Choose a base branch
from
Open

Require transient activation #351

wants to merge 3 commits into from

Conversation

index.html Outdated Show resolved Hide resolved
@marcoscaceres marcoscaceres mentioned this pull request Sep 28, 2022
4 tasks
@marcoscaceres
Copy link
Member Author

Updated tests ... web-platform-tests/wpt#36122

@reillyeon
Copy link
Member

To make this change in Chromium we should do analysis of the compatibility impact and announce a deprecation.

It looks like requiring transient activation is not a normative requirement for the <video> tag. I am not familiar with which browsers enforce this requirement. One data point is that NoSleep.js recommends wrapping the call to their library in an input handler. I assume that is because it falls back to using a <video> element and some browsers require user activation to play a video (or to take a wake lock while playing video).

@marcoscaceres
Copy link
Member Author

It looks like requiring transient activation is not a normative requirement for the

Sorry, I wasn't very clear. The transient activation aspect I was referring to was the act of pressing the play button.

One data point is that NoSleep.js recommends wrapping the call to their library in an input handler. I assume that is because it falls back to using a

Yes, exactly that. That's to allow the video to play with audio, even though it's silent (Safari detects it a video that's making noise).

Screen Shot 2022-09-29 at 9 42 55 am

index.html Outdated Show resolved Hide resolved
@marcoscaceres
Copy link
Member Author

Ok, we've updated WebKit to not consume user activation.

@marcoscaceres
Copy link
Member Author

Send a PR with an isolated test web-platform-tests/wpt#36152

@reillyeon, wrote:

To make this change in Chromium we should do analysis of the compatibility impact and announce a deprecation.

Ok, no problem. WebKit will probably ship requiring transient activation. I think we are willing to take the compat hit as otherwise we feel the API might be too easy to abuse.

@marcoscaceres
Copy link
Member Author

Closing based on @anssiko comment #326 (comment)

Can someone please take this up though? 🙏

aarongable pushed a commit to chromium/chromium that referenced this pull request Oct 1, 2022
This will be used to understand the compatibility impact of adding a
transient activation requirement as proposed in
w3c/screen-wake-lock#351.

Bug: 1370132
Change-Id: Iff35979eef46d640aaf8b8f6a336546c03ff0355
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3928945
Auto-Submit: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Raphael Kubo Da Costa <raphael.kubo.da.costa@intel.com>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1053843}
mjfroman pushed a commit to mjfroman/moz-libwebrtc-third-party that referenced this pull request Oct 14, 2022
This will be used to understand the compatibility impact of adding a
transient activation requirement as proposed in
w3c/screen-wake-lock#351.

Bug: 1370132
Change-Id: Iff35979eef46d640aaf8b8f6a336546c03ff0355
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3928945
Auto-Submit: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Raphael Kubo Da Costa <raphael.kubo.da.costa@intel.com>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1053843}
NOKEYCHECK=True
GitOrigin-RevId: 7d6b065bce749cfa333b506fca5db81245036ec7
@marcoscaceres marcoscaceres reopened this Apr 8, 2024
@reillyeon
Copy link
Member

Is WebKit open to switching to a sticky activation model? Chromium's metrics look better for that and it means that a site can reacquire a lock if it had one before but lost it due to visibility changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Require transient activation to request lock
2 participants