Has anyone else noticed that Safari (and even Chrome) for iOS attempt to preload all audio tags even if you use the preload="none":
<audio src="test.mp3" preload="none"></audio>
Desktop browsers appear to work correctly, but as soon as I load the page from the iPhone the Apache server registers a request for the file.
So Firefox 3.5 and Opera are your best bet.
HTML5 <audio> Tag. Since the release of HTML5, audios can be added to webpages using the “audio” tag.
We use preload=”auto” attribute to preload the audio file. The HTML Audio Preload Attribute is used to specify how the author thinks the audio should be loaded when the page loads. The audio preload attribute allows the author to indicate to the browser how the user experience of a website should be implemented.
The <bgsound> HTML element is deprecated. It sets up a sound file to play in the background while the page is used; use <audio> instead. Warning: Do not use this!
According to Apple Docs, Mobile Safari never loads music file or metadata until user touch is detected. This is to make sure a webpage doesn't request a lot of music or data to be downloaded on mobile devices which might take up a lot of mobile data. So preload tag is essentially always set to "none" in mobile Safari regardless of what your code has. Here's the link to the docs where they explain everything.
Quote straight from the docs "Note: The preload attribute is supported in Safari 5.0 and later. Safari on iOS never preloads."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With