.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
{
"visible": false,
"method": "interaction_more",
"relatedFile": "https://cdn.jwplayer.com/feed.json?feed_id=9qjYmZBC&related_media_id=Zb9M8K61",
"onclick": "link"
}
| Value | Description |
|---|---|
| method string | Method used to open the plugin |
| onclick string | Behavior when a related video is selected
See: onclick (Related) |
| relatedFile string | URL of the feed loaded into the player |
| visible boolean | Indicates viewability of the related plugin
This value is always false.
|
("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 |
