Related Events

.on('relatedReady')

Indicates event that triggers when the Related plugin is ready. This is the earliest point at which any API calls should be made.

Returns an object with the following:

{
    "type": "relatedReady"
}
Value Description
type string Category of the player event

This is always relatedReady.


The following events on this page require that the following code is implemented.

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


("related").on('open')

Triggers when the recommendations interface is opened.

Returns an object with the following:

Value Description
items object Object of all objects that have been loaded into the Related plugin
method object Method used to open the plugin
url object URL of the feed that was loaded into the player


("related").on('close')

Triggers when the recommendations interface is closed.

Returns an object with the following:

Value Description
method object Method used to open the plugin


("related").on('play')

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

Returns an object with the following:

Value Description
auto boolean Returns true if started via autoplay; false if manually started
item object Metadata for the chosen item specified in the feed
position number Ordinal position of the related video that has been chosen