question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

.playSegments() flashes Frame 0 before playing a segment in reverse

See original GitHub issue

Browser 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:open
  • Created 5 years ago
  • Reactions:5
  • Comments:11

github_iconTop GitHub Comments

1reaction
bodymovincommented, Jan 9, 2021

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

0reactions
obedparlacommented, Apr 1, 2022

I’m having the same issue when using playSegments and reversing the animation with loop: true. In my case I see the flashing every time I reverse the direction, which I do at the end of every onLoopComplete.

@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-q488ln

However, If you use loop: false and rely on onComplete with play() to mimic a loop, the flashing is gone: https://codesandbox.io/s/lottie-flash-fix-when-using-playsegments-and-reversing-4c0jfb?

Read more comments on GitHub >

github_iconTop Results From Across the Web

lottie flash when using playSegments and reversing
Activating extension 'vscode.typescript-language-features' failed: Could not find bundled tsserver.js.
Read more >
How to play a lottie animation once then loop from frame to ...
I think there is method in JS method playSegments() which can solve this problem but I would like to code this in swift....
Read more >
O o 86 6 9 118 - DTIC
"0" in the frame table), the software updates XYZ and sends out an instruction for a videodisc player to access the appropriate photograph....
Read more >
LayerSlider documentation
... 0, Delays the transition with the given amount of milliseconds before the ... the playhead and move it back and forth to...
Read more >
Chunked DASH in JavaScript - DiVA Portal
implementing a chunked DASH player in the browser with JavaScript. ... Before diving into the details of chunked segments we should first ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found