rive-react
rive-react copied to clipboard
bug: rive animations can get "stuck" in a stopped rendering state due to `IntersectionObserver`
We've tracked a nasty race condition down in our product that ultimately we determined was caused by rive-react's usage of the IntersectionObserver
to pause rendering while canvases are occluded.
In certain circumstances, this effect can cause the canvas to get "stuck" in a stopped-rendering state. Simply running startRendering()
on a canvas in this state fixes the issue.
Our temporary workaround is to call startRendering()
periodically every 100ms to ensure these get un-stuck. However, obviously, this should be fixed...