Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You could also use <video src="/path/to/vid.mp4" muted loop autoplay>


That'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://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.


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


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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: