HTML and CSS Reference
In-Depth Information
Opera
Safari
202
Chrome
Firefox
Figure 10-1: Using audio player controls.
PRELOAD
h e preload attribute of the <audio> tag can be an important one because it starts
preloading the audio before it's played. In that way, users don't have to sit and twiddle their
thumbs while the audio loads at er they press play. h e simplest format for the preload
attribute is just like the controls and autoplay — it just needs to be added without a value, as
the following shows:
< audio src = ”Shadows.wav” preload controls ></ audio >
When preload is employed, you can use autoplay, but I'm not sure that it makes much sense to
do so. Autoplay starts the audio playing as soon as the page loads, while preload is used to
load an audio i le before the play command is issued by the controller.
You can assign values to the preload attribute:
none : Having none as a value may seem strange, but some browsers may be set to
automatically preload audio i les. However, if the chance of using a particular audio is
remote, the developer may decide not to use Internet resources and so assigns the none
value to the preload attribute.
 
Search WWH ::




Custom Search