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: Replace Animation Library to Reanimated #77

Merged
merged 8 commits into from
Sep 24, 2023

Conversation

goheroes
Copy link
Contributor

@goheroes goheroes commented Aug 24, 2023

Apply Reanimated for UI/UX experiences

@LunatiqueCoder
Copy link
Owner

Ohhh this is actually so nice! Can't wait to take a better look at it. Hopefully it will be this weekend or the next. 🙈

requires react-native-reanimated v2 or later
Copy link
Owner

@LunatiqueCoder LunatiqueCoder left a comment

Choose a reason for hiding this comment

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

I didn't test the changes yet, nor did I have a closer look at the code, but I'm wondering how much effort would require to keep both implementations by having a withReanimated: boolean prop. 🤔 I think that letting the users choose between the two it's the best way to go, of course only if that's possible.

package.json Show resolved Hide resolved
@goheroes
Copy link
Contributor Author

I didn't test the changes yet, nor did I have a closer look at the code, but I'm wondering how much effort would require to keep both implementations by having a withReanimated: boolean prop. 🤔 I think that letting the users choose between the two it's the best way to go, of course only if that's possible.

I completely agree with you and hope so.
However, implementing animation effects, including user interaction, while the video is running, is definitely not feasible on a traditional single thread, especially when playing heavy video with high quality.
I think it would be better to aim to avoid bottlenecks through worklets.

@LunatiqueCoder
Copy link
Owner

LunatiqueCoder commented Sep 21, 2023

Will test the changes, then I will try to merge everything together so it can play nicely with or without reanimated

@LunatiqueCoder
Copy link
Owner

Tested, changes look good. Trying to find a way to implement a reanimated: boolean prop for this.

@LunatiqueCoder
Copy link
Owner

Merging this for now, however, I think I will extract your logic in a separate package and let the user decide if what he wants to use it for the animations.

1 similar comment
@LunatiqueCoder
Copy link
Owner

Merging this for now, however, I think I will extract your logic in a separate package and let the user decide if what he wants to use it for the animations.

@LunatiqueCoder LunatiqueCoder merged commit 31fb528 into LunatiqueCoder:master Sep 24, 2023
@LunatiqueCoder
Copy link
Owner

@goheroes I extracted your logic into @react-native-media-console/reanimated. Be sure to check the docs and see how to use it. There should be no breaking changes.

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.

Option: animations with react-native-reanimated
2 participants