rive-react icon indicating copy to clipboard operation
rive-react copied to clipboard

bug: rive animations can get "stuck" in a stopped rendering state due to `IntersectionObserver`

Open aroman opened this issue 3 months ago • 4 comments

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...

aroman avatar May 23 '24 22:05 aroman