Autoplay an Audio File on Mobile Safari

Posted by phantomdata on Stack Overflow See other posts from Stack Overflow or by phantomdata
Published on 2010-05-15T22:24:07Z Indexed on 2010/05/15 22:30 UTC
Read the original article Hit count: 344

Filed under:
|
|

Hey guys,

I've got a little system dashboard web app that I've written, replete with alarm notifications. I've had it working for quite some time on mobile safari, but recently wanted to add audio to the alarm notifications to allow me to easily know when there are alarms and I'm not looking directly at the display.

The alarm notifications are populated through a (relatively) constantly polling ajax request that pulls in and displays an alarm banner if alarms are present. I wanted to add an auto-playing 'alarm' sound as well, but no dice for Safari Mobile.

I've tried using HTML5 and embedded objects with no avail. The Apple documentation does state that you can't auto-play an audio file and it must be activated through user action to conserve bandwidth.

Has anyone found a way around this in a WLAN setting?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about audio