This tutorial will guide you how to create a video player that plays a random video from a predefined video list.
There are three steps in this tutorial:
- Step 1 - Install Wonder Gallery
- Step 2 - Create the video player
- Step 3 - Add the player to a WordPress page or post
An online demo is as follows. Each time you refresh or reload the page, it will load a random video from a predefined video list. You can add HTML5 mp4 videos, YouTube or Vimeo videos to the playlist.
Step 1 - Install Wonder Gallery
First please install the WordPress premium plugin Wonder Gallery. You can download the free version from the plugin home page, test it, make sure it works for you before upgrading to the commercial version.
Step 2 - Create the video player
In Wonder Gallery, create a new gallery, in step 1, you can click the button
Add YouTube or
Add Vimeo to add HTML5 mp4 videos, YouTube videos or Vimeo videos.
In step 3 Options tab, Gallery Options, select the option
Random. This option will select a random video from the playlist as the first video.
In step 3 Options tab, Gallery Options, change the option
Button display mode to
Hide. This option will hide the left/right navigation arrows on the gallery.
In step 3 Options tab, Advanced Options, add the following code to the Data Options input box. This option will hide the thumbnails of the gallery.
Step 3 - Add the player to a WordPress page or post
Save and publish the gallery, add the provided the shortcode to a WordPress page or post.