Video Player
Documentation and examples of the video player components.
How to use?
Copy-paste the following <script>
near the end of your pages under JS Implementing Plugins to enable it.
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-player-options='{}'
.
Parameters | Description | Default value |
---|---|---|
|
Parent element containing the invoker initializing the plugin | null |
|
Selector into which markup will be generated for the corresponding video type | null |
|
Toggle class for element to be initialized |
classMap: {
toggle: 'video-player__played'
}
|
|
Video type you-tube , vimeo and html5 |
'you-tube' |
|
Video ID. For example, for YouTube https://www.youtube.com/watch?v=def123 - def123 is the value for this parameter. For Vimeo https://vimeo.com/56282283 - 56282283 is the value for this parameter. |
null |
|
Determines whether the video will play automatically | false |