HTML Audio / Video DOM preload property
HTML Audio / Video DOM Reference
Examples
Once the page is loaded, it begins to load the video:
myVid=document.getElementById("video1");
myVid.preload="auto";
myVid.preload="auto";
try it"
Definition and Usage
preload property sets or returns whether the page is loaded immediately after loading audio / video.
preload attribute allows authors hint about his / her think it will bring the best user experience to the browser. This attribute is ignored in some cases.
Browser Support
All major browsers support preload property.
Note: 8 and earlier versions of Internet Explorer does not support this property.
grammar
Setting preload properties:
audio|video .preload="auto|metadata|none"
Back preload attributes:
audio|video .preload
Property Value
值 | 描述 |
---|---|
auto | 指示一旦页面加载,则开始加载音频/视频。 |
metadata | 指示当页面加载后仅加载音频/视频的元数据。 |
none | 指示页面加载后不应加载音频/视频。 |
technical details
返回值: | 字符串值,auto|metadata|none |
---|
HTML Audio / Video DOM Reference