# Recommended Content

Note

This feature is available only to ByteArk Video Cloud for Business customers. Please contact sales@byteark.com if you would like to use it.

ByteArk Player supports showing recommended content. By default the recommendations appear when a video ends, but viewers can also bring up the recommendation panel during playback by clicking the Recommend Content button on the control bar.

Recommended Content

# Options

Name Type Required Description
recommendations Array No List of recommended content items
recommendations[].title String Yes Title of the recommended item
recommendations[].image String Yes Thumbnail URL
recommendations[].url String No URL to redirect to when clicked
recommendations[].listener Function No Callback fired when the item is clicked

# Example

<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
  </head>
  <body>
    <div id="video-player"></div>
    <script src="https://byteark-sdk.cdn.byteark.com/player/v2/byteark-player.min.js"></script>
    <script>
      var player = bytearkPlayer('video-player', {
        fluid: true,
        recommendations: [
          {
            title: 'Recommended Video 1',
            image: '/assets/samples/player/images/recommend-1.jpg',
            url: 'https://example.com/video/1',
          },
          {
            title: 'Recommended Video 2',
            image: '/assets/samples/player/images/recommend-2.jpg',
            listener: function() {
              console.log('Recommended Video 2 clicked');
            },
          },
        ],
        sources: [{
          title: 'Big Buck Bunny',
          src: '<MEDIA_URL>',
          type: 'application/x-mpegURL'
        }]
      });
    </script>
  </body>
</html>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34