Properties

DotLottieAnimation instances expose the following properties:

PropertyTypeDescription
currentFrame()FloatRepresents the animation’s currently displayed frame number.
duration()FloatSpecifies the animation’s total playback time in milliseconds.
totalFrames()FloatDenotes the total count of individual frames within the animation.
loop()BoolIndicates if the animation is set to play in a continuous loop.
speed()FloatRepresents the playback speed factor; e.g., 2 would mean double speed.
loopCount()IntTracks how many times the animation has completed its loop.
mode()ModeReflects the current playback mode.
isPaused()BoolReflects whether the animation is paused or not.
isStopped()BoolReflects whether the animation is stopped or not.
isPlaying()BoolReflects whether the animation is playing or not.
manifest()ManifstReturns the .lottie’s manifest file.
segment()(Float, Float)Reflects the frames range of the animations. where segment[0] is the start frame and segment[1] is the end frame.
backgroundColor()CIImageGets the background color of the canvas.
autoplay()BoolIndicates if the animation is set to auto play.
useFrameInterpolation()BoolDetermines if the animation should update on subframes. If set to false, the original AE frame rate will be maintained. If set to true, it will refresh with intermediate values. The default setting is true.
markers()MarkerThe Lottie markers contained inside the animation if any.