Related Events

Similar to sharing, the related API examples below will assume that the following code is implemented:

.on('ready', function(event){
  relatedPlugin = jwplayer().getPlugin('related');
});

relatedPlugin.open();

Opens the recommendations user interface. If the displayMode is set to overlay, this will pause content if it is currently playing.

ValueDescriptionType
-No value returned-

relatedPlugin.close();

Closes the recommendations user interface. This will resume content.

ValueDescriptionType
-No value returned-

relatedPlugin.on('open');

Triggers when the recommendations interface is opened.

Returns an object with the following:

ValueDescriptionType
methodThe method used to open the plugin. (api, complete, or click)String
urlURL of the feed that was loaded into the player.String
itemsAn object of all objects that have been loaded into the related plugin.Object

relatedPlugin.on('close');

Triggers when the recommendations interface is closed.

Returns an object with the following:

ValueDescriptionType
methodThe method used to open the plugin. (api, complete, or click)string

relatedPlugin.on('play');

Triggers when a user selects an object in a related feed.

Returns an object with the following:

ValueDescriptionType
itemMetadata for the chosen item specified in the feed.Object
autoReturns true if started via autoplay; false if manually started.Boolean
positionOrdinal position of the related video that has been chosen.Number