support Contact Support | system status System Status
Page Contents

    Using Delivery Rules with Brightcove Player

    In this topic, you will learn how to configure Brightcove Player to use Brightcove's Delivery Rules.

    Introduction

    Brightcove's Delivery Rules allows you to leverage the just-in-time manifest generation capability to use custom rules to control how your content is delivered to the viewer.

    For more details about Delivery Rules, see the following:

    Configuring Brightcove Player

    Delivery Rules can be configured in the Brightcove Player in the following ways:

    Player management API

    When configuring players with the Player Management API, you can set the delivery_config_id configuration property as follows:

    {
      "delivery_config_id": "abcdef",
      ...
    }

    Standard embed code

    With the standard embed code (iframe), use the deliveryConfigId query parameter:

    <iframe src="https://players.brightcove.net/.../index.html?deliveryConfigId=abcdef">

    Advanced embed code

    With the advanced embed code (in-page embed), use the data-delivery-config-id attribute:

    <video-js data-delivery-config-id="abcdef">

    Using the Catalog API

    Using Javascript, you can fetch the delivery rule by its deliveryConfigId using the Catalog API:

    var player = videojs.getPlayer('myPlayerId');
    player.ready(function () {
      var catalogParams = {
        deliveryConfigId: delivery_rules_id,
        type: 'video',
        id: video_id,
      };
    
      player.catalog.get(catalogParams, function (error, video) {
        if (error) {
          throw new Error(error);
        }
    
        player.catalog.load(video);
      });
    });

    Page last updated on 04 Dec 2020