ArvindParekh / Lofi-Music-App

Lofi lover? You are at the right place, my friend! Play Lofi tracks and mix them up with different ambient sounds. Try it out now! 🎢⚑
https://lofi-beats.vercel.app/
MIT License
29 stars 17 forks source link

[Refactor] Shift the audio playing logic for the Effects to the useAudioPlayer custom hook #15

Open ArvindParekh opened 3 months ago

ArvindParekh commented 3 months ago

Currently, the audio-playing logic for the Tracks is consolidated within the useAudioPlayer custom hook. However, the same logic for Effects is not centralized and is present individually within the Effect.jsx file. To maintain a consistent and centralized source of truth, it's advisable to include the audio playing logic for Effects within the useAudioPlayer custom hook.

The task involves:

tigerabrodi commented 3 months ago

@ArvindParekh

Do you mean EffectCard.jsx should also use the useAudioPlayer hook just like Tracks file does?

ArvindParekh commented 3 months ago

Yes, precisely. However, the useAudioPlayer hook currently doesn't support the kind of logic that's required for playing "Effect" audios, the logic is still present natively in EffectCard.jsx. It'd be better if there's one single custom hook that takes care of the entire audio logic for both Effects and Tracks.

sahild91 commented 3 months ago

@ArvindParekh , Is this issue still open for contribution? If yes, maybe I can try it out and see if it can be made as a custom hook.

ArvindParekh commented 3 months ago

Hey @sahild91, yes the issue's still open, feel free to work on it if you'd like. We already have a custom hook in place, we'd just like to incorporate the logic of Effects into it. (You can get the issue assigned to you, and here are the contributing guidelines if you'd like to take a look πŸ‘πŸ» )

sahild91 commented 3 months ago

/assign

qu1ll commented 3 months ago

Hey @sahild91, just wondering how far you got on this issue, I was thinking of taking a peak at it see what I can do.

qu1ll commented 3 months ago

/assign