Update:
Make a HEAD request and get the file size from the Content-Length header . Since you know the duration, you can calculate the transfer rate.
Study:
Here I want to share some of my research.
You probably already know this - the bitrate is stored internally in accordance with the MP3 format specification . But I'm sure that you would rather not read the file and not deal with all this! Hope you can find tools or APIs to help. With that in mind ...
I looked at the public web APIs that would retrieve information for the MP3, but did not find anything that popped up on me.
If you can find the version of ExifTool that you can access from Chrome, it has an API for calculating the bitrate.
There is a Javascript library called SoundManager that looks promising, but it does not accurately calculate the bitrate.
I looked at the Web Audio API , but did not see any mention of reading MP3 files in particular, and therefore could not extract the bitrate.
source share