Autoplay an Audio File on Mobile Safari
Asked Answered
I

1

4

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?

Infantine answered 15/5, 2010 at 22:24 Comment(2)
Can you please post the link to the official apple documentation that states that you can't auto-play? Something to give the higher-ups here ;) Thanks!Evoke
opera mini in ios supports autoplay by default, while chrome, firefox and safari does not and have not offering options to turn on.Betterment
D
4

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!

Dragline answered 15/5, 2010 at 22:33 Comment(1)
Darn. Sometimes I do have to question safeguards like that... The primary place a play-on-load sound file, of any palpable size, would be on a music site which I would hope the user would realize is a large bandwidth consumer (meaning they would probably press 'play' anyway). shrug Thanks for confirming GuidoH!Infantine

© 2022 - 2024 — McMap. All rights reserved.