terence01 Posted April 4, 2014 Share Posted April 4, 2014 Hello! i have a problem, my HTML5 counter stops when i activate a other browser-tab.Link:http://spacetourismus.de/html5/ The last counter is the HTML5 version,can you help me? thanks! terence01 Quote Link to comment Share on other sites More sharing options...
ericjbasti Posted April 12, 2014 Share Posted April 12, 2014 Is that HTML5 version using Swiffy? It appears to be using requestAnimationFrame to fire each frame, this by its nature will pause when the tab is not active. If your code was based on an actual timestamp you wouldn't have an issue, since the amount time passed wouldn't be dependent on the number of frames drawn. You could look into modifying Swiffy to always use setTimeout even when requestAnimationFrame is available, as that would act just as flash does, and run no matter what. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.