Resolves #35
Added an if statement checking the state of document.hidden before attempting to draw. If it attempts to draw, it will still play the sound if it can to sound like it's still doing something and will immediately begin drawing again when the page is tabbed back to.
Following the patch, over a five minute period tabbed away the memory usage hovers around 6-8MB
Resolves #35 Added an if statement checking the state of
document.hidden
before attempting to draw. If it attempts to draw, it will still play the sound if it can to sound like it's still doing something and will immediately begin drawing again when the page is tabbed back to.Following the patch, over a five minute period tabbed away the memory usage hovers around 6-8MB