Skip to content

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

@Rajdeepc

Description

@Rajdeepc

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions