support Contact Support | system status System Status
Page Contents

    Kollective eCDN Deployment Guide

    In this topic, you will learn the how to integrate the Kollective eCDN with Brightcove Player.

    Overview

    Brightcove has created an integration to deliver Video On Demand (VOD) and Brightcove Live events to Brightcove Players using the Kollective eCDN.

    An eCDN solution helps with content delivery to corporate networks. They relieve network bottlenecks when you have a large number of concurrent viewers watching the same content, such as in corporate offices. With eCDN, you download video content from the origin server once for each eCDN server instance. Viewers in the corporate network receive the content from the eCDN server over the LAN.

    Some of the benefits of using an eCDN include the following:

    • Reduced WAN traffic for corporate locations
    • Improved viewing experience at scale
    • Reduced network costs
    • Increased security since the eCDN is behind the corporate firewall
    • Performance monitoring

    Requirements

    The following requirements apply to the eCDN plugin:

    • You must use a Brightcove Player version 6.42.2+
    • Videos must be ingested for Dynamic Delivery

    Getting started

    To use the kollective plugin, you will need some initial setup:

    1. Deploying server-side application
    2. Installing the player plugin
    3. Whitelisting domain names
    4. Now that you have completed the deployment steps, you are ready to synchronize your content and embed the player code. For details, see the following:

    Deploying server-side application

    The backend eCDN application needs to deployed on your server.

    Server requirements

    The following requirements apply to the hosting server for the backend application.

    • NodeJS version 13+
    • Hosting server: Linux or Windows server (The backend application can also be deployed to Heroku)
    • MongoDB database

    The MongoDB can be on the same server as the hosting server, on a different server, or using a MongoDB Atlas cloud database.

    Setting configurations

    You will make a few configuration changes for the backend application. Follow these steps:

    1. In the root directory for the backend application deployment package, open the config.env file.
    2. Production mode - Set the mode to run the application in production or development.

      Either

      NODE_ENV=production

      or

      NODE_ENV=development
    3. Application port - Set the port for the application to run on.

      Example:

      PORT=3000
    4. Database - The backend application requires a MongoDB database.

      You can specify the database connection with the following format:

      DATABASE=mongodb://{host}:{port}/{databaseName}

      Example:

      DATABASE=mongodb://localhost:27017/Brightcove

      If you want to use a MongoDB Atlas cloud database, you can set it as follows:

      DATABASE=mongodb+srv://{user}:{password}@{cluster}/{databaseName}?retryWrites=true&w=majority

      Example:

      DATABASE=mongodb+srv://myuser:mypassword@cluster0-xafsz.mongodb.net/MyDatabase?retryWrites=true&w=majority
    5. Email service - The backend application requires an email service setting to send notification emails.

      SendGrid

      To send emails using SendGrid email service, use the following with your SendGrid username and password:

      # Send email using Sendgrid email service.
      EMAIL_SERVICE=SendGrid
      
      # Send email using Sendgrid email service.
      SENDGRID_USERNAME=your SendGrid username
      SENDGRID_PASSWORD=your SendGrid password
      
      Other

      To send emails using other email services, use the following with your email server host, port and username, password:

      # Set EMAIL_SERVICE=Other to send email using normal email service using host and port
      EMAIL_SERVICE=Other
      
      # Send email using host and port
      EMAIL_HOST=your email host
      EMAIL_PORT=your email port
      EMAIL_USERNAME=your email username
      EMAIL_PASSWORD=your email password
      EMAIL_FROM=your email from address
      
    6. Kollective Publish API base URL - The server-side application calls the Kollective publish API to publish a video from Brightcove with video sources to Kollective and get back a content token. Here, you specify the Kollective publish API base url:

      # Kollective publish API base url
      KOLLECTIVE_PUBLISH_API_BASE_URL=https://content.stage.kollective.app/api
      
    7. Brightcove API Base URLs - The server-side application needs the following Brightcove API base URLs:

      # Brightcove API base URLs
      BRIGHTCOVE_ACCESS_TOKEN_BASE_URL=https://oauth.brightcove.com/v4/access_token
      BRIGHTCOVE_CMS_API_BASE_URL=https://cms.api.brightcove.com/v1
      BRIGHTCOVE_LIVE_API_BASE_URL=https://api.bcovlive.io/v1
      
    8. Custom Field Names - The following custom fields name settings cannot be changed:

      # Required custom field names for each Brightcove Account ID
      CUSTOM_FIELD_KOLLECTIVE_CONTENT_TOKEN=kollective_content_token
      CUSTOM_FIELD_KOLLECTIVE_IS_SYNCHRONIZED=kollective_is_synchronized
      CUSTOM_FIELD_KOLLECTIVE_SYNCHRONIZED_TIME=kollective_synchronized_time
      CUSTOM_FIELD_KOLLECTIVE_LAST_SYNC_STATUS=kollective_last_sync_status
      

    Adding custom fields

    Next, you are ready to define the required custom fields in Video Cloud Studio.

    1. In Video Cloud Studio, expand the Admin dropdown menu and select Video Fields.

      Video Fields
      Video Fields
    2. In the Video Fields page, select the Add Custom Field button.

      Add Custom Field
      Add Custom Field
    3. Here, you will add custom fields required for Kollective.

      Custom field values
      Custom field values

      Each Brightcove Account ID to be used for a syndicator account needs the following custom field names defined for the synchronization to work:

      Brightcove Beacon Feature Summary
      Custom Field Name Type
      kollective_content_token text
      kollective_is_synchronized text
      kollective_synchronized_time text
      kollective_last_sync_status text

      In the Video Field details page, enter the following:

      • Display Name - Enter the custom field names from the table above. Save each field separately.
      • Internal Name - This is generated from the Display Name.
      • Leave the Type as Text
      • Enter a Description
      • Leave the Make this Field Required option NOT selected

    Deploying application

    After making all the required configuration changes and adding the required custom fields, you are ready to deploy the backend application to your server.

    1. Copy the server-side application package to the targeted deployment folder on your hosting server.
    2. Open a console application and go to the root folder of the application package in the previous step. Execute the following command to install all the required Node packages:

      # npm install --production
      
    3. Execute the command below to import default super-admin user:

      # npm run import-users
      
    4. To start the backend application, execute the following command:

      # npm run start
      
    5. If everything is setup correctly, then you can open the application on a browser using the configured address.

      Example:

      http://localhost:3000/login
      
    6. Log into the application with the default super-admin user imported above.

      • Username: super-admin@brightcove.com
      • Password: Br1ghtC0ve
      Server-side login
      Server-side login

    Installing the player plugin

    The Kollective plugin is a javascript file, so you can deploy it on any server that allows access to the file from outside using a public address.

    1. In the Kollective Integration github repository, locate the Kollective plugin in the kollective-player-plugin folder.

      [backend-application-root-folder]/kollective-player-plugin/k-plugin.js
      
    2. Deploy the Kollective plugin JavaScript file to your sever.

      Example:

      https://my-server/k-plugin-1.0.6.js
      
    3. Login to Brightcove's Video Cloud Studio.

    4. Navigate to the Players module. Either create a new player or use an existing one.

    5. Select the link for your player to go to the player details page.

    6. In the left-side navigation, select JSON Editor and copy the value of your policy_key. You will need this for the plugin configuration in a later step.

      Policy key
      Policy key
    7. In the left-side navigation, select Plugins. Expand the Add a Plugin dropdown menu and select Custom Plugin.

      Custom plugin
      Custom plugin
    8. For the Plugins tab, enter the following values:

      • Plugin Name: Enter the value kollective

      • JavaScript URL: The address where you deployed the Kollective plugin file

        Example:

        https://my-server/k-plugin-1.0.6.js
        
      • Options(JSON): Enter the following:

        • ksdk_url - Points to the ksdk library from Kollective
        • policy_key - Use the value of your Policy key that we copied from a previous step
        {
            "ksdk_url": "https://cdn.kollective.app/ksdk/ksdk-2.1.9.min.js",
            "policy_key": “your policy key”
        }
        
      Plugin details
      Plugin details
    9. Select the Save button.
    10. The Kollective plugin requires a specific version of jQuery. For the Scripts tab, select the Add a Script button and enter the following:

      https://code.jquery.com/jquery-3.5.1.min.js
      
      Script details
      Script details
    11. Select the Save button.
    12. Publish your player.

    Whitelisting domain names

    Kollective needs to add your domain names to their whitelist so that don't get a CORS error. Provide the following domain names to Kollective:

    • The domain name where you deployed your server-side application

    • The domain where you deployed your web pages

    For example, if you have a page at https://my-server.com/my-video-page that uses Brightcove Player with the Kollective plugin, then the my-server.com domain needs to be added to the Kollective whitelist. This will allow playback on the page without returning a CORS error.


    Page last updated on 28 Sep 2020