Attempt system for sounds tab previews

This commit is contained in:
Aria 2025-11-19 18:35:35 -06:00
parent ea7dc7a732
commit 8144ec46bd
2 changed files with 28 additions and 13 deletions

View file

@ -263,8 +263,8 @@ let audioReady;
export async function initAudioOnFirstClick(options) {
if (!audioReady) {
audioReady = new Promise((resolve) => {
document.addEventListener('click', async function listener() {
document.removeEventListener('click', listener);
document.addEventListener('mousedown', async function listener() {
document.removeEventListener('mousedown', listener);
await initAudio(options);
resolve();
});