Re: [w3c/permissions] Add 'screen-wake-lock' permission (#247)

cc @reillyeon

While the current Chrome implementation does go through the permissions system, it also happens to always grant all screen wake lock requests like you noticed. The reasoning back then when we were implementing the code was that existing libraries like NoSleep.js that would keep the screen on with an embedded 1x1 video would not trigger any permission prompts, so we'd try to do something similar for Wake Lock.

I _think_ the embedded video trick does not cause the screen to stay on anymore (I think I saw some reference to it in a bug report months ago, but I can double-check if necessary), but there's been no push in Chrome to change the current wake lock + permissions integration.

With that said, I thought it'd make sense to merge this PR since the Chrome implementation _is_ wired to the Permissions API code?


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/permissions/pull/247#issuecomment-866930472

Received on Wednesday, 23 June 2021 15:20:17 UTC