Slideshow Plugin

GOLD
The Slideshow plugin is only an 8 kB script that allows you to present a series of still images in a specific order with background music.
You need to load the plugin and initialize it as explained below. The only required plugin's parameters are a list of images to slide and an audio file URL.
In the example below, we included the class "vjs-16-9," which ensures the player maintains the 16:9 aspect ratio. You can use other sizing options using classes "vjs-4-3," "vjs-9-16," "vjs-1-1" or define your own fixed width and height in pixels.
Code snippet
<audio id="my_slideshow" class="video-js vjs-16-9" controls playsinline></audio>

<link href="/videojs/skins/treso/videojs.min.css" rel="stylesheet" type="text/css" />
<script src="/videojs/video.min.js></script>
<script src="/videojs/nuevo.min.js></script>
<script src="/videojs/plugins/nuevo slideshow.js></script>

<script>
const slides = [....];
const player=videojs("my_slideshow");
player.nuevo();
player.slideshow({slides:my_slides, sound:"//audio-url/mp3"})
</script>
Of course you have to fill out the `slides` array with a list of still images to slide, e.g.
Code snippet
const slides = [
{ src:"//slide1-url.jpg" },
{ src:"//slide2-url.jpg" },
{ src:"//slide3-url.jpg" }
]
Each slide may have separate caption, displayed at the bottom of the slide.
Code snippet
{ src:"//slide1-url.jpg", caption:"slide-caption" },
Apart of caption you can also display credits.
Code snippet
{ src:"//slide1-url.jpg", caption:"slide-caption", credits:"© Copyright: ..." },
By default, slides fade seamlessly into each other. However, there are six other transitions you can choose from, or even randomize transitions between slides. Below you can test transitions and watch the code used.

player.slideshow({src:my_slides, sound:"//audio-url/mp3"});

Slides change every five seconds by default. You can set any other interval value.
Code snippet
player.slideshow({src:my_slides, sound:"//audio-url/mp3", timeout:10});
Slides are showing on a black background color. It is suggested to use your website's page background color. In the demo above we have changed the background color from "black" to "white."
Code snippet
player.slideshow({src:my_slides, sound:"//audio-url/mp3", background:"#FFFFFF"});
And the last parameter available for use is shuffle. If this parameter is enabled, the list of images to slide will be randomized each time your website page with the slideshow is visited.
Code snippet
player.slideshow({src:my_slides, sound:"//audio-url/mp3", shuffle:true});
Of course, you can set multiple plugin's parameters, separated by a coma.