Hi Guys,
The Timelines and delayedCalls method seems to forget time if they are paused when using the visibility API, when a tab loses visibility i'm setting the tween's timescale to 0 and pausing the audio.
The audio play calls are trigger on a Timeline, I'm then using delayedCall to stop the audio after a certain duration.
I have setup an example here http://jsfiddle.net/robaldred/nj9pY/
(requires sound& used fiddle because i needed to link multiple externals and don't have pen pro)
On load, sound will play through nicely. All timelines and delayed calls work as expected.
However if you switch to another tab for 30 seconds or so at some point during a playing clip.
When when you return to the tab it really screws up the timeline and the delayedCall, it's like the play head jumps forward when setting timeScale back to 1.
This only appears to happen when using visibility API callbacks. Something to do with RAF not being called when a tab is hidden?
Any thoughts?
Appreciate your time.
Rob