v86 icon indicating copy to clipboard operation
v86 copied to clipboard

audio is sometimes blocked by the browser's autoplay detection

Open jeffy79 opened this issue 1 year ago • 3 comments

this is on fire fox but for some reason the start up sound on windows 2000 it has sound and then for some reason on some days it does not have sound when i use it is there a fix for that ?

jeffy79 avatar Aug 13 '24 13:08 jeffy79

The problem is probably this:

The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page

It happens when you open the page without a "gesture" (e.g. by copy-pasting the url). The browser tries to prevent audio autoplaying.

A fix would be to resume the audio context on the next event (e.g. click or key press). A PR would be welcome.

copy avatar Aug 13 '24 13:08 copy

image

https://developer.chrome.com/blog/autoplay/#webaudio

you need to create some sort of start button on your webpage before v86 is loaded.

dylaniscool54 avatar Sep 19 '24 03:09 dylaniscool54

you need to create some sort of start button on your webpage before v86 is loaded.

My suggestion would be to do it when clicking on the screen to lock the mouse.

copy avatar Sep 19 '24 18:09 copy