1. After chrome 66, only setting autoplay= "true" to the audio tag can not achieve the effect of automatic playback. Is there any good way to achieve automatic playback?
2. In my own attempt, I found that if alert prompts me to click manually after checking that auto playback is not allowed, it will play automatically instead. What is the reason for this?
var audio = document.getElementById("audio");
var audioPlay = audio.play();
audioPlay.then(function () {
console.log("");
}).catch(function (err) {
console.log(err);
console.log("");
alert("")
})