Video page header
If wish to use a video hero in place of the embedded image or call to action component on a page:
- Drag and drop a HTML component below the empty embedded Image or Call to Action component
- Click on the html component to open its toolbar
- Click the wrench icon in the toolbar
- Click in the CSS Class field and type: vt-vidHeader
- Click In the HTML field and paste the code snippet below
- Select the videoSource link text between the quotes and replace with the path to your video in the site's assets folder, e.g., /content/dam/sitename_vt_edu/video.mp4
- Select the videoHeader text between the quotes and replace with your text header
NOTE - If this option is skipped the video will appear without a heading overlay - Select the videoCaption text between the quotes and replace with your text caption
NOTE - If this option is skipped the video will appear without a caption below the heading overlay - Check to make sure the items above are contained in quotes ("") and add if necessary
- Click the checkmark in the top-right of the dialog to accept the changes
<!-- copy everything below -->
<script>
var videoSource = "/content/dam/path/to/your/video.mp4",
videoPoster = "/content/dam/alumni_vt_edu/video/helmet-research-poster.jpg",
videoHeader = "",
videoCaption = "";
</script>
<video playsinline="" autoplay="" loop="" id="vt_bgVid" muted="">
</video>
<button class="vt-vidPlayPause vt-pauseButton" onclick="javascript:playPause()"><span class="vt-playPause-text sr-only">Pause button</span></button>
<div class="vt-vid-overlay-column">
<div class="vt-vid-overlay-row">
<div class="vt-vid-overlay">
<span class="vt-vid-header"></span>
<p class="vt-vid-subhead"></p>
</div>
</div>
</div>
<!-- copy everything above -->
Utility classes for vt-vidHeader:
- vt-overlay-light -> all text colors become white
- vt-overlay-dark -> all text colors become black
...then there are nine positions (top, middle, bottom, left, right) that are represented:
- vt-overlay-topLeft
- vt-overlay-topRight
- vt-overlay-middleLeft
- vt-overlay-middleRight
- vt-overlay-bottomLeft
- vt-overlay-bottomRight
...example usage in "CSS class" field of HTML component configuration dialog:
vt-vidHeader vt-overlay-dark vt-overlay-bottomLeft