CloudStorageTools :: serve () not playable on iOS

I am using GoogleCloudStorage::serve() to serve .mp3 files through the Google App Engine website with HTML5 audio tag. Everything works fine, but after updating for iOS these devices could not play audio in any browser.

I'm not sure why the code stops working. Everything else still works fine on Android and Windows in all browsers.

It does not relay to Javascript or auto-play at all. This is a simple sound tag with a source provided by GoogleCloudStorage::serve() , which works everywhere except recently on iOS.

Any input would be appreciated.

+8
google-app-engine google-cloud-storage ios html5-audio
source share
2 answers

It's a shot in the dark because I don't know anything about serving audio files in iOS, but in case it helps ...

Around the same time that you submitted this question, a friend asked me to help him with his site. The website previously played audio, but during your question the sound stopped working in Safari on OS X.

The existing audio player that was used was based on Flash. I switched my website to playing audio using HTML5, and then it worked fine.

So, you can check if you are playing audio in iOS using a Flash player and you can change it to HTML5 if you can.

+1
source share

Do you rely on autorun ? iOS disables autoplay, you really should let the user touch a button or something like that.

Quote from Apple Documentation :

In Safari on iOS (for all devices, including the iPad), where the user can be on the cellular network and charge per unit of data, preload and auto play are disabled. No data is downloaded until the user initiates it. This means that the JavaScript play() and load() methods are also inactive until the user starts playing, unless the play() or load() method is triggered by the user action. In other words, a user-initiated game, but the onLoad="play()" event does not work.

This plays the movie: <input type="button" value="Play" onclick="document.myMovie.play()">

This does nothing in iOS : <body onload="document.myMovie.play()">

+1
source share

All Articles