1

If you are familiar with scratch, you'll know that Scratch 3 was built to support mobile.

Javascript audio isn't working on mobile devices shows that mobile doesn't support auto playback of audio

Scratch seems to play audio without a problem...

Does anyone know the secret behind Scratch mobile audio playing capabilities? (share pieces of code which scratch uses to play audio on mobile)

(Incase you're wondering why I need to know this, I need to use it on my website)

Coder2195
  • 268
  • 2
  • 13

1 Answers1

0

Read the answer carefully.

Some mobile browsers support automatic playback of audio, but ios, chrome and others require interactive actions to trigger the sound playback.You can try working with the mute attribute..

Scratch can't play sounds automatically. You have to click the Start button on any project. By "interactive actions" they mean clicks, scroll etc,.

Spectric
  • 30,714
  • 6
  • 20
  • 43
  • OHHHHHHHHHH I get it so if I get my user to just tap the screen itll work? – Coder2195 Mar 05 '21 at 18:30
  • @Coder2195 Yes. The question was about autoplay, which is when a page plays music the moment it loads. In Scratch, you have to first click the "Start" or the green flag button. That is how it plays sounds. – Spectric Mar 05 '21 at 18:34