Ability to not play the frame of the 'toMarker' in 'AnimationView.play(fromMarker:toMarker:loopMode:completion:)' #1758
lennartstolz
started this conversation in
Ideas
Replies: 1 comment
-
Implemented in #1772. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! 👋
When working with markers it would be helpful to be able to specify whether the frame of the
toMarker
should be played or not.This enables you to work with animation files providing mostly start markers - in case of a continuous animation, like the following:
If you, for example, would like to play the prequel once, loop the chorus x-times and then jump into the fade-out animation you'd need markers for
Stop prequel
andStop chorus
to make use of the.play(fromMarker:toMarker:loopMode:completion:)
API¹. But all of those stop markers are basically justStart chorus - 1 frame
andStart FadeOut - 1 frame
.The Android library does provide a boolean flag
playEndMarkerStartFrame
to handle this scenario:(just a reference to one of its play methods)
Looking forward to get some input / thoughts about this. I am also happy to help with the implementation of a boolean flag (similar to Android) if you think it's a valuable addition to Lottie.
Best,
Lennart
¹ Of course this is already possible with the current version, when calculating the frames yourself by using the
frameTime(forMarker:)
API and do the-1
manually but it would be handy to use the "better fitting" API.Beta Was this translation helpful? Give feedback.
All reactions