Videojs Related Videos container

Setup related videos for the Videojs player with Nuevo plugin

In the video example above, the Nuevo plugin allows you to display related videos container with video thumbnails and links to the appropriate video URL for each. A related container appears on the screen when you select the "Related" item from the Settings menu. You can define an unlimited number of related videos, and the minimum is two related videos. On desktop computers, you can scroll related video items using navigation arrows; on touch devices, use your finger to scroll for the next or previous set of related video items.Information about related video details must be defined as objects in the Javascript array. Check out the code example below to see how it can be done.

Prepare an array of related videos

Code snippet
var related_videos = [
{thumb: '//',url: '//', title: 'Video 1 title', duration: '05:30'},
{thumb: '//',url: '//', title: 'Video 2 title', duration: '05:30'},
{thumb: '//',url: '//', title: 'Video 3 title', duration: '05:30'},
{thumb: '//',url: '//', title: 'Video 4 title', duration: '05:30'},
{thumb: '//',url: '//', title: 'Video 5 title', duration: '05:30'},
{thumb: '//',url: '//', title: 'Video 6 title', duration: '05:30'}

Nuevo plugin setup code

Once the related_videos array is defined, you can assign it as a related option among other Nuevo plugin's options, like in the player setup code below for one video available in multiple resolutions.

Code snippet
var player = videojs('example_video_1');
logo: '//',
logourl: '//',
related: related_videos

Show Related programmatically

The Nuevo plugin features a public function player.related(), which allows to show related videos container programmatically. For example, if you wish to display a related container on each pause event:
Code snippet
player.on("pause", function(){