<img src="https://img.shields.io/badge/%20-ENTERPRISE-%23B10031" style="float:left"/><br />

<br />

If you have hundreds of videos hosted on or registered with your account, Recommendations automates the generation of a playlist based on a seed video and provides you options to customize the appearance and behavior of that playlist.


Screenshot of Recommendations overlay

<br /> <hr />

## Requirements

In addition to the general Android SDK requirements, the following items are required to implement Recommendations.

**50 videos**(Recommended) This is the suggested **minimum** number of videos that should be in your JWP library.
**Android 5 (API level 21)**Your app must be running at least this minimum OS version.
**Recommendations feature**If this product is not already enabled in your account, contact your JWP representative.

<br /> <hr />

## Configure the Recommendations display options

The following steps explain how to create the Recommendations overlay:

  1. Create a <a href="https://docs.jwplayer.com/platform/docs/vdh-create-a-recommendations-playlist" target="_blank">recommendations</a> playlist in your JWP dashboard.

  2. After creating the recommendations playlist, on the **DEVELOPER RESOURCES** tab of the JWP dashboard, copy the **JSON URL**.

  3. In your app, use `Related.Config.Builder()` to create and name a `RelatedConfig` object, for example, `related`.

  4. Add the JSON URL (`file`). Be sure to change the value of the `?related_media_id=` query to match the media ID of the `playlistItem.file` URL.

  5. (Optional) Define `autoPlayTimer`. This creates a break between the playback of videos and enables the countdown overlay to appear. The default value is `10` (seconds).

  6. (Optional) Define `onComplete` as `RELATED_ON_COMPLETE_AUTOPLAY`. This property helps to extend a user's viewing session.

  7. (Optional) Use `autoPlayMessage` property to define the message that displays when the countdown overlay appears. We suggest using `__title__ will begin in xx seconds`.<br /><br />The countdown message appears above the title and description of the next video to play. The default message is _Next up in xx_. In the default message, `xx` represents the number of seconds remaining in the countdown as defined by `autoPlayTimer`.


Screenshot of the autoplay message

<br />

  1. Add `related` to `config`.

<br />

<br /> <hr />

## Related Overly API Methods

**closeRelatedOverlay()**Closes the related videos overlay if the current video/playlist has a related feed enabled and is shown
**openRelatedOverlay()**Opens the related videos overlay if the current video/playlist has a related feed enabled<br /><br />If the video is still playing it will pause

<br /> <hr />

## Related Overlay Callbacks

**onRelatedClose(RelatedCloseEvent relatedCloseEvent)**Triggers when the related plugin is closed
**onRelatedOpen(RelatedOpenEvent relatedOpenEvent)**Triggers when the related overlay is opened
**onRelatedPlay(RelatedPlayEvent relatedPlayEvent)**Triggers when a user selects an object in a related feed or the first item starts playing

<br />

<!-- Removes the automatic page-to-page navigation at the bottom of the page -->

<style> .rm-Pagination { display: none; } </style>