Audio Attributes - Mac OSX and IOS playback


#1

From the explanation I read in the the documentation, it seems as if The Mac OSX and IOS autoplay audio are mutually exclusive. Can someone please explain how I can load a video, with audio and get the audio to autoplay in both the Mac OSX and IOS or can this not be done - Thanks.


(Jonathan Deutsch) #2

There is no way to autoplay audio on Mobile Safari on iOS. You can autoplay video on iOS, but only if it is muted (or does not contain an audio track).

(I would not specifically say “mutually exclusive” because as long as it is muted both will work the same way - if there’s a place in the doc that gave you this impression please let me know).

The only exception is for native apps which can configure their own WebViews.


#3

Jonathan,

Thanks for the reply.

This would seem like a major drawback in trying to make an ad with audio. Is this a limitation with HTML5, Mobile Safari, Hype or all together?

I put together an ad for a band that played as built on Mac OSX but no audio on IOS. I’m guessing it would work on IOS with user interaction to start the video that contains audio, correct? But than also means Mac OSX users would have to needlessly do the same.

I look forward to a solution of some kind for this problem and thank you for your response.

Regards,

Steve Abdu


(Jonathan Deutsch) #4

This is a restriction on Mobile Safari; Apple is trying to keep things polite so audio is not played on a user’s device without their specific interaction.

In fact, Apple wouldn’t even allow autoplaying video until iOS 10 (so it took them 9 years to relent on this, mainly due to heavier animated GIFs being used as a workaround).

You could in theory write code to detect an iOS device by looking at the navigator.userAgent string and then mute or unmute the video element. But I’d also ask that you think of users - personally I hate autoplaying audio! :slight_smile:.


#5

Jonathan,

Thanks. Actually I do too!
This was actually a soft, smooth jazz kind of feel, not a heavy metal, beat you over the head type of band/festival ad. It was meant for a music page on FaceBook. I ended up making a movie of the Hype project and putting it up on youTube with a link that the user had to initiate. It worked.

Thanks again,
Steve Abdu