HTML and CSS Reference
In-Depth Information
loop
The loop attribute is another Boolean attribute. As you would
imagine, it loops the media playback. Support is flaky at the
moment, so don't expect to be able to have a short audio sam-
ple and be able to loop it seamlessly. Support will get better—
browsers as media players is a new phenomenon.
preload
Maybe you're pretty sure that the user wants to activate the
media (she's drilled down to it from some navigation, for exam-
ple, or it's the only reason to be on the page), but you don't
want to use autoplay . If so, you can suggest that the browser
preload the video so that it begins buffering when the page
loads in the expectation that the user will activate the controls.
<video src=leverage-a-synergy.ogv controls preload>
</video>
There are three spec-defined values for the preload attribute.
If you just say preload , the user agent can decide what to do.
A mobile browser may, for example, default to not preloading
until explicitly told to do so by the user. It's important to remem-
ber that a web developer can't control the browser's behavior:
preload is a hint, not a command. The browser will make its
decision based on the device it's on, current network conditions,
and other factors.
preload=auto (or just preload )
This is a suggestion to the browser that it should begin
downloading the entire file.
preload=none
This state suggests to the browser that it shouldn't preload
the resource until the user activates the controls.
preload=metadata
This state suggests to the browser that it should just
prefetch metadata (dimensions, first frame, track list, dura-
tion, and so on) but that it shouldn't download anything fur-
ther until the user activates the controls.
 
Search WWH ::




Custom Search