开发者

Autoplay an Audio File on Mobile Safari

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 p开发者_运维技巧ulls 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?


I guess that it's impossible, in fact, I hope so. Not for you, I'm sure that you'll use it for a good purpose, but I really don't want allow sites to auto-play audio files.

Oh, I remember something... It's possible with Flash!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜