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/audio #52

Merged
merged 9 commits into from
Sep 7, 2023
Merged

Feat/audio #52

merged 9 commits into from
Sep 7, 2023

Conversation

samuelOsborne
Copy link
Collaborator

@samuelOsborne samuelOsborne commented Sep 5, 2023

Adds audio asset detection and support:

  • Separate extraction methods on buffer via the Utils
  • LottieAudio class to manage audio assets

@changeset-bot
Copy link

changeset-bot bot commented Sep 5, 2023

🦋 Changeset detected

Latest commit: afafbe2

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

This PR includes changesets to release 4 packages
Name Type
@dotlottie/dotlottie-js Minor
next Patch
node Patch
nuxt-app Patch

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

@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2023

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
dotlottie-js 20.95 KB (+2.89% 🔺) 420 ms (+2.89% 🔺) 222 ms (-4.92% 🔽) 642 ms

@samuelOsborne samuelOsborne marked this pull request as ready for review September 5, 2023 09:49
packages/dotlottie-js/src/dotlottie.ts Outdated Show resolved Hide resolved
packages/dotlottie-js/src/dotlottie.ts Outdated Show resolved Hide resolved
packages/dotlottie-js/src/lottie-animation.ts Outdated Show resolved Hide resolved
packages/dotlottie-js/src/node/dotlottie.ts Outdated Show resolved Hide resolved
packages/dotlottie-js/src/node/lottie-animation.ts Outdated Show resolved Hide resolved
packages/dotlottie-js/src/tests/lottie-audio-node.spec.ts Outdated Show resolved Hide resolved
Comment on lines +189 to +193
it('returns the audio', async () => {
const audio = await getAudio(dotLottieAnimationWithAudio, 'audio_1.mpeg');

expect(audio?.length).toBeGreaterThan(0);
});
Copy link
Member

Choose a reason for hiding this comment

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

Asserting on the length, doesn't guarantee that it return a valid audio, is it possible to check if the actual audio_1.mpeg equal to the extracted audio ?

packages/dotlottie-js/src/tests/lottie-audio-node.spec.ts Outdated Show resolved Hide resolved
@theashraf theashraf merged commit fcbe995 into main Sep 7, 2023
2 checks passed
@theashraf theashraf deleted the feat/audio branch September 7, 2023 04:08
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.

None yet

2 participants