X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

HTML Audio/Video DOM preload Property

HTML audio Tag Reference HTML Audio/Video DOM Reference

Example

Start loading the video as soon as the page loads:

myVid=document.getElementById("video1");
myVid.preload="auto";

Try it Yourself »

Definition and Usage

The preload property sets or returns if the audio/video should start loading as soon as the page loads.

The preload property allows the author to provide a hint to the browser about what he/she thinks will lead to the best user experience. This attribute may be ignored in some instances.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The preload property is supported in all major browsers.

Note: This property is not supported in Internet Explorer 8 and earlier.


Syntax

Set the preload property:

audio|video.preload="auto|metadata|none"

Return the preload property:

audio|video.preload

Property Values

Value Description
auto Indicates that the audio/video should start loading as soon as the page loads
metadata Indicates that only the metadata for the audio/video should be loaded when the page loads
none Indicates that the audio/video should NOT start loading as soon as the page loads

Technical Details

Return Value: A String. auto|metadata|none


HTML audio Tag Reference HTML Audio/Video DOM Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook