Atributo de pré -carregamento de HTML <video>

❮ Tag HTML <vídeo>

Exemplo

O autor acha que o vídeo NÃO deve ser carregado quando a página for carregada:

<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>

Definição e uso

O preloadatributo especifica se e como o autor acha que o vídeo deve ser carregado quando a página for carregada.

O preloadatributo permite que o autor forneça uma dica ao navegador sobre o que ele acha que levará à melhor experiência do usuário. Este atributo pode ser ignorado em alguns casos.

Nota: O preloadatributo é ignorado se autoplayestiver presente.


Suporte ao navegador

Os números na tabela especificam a primeira versão do navegador que suporta totalmente o atributo.

Attribute
preload 4.0 9.0 4.0 3.1  10.5

Sintaxe

<video preload="auto|metadata|none">

Valores de atributo

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

❮ Tag HTML <vídeo>