admin管理员组

文章数量:1122832

I am using the SoundCloud widget in this game:

I haven't been able to make it work properly on Apple products, especially on iPhones. SC.Widget.play() has a delay of a few hundred milliseconds, which in the context of this game is fatal. Strangely, the SC.Widget.Events.PLAY event fires at the expected time, it's just the sound that starts late. This happens with either Safari or Chrome on iPhone.

I'm encountering a similar issue with Safari on Macbook, with a slightly smaller delay. Chrome and Firefox on a Macbook work fine with no noticeable lag. Chrome on Android also works fine.

To recap:

iOS: About a 500ms delay between the PLAY event and the sound, with any browser

Safari on Mac: about 300ms delay

Other browsers on Mac: no delay

Chrome on Android: no delay

I noticed the delay is present in other applications using the widget, like the Heardle family of games, only for them it's not as critical.

Any suggestions for remedies?

I tried to minimize the number of play() calls and the stuff that happens in the PLAY event listener, but it doesn't seem to matter.

本文标签: javascriptSoundcloud API delay in audio playing on iPhoneStack Overflow