Video Player
Documentation and examples of the video player components.
Sizes
Fancy larger or extra larger additional sizes are also available.
Important
Space does not include all classes, but includes only used classes to reduce the size of CSS files. However, you can add more sizes by adding entries to the Sass map variable via: assets/include/scss/base/media-player/
.
Additional classes
Class | Description |
---|---|
|
Vertically center aligns the .u-media-player button to the parent class. |
Overview
With the help of a small hs.video-player.js
library, video contents are covered with an image and revealed after clicking to the play
button.
Rules are directly applied to <iframe>
, <embed>
, <video>
, and <object>
elements.
How to use?
Wrap any embed like an <iframe>
in a parent element with .u-video-player
, an ID and also an aspect ratio which triggers the player on click.
Also, add the same ID to the <iframe>
that you give in the init function of the JS.
Copy-paste the following <script>
near the end of your pages under JS Implementing Plugins to enable it.
Copy-paste the following <script>
near the end of your pages under JS Space to enable it.
Copy-paste the init function under JS Plugins Init., before the closing </body>
tag, to enable it.
This plugin works with Bootstrap's embed utility.
Methods
Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-
, as in data-target=""
.
Attribute | Description |
---|---|
|
Target attribute that fires up the video content based on the parent ID. |
|
Specify a parent for managing the video playback style. |
|
The background video type, like: YouTube or Vimeo. Set it to vimeo when a Vimeo video is included. No need to include YouTube video, as it set by default. |