.playSegments() flashes Frame 0 before playing a segment in reverse
See original GitHub issueBrowser and Browser Version: Latest Chrome and Firefox with React
After Effects Version: 15.1.1
I’ve been trying to get a segment to play in reverse and the first frame that plays ends up being frame 0 regardless of the segment’s position in the timeline. No looping or anything, I’m just trying to play different segments and switch their directions around.
segments = { 1: [0, 66], 2: [66, 162], };
-
tried to supply the segment in reverse (like [66, 0]) and play it with direction -1 and that seemed to fix the visual flashing but it ended up looping the section twice.
-
tried to do a .goToAndStop before the reversed bits but it ends up going to that point just fine but then just flashing frame 0 right after it.
-
tried using -1 speed instead of direction, no change in behavior
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:11

Top Related StackOverflow Question
@ivanjeremic can you share more details about the issue or a link to reproduce?
lottie-web is open source in 2021 as has always been, so feel free to submit a PR as well.
I’m having the same issue when using
playSegmentsand reversing the animation withloop: true. In my case I see the flashing every time I reverse the direction, which I do at the end of everyonLoopComplete.@bodymovin here’s the reproduction, you can see the flashing after every
setDirection()change. https://codesandbox.io/s/lottie-flash-when-using-playsegments-and-reversing-q488lnHowever, If you use
loop: falseand rely ononCompletewithplay()to mimic a loop, the flashing is gone: https://codesandbox.io/s/lottie-flash-fix-when-using-playsegments-and-reversing-4c0jfb?