how do I use JavaScript to get the length of data that the audio element has loaded?
<audio id="audio" src="./static/audio/audio1.mp3" preload="none"></audio>
<div class="play_control">
<img class="play_btn" src="./static/img/stop.png" alt="play">
<span id="time">00:00</span>
<span id="duration">/00:00</span>
<div class="process">
<span id="loaded"></span>
<span id="playing_time"></span>
</div>
</div>
loaded progress bar is used as data loading progress bar and playing_time as playback progress bar, but I don"t know how to get the length of data loaded from the background, and it is incorrect to use the buffered property in using progress events.