ylluminarious Posted October 18, 2015 Share Posted October 18, 2015 Hi all, I'm having a problem playing a certain M4A file in iOS with Phaser. When I play this file in Phaser, it works just fine on OS X in Safari, and even Chrome and Firefox. However, when I try to play this file in iOS with Phaser, it simply doesn't play. It's very weird since it works fine in Safari on OS X, but fails in Safari on iOS. Also, no errors are thrown in the console on any platform. Upon inspecting the file in TextMate and Sublime Text, the only thing that I see that could potentially be wrong is that there are a lot of null characters in the beginning of the file, but I'm no audio expert, so that could be perfectly normal. I also wonder if I am having this problem because I get a lot of my audio files by running them through http://audio.online-convert.com. Does anyone have an idea as to what's wrong with my file that makes it not play in iOS? Here is the file in question: http://cl.ly/2c3g2B0B2q3x. Here is a demo: http://cl.ly/0h2C0I0F3Q2z. Link to comment Share on other sites More sharing options...
jmp909 Posted October 18, 2015 Share Posted October 18, 2015 i believe iOS doesn't play sound until there's a touch event.. unless your issue is something else?http://www.html5gamedevs.com/topic/1262-audio-example-in-phaser-100ts083/?p=8298http://www.html5gamedevs.com/topic/17910-ios9-sound-problems/ Link to comment Share on other sites More sharing options...
rich Posted October 18, 2015 Share Posted October 18, 2015 What bitrate is the file encoded at? There are certain rates that iOS just cannot play back. Link to comment Share on other sites More sharing options...
ylluminarious Posted October 19, 2015 Author Share Posted October 19, 2015 i believe iOS doesn't play sound until there's a touch event.. unless your issue is something else?http://www.html5gamedevs.com/topic/1262-audio-example-in-phaser-100ts083/?p=8298http://www.html5gamedevs.com/topic/17910-ios9-sound-problems/ Ok, so it turns out that this is a problem with iOS needing a tap event to play sound. Thanks! Link to comment Share on other sites More sharing options...
ylluminarious Posted October 19, 2015 Author Share Posted October 19, 2015 What bitrate is the file encoded at? There are certain rates that iOS just cannot play back. Thanks for offering the help, Rich. As mentioned above, it turns out to be a problem with iOS needing a tap event. Link to comment Share on other sites More sharing options...
Recommended Posts