A video banner plays on its own, with the sound off, and it loops. There is no play bar and no logo. Here are some of the hosts you could try: Vimeo, Pexels, and Dropbox.
Add a Code Editor module on a full-width row (12/12), paste the snippet, and save. The banner stretches to the edges of the screen.
Platforms you can use
- Vimeo
- Pexels
- Dropbox
YouTube is a poor fit for a banner. The logo stays, and a play button appears each time the video loops.
Vimeo
- Open the video in Vimeo and select Share.
- Under Privacy, turn Embeddable on.
- Open Embed. Under Where can this be embedded?, choose Anywhere, or Specific domains and add your store domain.
- Use the player link, not the vimeo.com watch link. Add
background=1.
Page: https://vimeo.com/191156544
Player: https://player.vimeo.com/video/191156544?background=1
Code
<div style="position:relative;left:50%;width:100vw;height:420px;margin-left:-50vw;overflow:hidden;background:#000;">
<iframe
src="https://player.vimeo.com/video/191156544?background=1"
style="position:absolute;top:50%;left:50%;width:100vw;height:56.25vw;min-height:420px;min-width:746px;transform:translate(-50%,-50%);border:0;"
frameborder="0"
allow="autoplay; fullscreen"
allowfullscreen>
</iframe>
</div>
Sample output
Pexels
- Open the video page on
www.pexels.com. Do not go tovideos.pexels.com. - Right-click the video.
- Choose Copy video link.
- Paste that link into the
srcin the code below. It looks likehttps://www.pexels.com/download/video/39339768/.
That link is the full-size file, often 4K. For a short clip that is fine. For a long video, click the arrow beside Free download, choose HD 1280×720, then right-click the words Download Selected Size and choose Copy Link. That item is in the size list, not in the menu on the video.
Pexels videos are free to use on a website. Credit is optional. A clip of a few seconds is a better banner than a long file, because every visitor downloads the whole file.
Code
<div style="position:relative;left:50%;width:100vw;height:420px;margin-left:-50vw;overflow:hidden;background:#000;">
<video autoplay muted loop playsinline style="position:absolute;top:50%;left:50%;width:100%;height:100%;object-fit:cover;transform:translate(-50%,-50%);">
<source src="https://www.pexels.com/download/video/39339768/" type="video/mp4">
</video>
</div>
Sample output
Dropbox
- In Dropbox, share the MP4 with anyone who has the link.
- Copy the share link. It opens the Dropbox preview and ends in
dl=0. A banner cannot play that link. - Change the host from
www.dropbox.comtodl.dropboxusercontent.com, and changedl=0todl=1. - Leave the share in place. If it is removed, the banner goes blank. Dropbox can also throttle the link, so for a busy live site an uploaded MP4 or Vimeo is the better host.
Preview link (will not play in a banner):
https://www.dropbox.com/scl/fi/cj19lqc03x3upyjrde5ig/15840613_1920_1080_30fps.mp4?rlkey=7ogj0i38yh1vw72cyti7ievu6&dl=0
Direct file:
https://dl.dropboxusercontent.com/scl/fi/cj19lqc03x3upyjrde5ig/15840613_1920_1080_30fps.mp4?rlkey=7ogj0i38yh1vw72cyti7ievu6&dl=1
Code
<div style="position:relative;left:50%;width:100vw;height:420px;margin-left:-50vw;overflow:hidden;background:#000;">
<video autoplay muted loop playsinline style="position:absolute;top:50%;left:50%;width:100%;height:100%;object-fit:cover;transform:translate(-50%,-50%);">
<source src="https://dl.dropboxusercontent.com/scl/fi/cj19lqc03x3upyjrde5ig/15840613_1920_1080_30fps.mp4?rlkey=7ogj0i38yh1vw72cyti7ievu6&dl=1" type="video/mp4">
</video>
</div>