Chrome html-video invisible start playing until I

2019-08-29 12:47发布

I have built a site trying to play a video as a big background image.The element is invisible until i start scrolling. I have no javascript.

<!DOCTYPE html>

<video class="background_video" poster="video/rain.jpg" autoplay muted="true" preload="auto" >
  <source type="video/mp4" src="video/rain.mp4">
  <source type="video/ogv" src="video/rain.ogv">
  <source type="video/webm" src="video/rain.webm">
</video>

1条回答
Emotional °昔
2楼-- · 2019-08-29 13:40

Seems to be a bug with chrome and use of the poster-attribute. Found the js in the reply on this one do the trick.

video disappears when poster attribute and preload is defined

查看更多
登录 后发表回答