Skip to main content

Video lists

What are the video lists?​

For recommendations purpose, a video definition — the VideoMetadata — can come with a companion list of others videos that DIVA Player proposes together. These companion lists are the video lists.

Defining video lists​

  1. In the videoMetadata JSON file, add the videoLists array:

    Check how to add the video lists array with the VideoMetadataMap in Web.

    {
    ...,
    "videoLists": [
    {
    ... first video list
    },
    {
    ... second video list
    },
    ...
    ],
    ...
    }
  2. Add as many elements to the array as there are videolists. The following fields define a videolist (i.e., an array item):

  • feedUrl (default: empty): The URL of the XML file that defines the videolist. When empty, the video list is not valid.
  • id (default: empty): The videolist identifier within analytic events.
  • highlightColor (default:"#ffff00"): The color highlighting the selected video on tablets (dark theme theme).
  • highlightColorLight (default:"#ffff00"): The color highlighting the selected video on smartphones (dark theme theme).
  • message (default: empty): The text that displays as a header within the video list (which is not the title of the tab).
  • messageNoVideo (default: empty): The text that displays when the video list is empty (it replaces message).
  • menu (default: empty): The name of the videolist that displays in the tab bar.
  • pollingInterval (default: 0): How often to poll the videolist URL for new data (milliseconds). "0" means that polling is disabled. Values between "0" and "1000" all result into a 1-second polling interval.
  • redirectOnClick (default: "false"): (HTML5 only) Whether the browser opens the video in a new page.
  • isRecommended (default: "false"): The first element with isRecommended: "true" displays in the top of End of Play view.
  • behaviour (default: "switch"): How DIVA Player behaves when selecting a new video in the videolist.
    Possible behaviors are:
ValueDescription
switchThe new selected video plays in place of the previous one.
multiviewThe new selected video plays next to currently playing video.
pipviewThe new selected video plays as a picture in picture (PiP).
multistreamSwitchThe new selected video plays in place of the previous one and synchronized with it.
multistreamMultiviewThe new selected video plays next to currently playing video. The two videos play synchronized.
multistreamPipviewThe new selected video plays as a picture in picture (PiP). The two videos play synchronized.
modal(Android and iOS only) The new selected video plays in a modal window over the currently playing video.
videoMetadata with Video lists example

{
"videoLists": [
{
"feedUrl": "https://myfeed.xml",
"id": "SWITCH",
"highlightColor": "0x00ff00",
"highlightColorLight": "0x0000ff",
"message": "Watch today's matches",
"messageNoVideo": "No video available at the moment",
"menu": "diva_switch",
"pollingInterval": 0,
"redirectOnClick": false,
"isRecommended": false,
"behaviour": "switch"
},
{
"feedUrl": "https://myfeed.xml",
"behaviour": "multistreamSwitch",
"highlightColor": "0xE65100",
"highlightColorLight": "0xff0000",
"menu": "diva_multistream",
"message": "Watch match from other cameras",
"messageNoVideo": "No video available at the moment",
"id": "MULTISTREAM"
},
{
"feedUrl": "https://myfeed.xml",
"behaviour": "modal",
"highlightColor": "0xffffff",
"highlightColorLight": "0x000000",
"menu": "modal",
"message": "Watch related videos",
"messageNoVideo": "No video available at the moment"
}
]
}

  1. For each videoLists element, write the videolist XML definition file — whose path you put into the feedUrl field — which has the following structure:

    <?xml version="1.0" encoding="UTF-8" ?>
    <rss version = "2.0">
    <channel>
    <item>
    ...
    </item>
    <item>
    ...
    </item>
    ...
    </channel>
    </rss>

    Each item tag identifies a video within the videolist and it's defined by:

    • id: DIVA Back Office video identifier
    • title: The video title that displays on the thumbnail.
    • description: The video description that displays as a tooltip when hovering over the thumbnail.
    • link: URL of the page that hosts the video.
    • videoThumbnail url: The URL of the thumbnail image.
    • live: It's the video label's background color. It can be:
      • true: For a live video and blue label's background.
      • false: For a VOD video and red label background.
    • label: Label displayed over the thumbnail without vocabulary translation.
    • adbadge: Audio Description badge (Accessibility). It can be:
      • true: If the badge is present.
      • false: If the badge is NOT present.
    • ccbadge: Closed Caption badge (Accessibility). It can be:
      • true: If the badge is present.
      • false: If the badge is NOT present.
Video list feed example

<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>My Sport RSS Channel</title>
<link>https://sport1/sitemaps/news.xml</link>
<description>Latest News</description>
<language>en-gb</language>
<lastBuildDate>2014-04-04T07:56:00Z</lastBuildDate>
<copyright>Copyright (C) Sport 1</copyright>
<item>
<id>500080_videolist</id>
<title>Match 1</title>
<description>Vod hls-v3</description>
<link>https://my-video-page.html</link>
<guid isPermaLink="false"/>
<pubDate>2014-06-11T22:25:51Z</pubDate>
<videoImage url=""/>
<videoThumbnail url=""/>
<live>false</live>
<label>On Demand</label>
<category>video</category>
<cameraType>MULTICAM</cameraType>
<cameras>TEAMB</cameras>
<adbadge>true</adbadge>
<ccBadge>false</ccBadge>
</item>
<item>
<id>500080_v4_videolist</id>
<title>Match 2</title>
<description>Vod hls-v4 without data</description>
<link>my-video-page2.html</link>
<guid isPermaLink="false"/>
<pubDate>2014-06-11T22:25:51Z</pubDate>
<videoImage url=""/>
<videoThumbnail url="https://my-video-thumbnail.jpg"/>
<category>Video</category>
<cameraType>MULTISTREAM</cameraType>
<cameras>TEAMB</cameras>
<adbadge>true</adbadge>
<ccBadge>true</ccBadge>
</item>
</channel>
</rss>