Related Content API

The Related Content API contains the following objects and interfaces for configuring and displaying a set of related content videos as tiles on the player UI. This API is available from version 2.14.2 onward and only if you have a player with this feature enabled.

RelatedContent

 The related object provides the following properties and event:

Properties

Property Type Description
showing boolean The showing property indicates whether the related content menu is showing or not.
show  void When the show method is called, the related content menu will be displayed.
hide  void When the hide method is called, the related content menu will be hidden.
sources RelatedContentSource[] The sources property can be used to get or set an array of RelatedContentSources that contain information on related content videos such as a clickthrough link, poster image title, and duration of the video. 

Events

The related object exposes the following events:

Event Description
relatedchange Thrown to indicate when a new set of sources is specified for related content. This will display a related content button on the UI


RelatedContentSource

The RelatedContentSource interface contains information about one specific related source. A RelatedContentSource will be discarded if it does not specify either a 'source' or a 'link'. In cases where both the properties are specified, the source will take precedence over the link. 

Properties

An object implementing the RelatedContentSource interface should provide the following properties.

Property Type Optional Description
duration string yes The duration property can be used to display a duration on the tile of the related content video.
image string no The image property can be used to set the background image on the tile of the related content video.
link string yes The link property can be used to specify a target URL to navigate to, when clicking the tile of the related content video. Specifying a link will redirect to a new page.
source SourceDescription yes A source object specifying the source to play. Specifying a source will reset the player's SourceDescription and allow the same player to play the new source without the need to redirect to a new page.
title string  yes The title property can be used to display a title on the tile of the related content video.