Video Background
Creates responsive video or slideshow embeds based on the width of the parent by making an intrinsic ratio that scales on any device.
How to use?
Copy-paste the stylesheet <link>
into your <head>
to load the CSS.
Copy-paste the following <script>
s near the end of your pages under JS Implementing Plugins to enable them.
Copy-paste the init function under JS Plugins Init., before the closing </body>
tag, to enable it.
Methods
Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-hs-video-bg-options='{}'
.
Parameters | Description | Default value |
---|---|---|
|
Type of video. Valid Values: you-tube , vimeo and default |
'default' |
|
For you-tube and vimeo video ID, for default - the relative path to the video files on the server |
null |
|
Determines whether the video will be played cyclically or once | true |
|
Determines the aspect ratio of the video | 1.5 |