Integrating Ooyala Pulse Ads

You can integrate Ooyala Pulse ads with Player V4 using the Ooyala Pulse Ad Plugin (pulse.min.js).
Note: Wherever you see url_where_hosted in sample code, replace this (in your code) with the URL that points to where the resource is hosted. For a list of Ooyala-hosted paths, see Ooyala-hosted Player V4 Resources. The URL can point to a location on the same host (internal link) or on a separate host (prefixed with http:// or https://). If you host resources yourself (see Hosting Player V4 Resources), be sure to check for any path dependencies within the files.

Enabling the Ooyala Pulse Ad Source for Your Account

Before you can use Ooyala's Pulse ad integration:
  1. Log into the Ooyala Customer Portal.
  2. Submit a ticket requesting that the Ooyala Pulse ad source be added to your Ooyala account.

Options for Associating Ad Tags with Your Video Assets

Once the Ooyala Pulse ad source is enabled for your account, you can associate Ooyala Pulse ads with your videos using:

These ways of setting parameters complement each other, which means that it is possible to set the same parameter in different locations. Values for parameters are read from their base location first, if present, and then read from any subsequent location where they can be set. In general, parameters set in the player override those set as custom metadata, which in turn override those set in the ad set. For a list of where each parameter can be set and where the base values are located, see Ooyala Pulse Ad Parameters.

Loading the Ooyala Pulse Plugin on the Page

Note:
  • If you use Backlot to generate your HTML embed code, and you choose the V4 HTML5 Standard Player Embed Code (recommended) option, the Ooyala Pulse plugin is automatically included and should not be explicitly added to the web page where you launch the player. For details, see Configuring Player Embed Settings in Backlot.
  • If you choose the V4 HTML5 Player Embed Code (Advanced) option in Backlot, or if you manually create the HTML embed code yourself, you need to add the Ooyala Pulse plugin to your web page so that the Ooyala Pulse plugin loads before the player is created.
For every page on which you want to use the Ooyala Pulse plugin with a player (regardless of how you associated Ooyala Pulse ads with your videos):
  1. Add the pulse.min.js script to the page where you are loading the player. You must load this plugin after you load core.min.js.
    <script language=“javascript" src="url_where_hosted/pulse.min.js"></script>
  2. Associate the player with the Ooyala Pulse ad plugin by passing in videoplaza-ads-manager as one of the player parameters during the player creation (OO.Player.create).
  3. Pass any global parameters. See Configuring Ad Parameters.

Option: Integrate with Ooyala Pulse Using Player Embedded Parameters

Pass Ooyala Pulse ad tags to the Ooyala player using the videoplaza-ads-manager parameter and its child parameters, as described in Ooyala Pulse Ad Parameters.

The following example shows how to use Ooyala Pulse page-level parameters with Player V4.

Note: The values in the following example are used only to illustrate how to use the videoplaza-ads-manager parameter. You need to replace them with your own profiles, IDs, URLs, and other values.
<!DOCTYPE html>
<html>
  <head>
    <title>Ooyala Pulse Example</title>
    <!-- V4 JS core is required. Plugins such as skin, discovery and Advertising need to be loaded separately -->
    <script src="url_where_hosted/core.min.js"></script>
    <script src="url_where_hosted/other-plugin/discovery_api.min.js"></script>
    <!-- Change these html5-skin.min.css and html5-skin.js to your local build if necessary -->
    <script src="url_where_hosted/html5-skin/build/html5-skin.min.js"></script>
    <link rel="stylesheet" href="url_where_hosted/html5-skin.min.css"/>
    <!-- A Video Plugin is required. This example shows the Main Video Plugin -->
    <script src="url_where_hosted/video-plugin/main_html5.min.js"></script>
    <!-- Ad module -->
    <script src="url_where_hosted/pulse.min.js"></script>
  </head>
  <body>
    <div id="container" style="width:640px; height:360px;"></div>
    <script>
      var playerParam = {
        "pcode": "YOUR_PCODE",
        "playerBrandingId": "YOUR_PLAYER_ID",
        "skin": {
          // Config contains the configuration setting for player skin. Change to your local config when necessary.
          "config": "url_where_hosted/skin.json"
        },
        "videoplaza-ads-manager":{
          // Pulse settings
          "pulse_host": "//pulse-host.videoplaza.tv",
          "pulse_device_container": "deviceContainer",
          "pulse_persistend_id": "persistendId",

          // Values mapped to the request settings
          "pulse_height": 640,
          "pulse_width": 360,
          "pulse_max_bitrate": 400,
          "pulse_linear_cuepoints": "5,23,34",
          "pulse_non_linear_cuepoints": "12,14,50",
          "pulse_insertion_point_filter": "onBeforeContent,playbackPosition",
          "pulse_referrer_url": "//www.ooyala.com",
          "pulse_linear_slot_size": 3,
          "pulse_max_linear_break_duration": 20,

          // Values mapped to the content metadata
          "pulse_category": "myCategory",
          "pulse_content_form": "longForm", //Can be 'longForm' or 'shortForm'
          "pulse_content_id": "myCustomId",
          "pulse_content_partner": "myContentPartner",
          "pulse_duration": 52,
          // The flags will be merged with the ones coming from the Backlot Ad Set, if any. 
          // If you want to override them completely, set pulse_override_metadata to true.
          "pulse_flags": "flag1,flag2",
          // The tags will be merged with the ones coming from the Backlot Ad Set, if any.
          // If you want to override them completely, set pulse_override_metadata to true.
          "pulse_tags": "tag1,tag2",
          "pulse_custom_parameters": {
            "key1": value1,
            "key2": value2
          },

          // Integration settings
          "pulse_override_metadata": true, // If set, all the Backlot metadata (ad set or custom) will be ignored.
          "pulse_show_ad_title": false
        }
      };
      OO.ready(function() {
        window.pp = OO.Player.create("container", "YOUR_ASSET_ID", playerParam);
      });
    </script>
  </body>
</html>

Option: Integrate with Ooyala Pulse through Backlot Custom Metadata

Add Ooyala Pulse parameters as custom metadata to individual video assets using the Backlot UI or Backlot API:
  • Backlot UI: For instructions on how to set custom metadata on an asset using the Backlot UI, see Adding Custom Metadata.
  • Backlot API: For instructions on how to set custome metadata on an asset using the Backlot API, see Custom Metadata.

Option: Integrate with Ooyala Pulse through Backlot Ad Sets

  1. Create an Ooyala Pulse ad set using:

    The required ad set field for creating an Ooyala Pulse ad set is:

    vpDomain: The host for your Ooyala Pulse account, which is derived from the "sub-domain" found in the Pulse UI. Here is how it is formulated:

    //[sub-domain].videoplaza.tv
  2. Assign an ad set to an asset or multiple assets using:
    • Backlot UI: For instructions on how to assign your Ooyala Pulse ad set to
    • Player API: With the Player API, you can only associate an ad set with an asset on your web page. To associate an ad set with an asset on multiple players you must replicate the code for each player. To associate an ad set with an asset using the Player API, see Assigning Ad Sets Dynamically.
    • Backlot API: With the Backlot API, you can associate an ad set with an asset more concretely. When you associate an asset with an ad set using the Backlot API, the asset and the ad set will be paired together on any player and page on which you play the asset. For details, see Associate Ad Set with Asset.

해당 내용이 도움 되었습니까?