Please note, this is a STATIC archive of website www.themepunch.com from 28 Sep 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Play Video Button

play-video-button

Play a video that exists on one slide layer by clicking a button from a separate layer.
In this example, the video would be hidden from view until the "Play Button" is clicked.

Normally when a video is added to a slider, either the video itself is visible, or the video’s “poster” would show.  But if you wanted to hide the video initially, and then add a discrete “Play Video” button to the slide, which would then show and play the hidden video, this can be achieved with custom classes, CSS, and using the slider’s API.

1. Add an HTML5 Video layer to the slide, and then add a second layer for your play button.

two-layers

2. Make sure the Play button has a lower z-index than the HTML5 Video.

play-button-zindex

3. Add classes for both layers.

3.1 Add "play-button" Class for the button layer:
play-button-class
3.2 Add "my-video" Class for the video layer:
video-class

4. From the slider's main settings page, scroll to the CSS/JavaScript section, and add the following code:

4.1 Custom CSS

4.2 Custom JavaScript

In the above JavaScript, you’ll notice a “revapi1” part in two places.  This will need to be altered to represent the api name for your particular slider.  To find this name, directly above the “Custom CSS/JavaScript” section, click the “API Functions” section, and you’ll see the “revapi” name for your slider:

revapi-name