Bug 200766 - Feature request: allow page to request permanent access to audio playback without user interaction
Summary: Feature request: allow page to request permanent access to audio playback wit...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Audio (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-08-15 04:18 PDT by Sulka Haro
Modified: 2019-08-16 22:42 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sulka Haro 2019-08-15 04:18:11 PDT
This is a request for the Webkit dev team to consider adding a Javascript permission API for a site to request permission to use audio playback without user input.

The reason I'm asking is as follows: I'm a developer on the Nightscout project, a web application for real time monitoring of blood glucose of diabetics, especially kids. With the audio autoplay disabled by default in modern browsers, we cannot trigger alarm sounds or use speech synthesis to alarm users unless the user has remembered to press a button on the screen to trigger the alarm / speech once on every page load. This is leading to situations where user forgets to press the button and thus doesn't get alarmed when they should act in the interest of the safety of the person being monitored, especially for users with visual disability. Simultaneously we'd like to avoid having a flow where user needs to dismiss an audio enabling dialog by triggering audio on every page load, just to make sure we can play audio.

If the permissioning system allowed us to request a permanent permission to play audio, it'd prevent these cases and genuinely help people. I can see how the current design for audio on web makes sense from the "let's prevent users from being annoyed" perspective, but it's also preventing some classes of apps from functioning reliably.

We have a related issue filed for Chrome: https://bugs.chromium.org/p/chromium/issues/detail?id=938810

If you have any questions (or if I filed this in the wrong place), please ping me. :)

Thanks,

Sulka
Comment 1 Radar WebKit Bug Importer 2019-08-16 22:42:07 PDT
<rdar://problem/54420543>