Animation ignores playSegments endframe

Hi everbody,

So i created a Website with some Lottie animations and for the most parts it works perfectly. But I have a problem with the playSegment command which is triggered onload for the Main Hero Animation and the hamburger menu.

Sometimes (!) if I load the site the animation starts but doesn’t stop at the endframe.

Here I load the animation:

heroMain = document.getElementById('bodymovin');

let animHero = bodymovin.loadAnimation({
  container: heroMain,
  renderer: 'svg',
  loop: false,
  autoplay: true,
  path: "",
  rendererSettings: {
    progressiveLoad: false,
    preserveAspectRatio: 'xMidYMid slice'

and here i execute it:

$(document).ready(function () {
animHero.playSegments([30, 300], true);

This occures also for the hamburger navigation, when you scroll down and reload the website.
I’m super confused since I don’t get an errormessage nor does it happen every time…

Do you have an Idea, whats happening here?

Best regards



Found a solution here: playSegments() · Issue #398 · airbnb/lottie-web · GitHub