Open Bug 1802800 Opened 2 years ago Updated 2 years ago

Dropping file onto page doesn't allow AudioContext to start when autoplay is disabled

Categories

(Core :: Audio/Video: Playback, defect)

Firefox 107
defect

Tracking

()

UNCONFIRMED

People

(Reporter: boris.gjenero, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached file audiocontext_on_drop.html (deleted) —

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:107.0) Gecko/20100101 Firefox/107.0

Steps to reproduce:

The attached audiocontext_on_drop.html creates a new AudioContext when a file is dropped onto the page. Media autoplay was set to "Block Audio and Video". I opened audiocontext_on_drop.html, opened Firefox Developer Tools, and dragged a file onto that page.

Actual results:

In Developer Tools Console, I see a warning "An AudioContext was prevented from starting automatically. It must be created or resumed after a user gesture on the page."

Expected results:

Dropping a file onto the page should count as a user gesture on the page. The AudioContext should have started.

If I click on the page once, after that I am able to drop files onto the page without that warning. If I set autoplay to "Allow Audio and Video" for the particular site or globally, that works without needing that click. Either of these can be workarounds for this issue.

Chrome 107.0.5304.121 doesn't require that click, and creates the AudioContext normally, even if the first user interaction with the page is dropping a file onto it. (I also tried creating an AudioContext before any user interaction in Chrome, and that didn't start, similarly to Firefox, showing that autoplay was disabled, and dropping a file onto the page enabled it.)

The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core

The drop event may have been overlooked in the catalog of https://github.com/whatwg/html/issues/3849

I wonder why "mouseup" was excluded given that all browsers treated mouseup as activation triggering.

Blocks: 1577516
Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: