How to solve the problem of playback delay of audio tags on mobile iOS

1. How to solve the problem of playback delay of audio tags on mobile iOS?
2, and why the canplay event is not triggered under the mobile iOS, but can be triggered if the load () method of HTMLMediaElement is called first?

let audioDom = document.createElement("audio");
let sourceDom = document.createElement("source");
sourceDom.type = "audio/mpeg";
sourceDom.src = src;
audioDom.preload = "auto";
audioDom.appendChild(sourceDom);
audioContainer.appendChild(audioDom);
audioDom.load();

// 
audioDom.oncanplay = (e) => {
    let _audioDom = e.target;
    // this.totalTime = _audioDom.duration;
    _audioDom.play();
}
audioDom.onplay = (e) => {
    console.log("onplay")
}
Nov.26,2021

for this audio element of createElement, there is no way to solve the delay problem. You can use other methods, such as defining the audio tag in advance to specify the resource path with src.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea2c6f-1c07.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea2c6f-1c07.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?