This commit is contained in:
2025-09-24 14:16:51 -04:00
parent 00378bb011
commit 40cfb7d874
2 changed files with 8 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
document.addEventListener("visibilitychange", (e) =>{
// document.visibilityState will be "visible" or "hidden" (or "prerender) if it's important
if (Howler.ctx.state !== "running") { // better to check on !=="running" as you are doing
Howler.ctx.resume();
}
});