Read more

Autoplay HTML5 audio in Chrome for Android, Mobile Safari in iOS

Henning Koch
January 27, 2013Software engineer at makandra GmbH
  • Mobile browser's ignore the autoplay attribute on <audio> and <video> elements. Stupid reasons include saving mobile bandwidth on behalf of the user and/or securing app store sales.
  • Audio and video elements will only play as the result of a user interactions (click, touch).
  • A workaround is to have a "start button" in your application that loads and plays an initial sound.
  • You can now play further sounds without user interaction by changing the source on the same <audio> element.

I tested this on Chrome for Android. The interweb says Show archive.org snapshot it should work on Mobile Safari as well.

Illustration web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show archive.org snapshot
Posted by Henning Koch to makandra dev (2013-01-27 09:46)