Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(playback): 🎸 segment duration getter #161

Merged
merged 2 commits into from
May 29, 2024
Merged

Conversation

theashraf
Copy link
Member

Context:

The current duration() method returns the duration of the entire animation. However, when the player is playing a specific segment or marker, there is no way to get the duration of the currently playing segment. This PR introduces the segment_duration() method, which returns the duration of the currently set segment if it exists. Otherwise, it returns the duration of the whole animation as defined in the Lottie JSON.

Changes:

  • Added a new method called segment_duration().
  • Updated Uniffi bindings and UDL files.
  • Updated Emscripten bindings.
  • Updated tests.

Related issue: LottieFiles/dotlottie-web#194

Copy link

changeset-bot bot commented May 28, 2024

🦋 Changeset detected

Latest commit: 3f50f18

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Collaborator

@afsalz afsalz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 🚀

@theashraf theashraf merged commit a26564e into main May 29, 2024
1 check passed
@github-actions github-actions bot mentioned this pull request May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants