LunatiqueCoder / react-native-media-console

A React Native video player. Built with TypeScript ❤️
MIT License
184 stars 28 forks source link

feat: Replace Animation Library to Reanimated #77

Closed goheroes closed 9 months ago

goheroes commented 11 months ago

Apply Reanimated for UI/UX experiences

LunatiqueCoder commented 11 months ago

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. 🙈

goheroes commented 11 months ago

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 commented 10 months ago

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

LunatiqueCoder commented 10 months ago

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

LunatiqueCoder commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

@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.