Skip to content

Instantly share code, notes, and snippets.

View Malvoz's full-sized avatar
:octocat:
Busy

Robert Linder Malvoz

:octocat:
Busy
  • Sweden
View GitHub Profile
@Malvoz
Malvoz / new-video-capabilities.md
Last active January 10, 2020 12:28
Use case(s) for expanded capabilities of the <video> element.

People have asked for extended capabilities of HTML videos, this Gist is used to showcase a somewhat niched use case that incorporates theoretical capabilities as suggested in the issues raised by others, as mentioned below.

Use case:
Autoplay a background-video only on screens larger than 1000px (where the user hasn't set a preference to reduce motion), if the user prefers reduced motion and/or is on a smaller device then show the poster image instead.

<!-- 1) -->
<video autoplay muted playsinline>