Hacker News new | ask | show | jobs
by pier25 1349 days ago
What's the total size including waveform.js?
1 comments

  mkdir tmp && cd tmp
  npm init -y && npm install react-modern-audio-player wavesurfer.js

  ls node_modules/react-modern-audio-player/dist

  138K index.cjs
  106K index.css

  ls node_modules/wavesurfer.js/dist

  72K  wavesurfer.min.js

  cd .. && rm -rf tmp
oof
Total of 316 K minified JS & CSS. Kinda heavy.
Isn’t an average mp3 for a 3min song close to 3MB? It seems to me that this type of tool already assumes you have some bandwidth available
What if the user is on mobile and doesn't intend to play the audio?

And that is on top of the rest of the page.

Am I missing something or are you joking? Its an audio player
Yeah it's a lot...
It's true, even without the wave visualizer, it's 244Kb minified for an audio player. Apparently some people don't agree, but I think it's too much.