Problem/Motivation

We've just added a video component, which works nicely on its own. The other obvious use would be as an alternative to an image in the hero billboard.

This is a bit fiddly because it will require adding a bunch of props to the hero billboard that only apply to video, not totally sure of the best way to handle this. We could assume a things since it's a hero, for example that it should be muted and autoplay.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

pameeela created an issue. See original summary.

pameeela’s picture

Status: Active » Needs review

Pushed a WIP of this. I think it works, just needs a closer eye and some testing, especially for regressions to the image version. I think that using compound variants means it should be unchanged but I had to make a few other changes.

ravi kant’s picture

Adding a video option to the hero billboard is a good approach.

chroid’s picture

Tests great our end.

It did take me a bit longer than it should have to realise that the video poster flicks out to use the Background image - so I wonder if there's a benefit in providing some detail in the titling there or otherwise?

"Background image OR Poster image (if video used)"

Would it be too insane to allow the video poster attribute to fallback to an empty value if NO background image exists, which will (generally) provide the first frame of the video, making the transition to autoplay a little smoother?

In addition, autoplay on seems like a reasonable default, and by association muted (browser may block autoplay if not muted)?