Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

goTo flashing first frame by default when other frames are specified #82

Open
Rajdeepc opened this issue Sep 28, 2022 · 3 comments
Open

Comments

@Rajdeepc
Copy link

Rajdeepc commented Sep 28, 2022

@mifi
I have a lottie.json which have below markers

"markers": [
    { "tm": 0, "cm": "{\r\"name\":\"remove_background\"\r}", "dr": 25 },
    { "tm": 25, "cm": "{\r\"name\":\"removing_background\"\r}", "dr": 25 },
    { "tm": 50, "cm": "{\r\"name\":\"restore_background\"\r}", "dr": 25 },
    { "tm": 75, "cm": "{\r\"name\":\"loop_preloader_gradient\"\r}", "dr": 50 },
    { "tm": 125, "cm": "{\r\"name\":\"loop_preloader_bright\"\r}", "dr": 50 }
  ]

And I am trying to load the "loop_preloader_gradient " marker like named markers.

import Lottie from 'react-lottie-player';

function LoopyPreloader({ animationData, goTo }) {
  return (
    <Lottie
      loop={true}
      play={true}
      animationData={animationData}
      goTo={goTo} // loop_preloader_gradient
      style={{ width: 68, height: 68 }}
    />
  );
}

This causes a 2 seconds blink of "remove_background" animation and then renders "loop_preloader_gradient"

@Rajdeepc Rajdeepc changed the title multiple markers causing blinking of first markers when trying to run others goTo flashing first frame by default when other frames are specified Sep 29, 2022
@mifi
Copy link
Owner

mifi commented Sep 29, 2022

Hi. Could you make a codesandbox or similar that shows the issue?
Does the same issue happen with lottie-web or does it work with that?

@Rajdeepc
Copy link
Author

Rajdeepc commented Sep 30, 2022

@mifi Checked with lottie-web. Same issue.

Codesandbox:
https://codesandbox.io/s/interesting-elion-rl60c0?file=/src/Loopy.js

@mifi
Copy link
Owner

mifi commented Sep 30, 2022

Then I would file an issue at lottie-web instead, because react-lottie-player is merely a wrapper around lottie-web, so not much we can do about lottie-web bugs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants