js / html5 audio: Why is canplaythrough not fired on iOS safari?

前端 未结 3 1960
广开言路
广开言路 2021-01-02 05:01

i use the code below to preload an array of audio files (after user interacts with a button starting the process). After all audio files fired \"canplaythrough\" the code pr

3条回答
  •  没有蜡笔的小新
    2021-01-02 05:25

    Have you checked Network/Server and confirmed Safari is downloading the audio files?

    If Safari's not downloading the audio (or only loading metadata instead of the full file), you could try setting audio.preload = 'auto' before setting audio.src

提交回复
热议问题