6 ms·
You could also use <video src="/path/to/vid.mp4" muted loop autoplay>
by germanforblack 12y ago
You could also use <video src="/path/to/vid.mp4" muted loop autoplay>
- pornel 12y agoThat's what sites do currently, but it's still not quite there yet, because it requires special markup and doesn't loop when you share the URL directly (I hope the latter can be fixed easily: https://bugzilla.mozilla.org/show_bug.cgi?id=1041238 https://bugzilla.mozilla.org/show_bug.cgi?id=1041238 https://code.google.com/p/chromium/issues/detail?id=395413 https://code.google.com/p/chromium/issues/detail?id=395413). Annoyingly GIF isn't supported as a source in <video> either, which adds extra complexity when you want to provide a proper fallback.
- TazeTSchnitzel 12y ago>doesn't loop when you share the URL directly You can deal with that server-side by checking referrers and other headers and serving HTML.
- SimeVidas 12y agoI don’t think the markup for `<video autoplay muted loop>` is an issue. These attributes exist for this use case. That being said, video in CSS background is a legit feature request.