Tab doing stuff in the background (°ο°)

I was wondering if it was possible to keep a tab working in the background?

I’m trying to create a timer, and want it so that the timer keeps going even after I leave that tab and, once the timer ends, it plays a beeping sound without needing to visit that tab.

1 Like

I’m pretty sure this is possible? I’ve done stuff like run a playSound command to loop music in a wick project, and if I switch tabs, that tab still plays music. Hypothetically this should also work with a counter rather than a playSound loop.

Why not use the difference in time between when the timer started, the timer length, and the current time to determine when the timer ended?

Hey @pumpkinhead, the way you said time too many times made me confused, but I think your speaking of the actual time of the computer?

I’ll try that with the getTime();

Also, @bluecake, try to have something count up in an html file, and leave the tab, then go back moments later. You’ll see it didn’t quite move when you left it. Idk, I might be wrong, or I might have background tabs or something disabled from my settings.

At least in chrome, if I do a simple counter in wick, and I switch to another tab, the counter continues, at least using the update event.

Huh, that’s weird… This is what I’m getting:
Untitled_ Sep 30, 2020 10_25 AM

It might be my browser settings? I’ll have to check right now

1 Like

Let me try in my end… At least in the Dumbies game, since the character moves so slowly, sometimes if I have the solution already in the stage, I just switch to another tab, and I can hear all the sounds and everything being completed within the other tab…

wait, I just found something…if you have sound in your project, it keeps going, otherwise, it stops when you leave the tab! That makes no sense, but it worked!

Results with sounds

Untitled_ Sep 30, 2020 10_44 AM

Hey, @Luxapodular, can you make this an option from the settings maybe?

#feature-suggestions

1 Like

Well it makes sense to me, kinda. Since the browser tab has to continue running to continue playing the sounds.

1 Like

Well, yes it does, but why does it not keep going if it had no sound? That’s what makes no sense

lol funny…

1 Like