Target: get the file length before the audio is played.
Terminal: ios Wechat version 6.7.1
phenomenon: the canplay event will only be triggered when the user manually clicks the play button.
related codes
var audio = document.getElementById("audio");
audio.addEventListener("canplay", function(e) {
console.log(audio.duration);
});
What is the reason for ? What are we going to do about it?