How to play a marker? from "tm" for "dr" #1642
-
Hello! I have some troubles working with iOS lottie api. In Android I can play a marker by its name, without knowing is there some other markers, which marker goes next, or if this marker is the last one! Just like that: animationView.setRepeatCount(LottieDrawable.INFINITE);
animationView.setMinAndMaxFrame("surprise");
animationView.playAnimation(); And I can't find the way in iOS to do so. Isn't that what {"tm":80,"cm":"surprise","dr":44} And even without method Marker marker = animationView.getComposition().getMarker("surprise");
float dr = marker.durationFrames;
float tm = marker.startFrame; But I don't see how to get Marker object on iOS either. Or am I missing something? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
It looks like markers with durations ( If you have two markers, each with their own |
Beta Was this translation helpful? Give feedback.
-
This should now be possible as of #1749 |
Beta Was this translation helpful? Give feedback.
It looks like markers with durations (
dr
values) are currently unsupported on iOS -- we don't parse thedr
field. Open to adding support for this, we just need somebody to implement it.If you have two markers, each with their own
tm
value, you can useAnimationView.play(fromMarker:toMarker:)
. This is howAnimatedSwitch
andAnimatedButton
work, for example.