Problem description:
I import an audio external media file through the HTML AudioElement tag in a deck and play it in the following way (repeat 3 times during each playback)
const handler = {
playAudio: function() {
const audio = document.getElementById('a-audio') as HTMLAudioElement;
audio.currentTime = 0;
audio.playCount = 3;
audio.play();
}
};
onMounted(() => {
func.i();
// replay three times
const audio = document.getElementById('a-audio') as HTMLAudioElement;
audio.addEventListener('ended', () => {
console.log(audio.playCount);
audio.playCount--;
if (audio.playCount > 0) {
audio.play();
}
});
// 播放
handler.playAudio();
});
But it doesn’t work on ankimobile. (This deck can be played normally on both Windows and Android)
Question: How can I find the cause of the problem’s error? So that I can solve it.
I want to see the information on the console,
but I found that the iOS client does not support it. Is there any other way.
I hope to get some help, thank you