0

I am trying to write code in html to autoplay sound in ios or chrome device, is it possible?

1 Answers1

0

It depends on the browser.

In general, sounds are blocked until the user has interacted with your page.

From MDN:

Automatically starting the playback of audio (or videos with audio tracks) immediately upon page load can be an unwelcome surprise to users. While autoplay of media serves a useful purpose, it should be used carefully and only when needed. Autoplay guide for media and Web Audio APIs

Rico Hancock
  • 366
  • 6