Set up Recommendations (iOS)
Automate the generation of a playlist based on a seed video for your iOS app.
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 view
Prerequisites
In addition to the general iOS SDK requirements, the following items are required to implement Recommendations.
Item | Notes |
---|---|
50 videos (recommended) | This is the suggested minimum number of videos that should be in your JWP library. |
RecommendationsΒ feature | If this product is not already enabled in your account, contact your JWP representative. |
Configure the Recommendations display options
Follow these steps for configuring and setting up Recommendations:
- Create a Recommendations playlist in your JWP dashboard.
- After creating the Recommendations playlist, on the DEVELOPER RESOURCES tab of your JWP dashboard, copy the JSON URL.
- Use the following recipe to configure Recommendations in your app.
For a full example, see the Recommendations best practice app.
Specifically, the ViewController.swift shows an example that incorporates associating the Recommendations feed with either a specific video or all videos played in the player.
Related Delegates
Delegate | Description |
---|---|
func playerViewController(_ controller: JWPlayerViewController, relatedMenuOpenedWithItems items: [JWPlayerItem], withMethod method: JWRelatedInteraction) | Triggers when the related view is opened |
func playerViewController(_ controller: JWPlayerViewController, relatedMenuClosedWithMethod method: JWRelatedInteraction) | Triggers when the related view is closed |
func playerViewController(_ controller: JWPlayerViewController, relatedItemBeganPlaying item: JWPlayerItem, atIndex index: Int, withMethod method: JWRelatedInteraction) | Triggers when a user selects an object in a related feed or the first item starts playing |
Updated 10 months ago