Reputation: 47605
I have the following in my html page:
<audio id="doink-wav" src="doink.wav" preload="auto"></audio>
And then I have this in my JavaScript:
var wav = $('#doink-wav')[0];
$('form').submit(function() {
wav.play();
});
And it works in Chrome and Firefox, but not on my iPhone.
Upvotes: 0
Views: 259
Reputation: 4599
I have had issues playing large WAV files before, prehaps you could convert the wav file to ACC or MP3. These file formats seem to play better on iOS. Chrome will be able to play ACC too and FireFox will fall back to WAV.
<audio id="doink-wav" preload="auto">
<source src="doink.m4a">
<source src="doink.wav">
</audio>
Upvotes: 1