joshwcomeau / use-sound

A React Hook for playing sound effects
MIT License
2.75k stars 98 forks source link

Question: How capable is this? #4

Closed rchrdnsh closed 4 years ago

rchrdnsh commented 4 years ago

Not sure how to ask, but how far can one go with this hook? Could it power an entire music streaming application, like a Spotify style app, or is it really more geared toward a little sound effect here and there and nothing more? Just curious how you conceptualize it in your mind...it feels like the latter from your post, but I thought I’d ask you first before reaching any conclusions :-)

joshwcomeau commented 4 years ago

hey @rchrdnsh!

Yeah, so the intended usecase is definitely small sound effects. The kinds of stuff shown in the intro blog post.

That said, the hook is built around Howler, which is a super-capable audio library. And via escape hatches, you can do everything you can do with Howler.

So, I'd say that this hook is probably capable of building an entire audio-focused application, but it's maybe not the best tool for the job :)

tr1s commented 4 years ago

@joshwcomeau do you know what tools are more capable of building entire audio-focused applications (in React), out of curiosity?

joshwcomeau commented 4 years ago

@tr1s I'd use the Web Audio API directly (this is what I do for Beatmapper). You could also try using Howler directly, it's super powerful. Tie it into a Redux middleware and dispatch actions for every audio-related event.

Gonna close this now, but hopefully this helps!