You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suggest adding a getter to get the duration of a given segment [startFrame, endFrame].
constplayer=newDotLottie({segment: [0,100],/* other params */})constframeRate=player.totalFrames/player.duration;constsegmentDuration=1000*(player.segment[1]-player.segment[0]+1)/frameRate;
Type
New feature
Motivation
I needed to determine how much time remained before the segment would finish playing after some time
Labels
Add the Type: Feature Request label to this issue.
The text was updated successfully, but these errors were encountered:
Thanks @rismirnov
I think this is a good addition. Just one note from my side: to minimize the impact on the bundle size, we can add this as a utility function that we export from our dotlottie-web package for optional use. Adding it directly to the DotLottie class would unnecessarily increase the bundle size, as this is not a very common use case.
Overview
I suggest adding a getter to get the duration of a given segment [startFrame, endFrame].
Type
Motivation
I needed to determine how much time remained before the segment would finish playing after some time
Labels
Type: Feature Request
label to this issue.The text was updated successfully, but these errors were encountered: