playSegments: Cannot read property '0' of undefined
See original GitHub issueVersion: “react-lottie”: “^1.2.3”,
Calling playSegments seems to always yield the below error.
Tried all of these options and got the same error: table.playSegments({0:[0, 40]}, true); table.playSegments([0, 40], true); table.playSegments([[0, 40]], true);
Error:
lottie.js:9250 Uncaught TypeError: Cannot read property '0' of undefined
at AnimationItem.playSegments (lottie.js:9250)
at Lottie.playSegments (index.js:151)
Options:
const tableOptions = {
loop: true,
autoplay: true,
path: 'assets/table.json',
subframeEnabled: false,
rendererSettings: {
preserveAspectRatio: 'xMidYMid slice'
}
};
React placement:
<Lottie
options={tableOptions}
ref={this.tableEl}
/>
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
Top Results From Across the Web
React Native Lottie: Cannot read property 'play' of undefined
I'm using the Lottie imperative API to display a looping animation. The imperative API works fine on all of my components except one...
Read more >Lottie (Web) - Airbnb Engineering & Data Science
Lottie for Web. Lottie is a mobile library for Web, and iOS that parses Adobe After Effects animations exported as json with Bodymovin...
Read more >Animating with Lottie | CSS-Tricks
Her are the properties we have to work with: container : the DOM element that the animation is loaded into; path : the...
Read more >Lottie Player - Interactivity Guide - LottieFiles
The name of the player ie: 'firstLottie' in this example is the ID set to the ... for the height of the lottie...
Read more >equality crystal Woods cannot set property 0 of undefined sick ...
Home. equality crystal Woods cannot set property 0 of undefined sick out of service Ten years. Uncaught TypeError: Cannot read property 'siteAbsoluteUrl' of ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Going to close this for now, but I rather recommend if there was an official React wrapper for Lottie. :]
yes, it’s related to react-lottie indeed.