muaz-khan / RecordRTC

RecordRTC is WebRTC JavaScript library for audio/video as well as screen activity recording. It supports Chrome, Firefox, Opera, Android, and Microsoft Edge. Platforms: Linux, Mac and Windows.
https://www.webrtc-experiment.com/RecordRTC/
MIT License
6.54k stars 1.75k forks source link

bytesToSize function returns incorrect value #777

Open icguy opened 3 years ago

icguy commented 3 years ago

The bytesToSize function uses 1000 as multiplier instead of 1024. This is even stranger when you consider the original source (the stackoverflow answer linked in the comment above the method) uses 1024.

See source (line 1790):

https://github.com/muaz-khan/RecordRTC/blob/ebae1da10f50a521000cbcced5c5adfb96f32411/RecordRTC.js#L1780-L1797