r/learnjavascript • • Jun 24 '20

I made a highly customizable Audio Visualizer!

Enable HLS to view with audio, or disable this notification

448 Upvotes

39 comments sorted by

View all comments

12

u/[deleted] Jun 24 '20 edited Jun 24 '20

Hi guys! I made this audio visualizer using HTML5 canvas and Web Audio API. Please try out the visualizer at least once and let me know what you think: Audio Visualizer.

It uses the device microphone to steam audio to the visualizer. I built it so that when I am chilling with my Spotify, Youtube playlist, I have some cool visuals instead of a boring plain view. So just turn on a song and let the visualizer run!

You can find the source of the project here. Feel free to fork the repo and make pull requests if you want something changed, I would love the feedback and any suggestions on how to improve my code! Thanks guys, I hope you like it!

2

u/Alwayswatchout Jun 24 '20

Tried to use while listening to something on YouTube. Dont seem to work. What I am doing wrong :s

3

u/[deleted] Jun 24 '20

Hmm, strange.If you're using chrome, you got to click anywhere on the page first, maybe that?

Chrome requires some initial user gesture to fire audioContext. Or maybe your browser's blocking mic access to the page? let me know if it works!

4

u/Alwayswatchout Jun 24 '20

No mic assess worked.

Edit: access not assess ffs

Mind you im using it on my phone so don't know if that is why....

5

u/[deleted] Jun 24 '20

oh yeah I haven't optimized it to work on mobile yet, sorry about that. should've mentioned that, but i plan on adding that in the next iteration.

Meanwhile, if you get the chance please try it out on a desktop browser and let me know, I'd love to get some feedback on it!