HTML <video> preload - Attribut
Beispiel
Der Autor ist der Meinung, dass das Video NICHT geladen werden sollte, wenn die Seite geladen wird:
<video controls preload="none">
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
Definition und Verwendung
Das preload
Attribut gibt an, ob und wie der Autor denkt, dass das Video geladen werden sollte, wenn die Seite geladen wird.
Das preload
Attribut ermöglicht es dem Autor, dem Browser einen Hinweis darauf zu geben, was seiner Meinung nach zur besten Benutzererfahrung führt. Dieses Attribut kann in einigen Fällen ignoriert werden.
Hinweis: Das preload
Attribut wird ignoriert, wenn
autoplay
es vorhanden ist.
Browser-Unterstützung
Die Zahlen in der Tabelle geben die erste Browserversion an, die das Attribut vollständig unterstützt.
Attribute | |||||
---|---|---|---|---|---|
preload | 4.0 | 9.0 | 4.0 | 3.1 | 10.5 |
Syntax
<video preload="auto|metadata|none">
Attributwerte
Value | Description |
---|---|
auto | The author thinks that the browser should load the entire video when the page loads |
metadata | The author thinks that the browser should load only metadata when the page loads |
none | The author thinks that the browser should NOT load the video when the page loads |
❮ HTML <video>-Tag