Love.js Support - Audio stops when not the active tab

Discuss any ports of LÖVE to different platforms.
Post Reply
Posts: 5
Joined: Sun Mar 05, 2017 5:57 pm

Love.js Support - Audio stops when not the active tab

Post by Hikitsune-Red »

I've been working on developing a JRPG for a little while in my free time (very cliche, I know, but it's fun mental work) and the guy I get music from happened to see a "sound test" menu I made and asked if it were at all possible for me to snip that section out and allow him to use it as an online music player for people to sample his music from. Remembering Love.js was a thing, I told him I probably could.

All-in-all, I've got the thing more-or-less working, however, we've encountered a strange issue where the song doesn't change if the player is not the active tab in the browser (or not the active window if there are more than one instances of the browser open). He also claims that if you stay away long enough, the graphics stop updating and the GUI timers I have need to play catch up when you navigate back to it.

I'm not sure if this is related to clipped autoplay functionalities we used to have in the earlier days of the net, or if it's something else. I've made a copy for myself to test on you can check out here, and I've attached a .love below that is free of the issue itself, so I know it's Love.js related (though, my code is messy, I'm not gonna lie, and I'm sure there are more than a few stragglers from things I was testing at the time I copied my code, or just plain things from my game straight-up—you've been warned :crazy: ).

Any help or insight would be greatly appreciated!
(27.08 MiB) Downloaded 33 times
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests