Before you read this part, make sure that you already read the Videos article in the Slider Settings.
You can easily embed self-hosted video or audio into a layer. Read below how to make that.
Getting started
You can place your own videos into the LayerSlider. It is possible by the HTML5 Video tag. There are 3 file types possible to make it:
- MP4
- WebM
- OGG
Video compatibility table
Let's see the short example code by W3:
With this code we only embed a video in 2 formats, and also placed a notification text for the older browsers, which are not able to show this video. As you can see a special attribute is placed in the opening video tag as well, the controls. With this custom parameter not only the video will appear but a control bar as well to able to stop, replay the movie. There are more custom attributes for this tag, see below:
Video tag attributes
Self-hosted audio files
Of course that HTML5 standard is not only able to embed videos directly into the source code, but audio files as well. This is possible by the audio tag. It is working similar like described the previous above, however it has less aditional attributes. Check the embedding code and browser compatibility list below:
Audio compatibility table
All the sources, attribute list, and compatibility table comes from the W3 pages: Video tag and Audio tag.