airbnb / lottie-android

Render After Effects animations natively on Android and iOS, Web, and React Native
http://airbnb.io/lottie/
Apache License 2.0
34.92k stars 5.4k forks source link

Paused Lottie Animation Doesn't show the right progression #2506

Open clemlkc opened 2 months ago

clemlkc commented 2 months ago

Context : We want to preserve the animation progress and playing state (pause or play) of a Lottie animation when the user rotates the screen. We then save the progression, and use ClipSpec to set the right progression, after it recomposed.

Bug : When animation is on pause, and user rotates the screen, the animation is re loaded with right progress, but until we set it back to Playing, the animation shows the frame like its 0% progression. When we start playing it again, then the animation starts as expected at the progression we saved. -> It seems that the animation isn't taking the ClipSpec argument into account until it starts playing.