Announcing our brand new Developer Guides and API documentation in beta! Click here to see the new docs.

Set up Video Player Bidding

Last Updated: September 6, 2019

Video Player Bidding (VPB) connects your digital video inventory directly to advertising demand sources, increasing competition for your inventory to boost your ad yield. By making an addition to the advertising object of the player, you can access the benefits of player bidding. You can use either a cloud-hosted or self-hosted player.


Requirements

  • JW Player 8.8.4+ with either a VAST or Google IMA ad client1
  • JW Player Enterprise or Developer license
  • An ad schedule
  • An account with at least one supported SSP ad partner
  • (Google IMA ad client only) If using DFP (Google Ad Manager) for mediation, DFP line items configured for VPB
  • (GDPR only) If you need to send GDPR consent through your bids, the IAB Europe Transparency and Consent Framework

1 FreeWheel is not a supported ad client.


Implementation

• If you plan to use DoubleClick for Publishers (DFP) as your mediation layer, be sure to set up line items within your Google Ad Manager account.

• Due to the potential impact on performance and user experience, while the player is waiting for the bidding process to complete, the playAd() method is not supported when using Video Player Bidding.


Use the following steps and code example to enable Video Player Bidding:

1. Within setup() of an embedded JW Player, add an advertising object.

jwplayer("myElement").setup({
  playlist: "https://cdn.jwplayer.com/v2/playlists/a12bc3D4", 
  advertising: {

  }
});


2. Define the client property within the advertising object.

jwplayer("myElement").setup({
  playlist: "https://cdn.jwplayer.com/v2/playlists/a12bc3D4", 
  advertising: {
    client: "googima"
  }
});


3. Define the adscheduleid property within the advertising object. Assign a randomly-generated, eight-character, alpha-numeric value to this property.

jwplayer("myElement").setup({
  playlist: "https://cdn.jwplayer.com/v2/playlists/a12bc3D4", 
  advertising: {
    client: "googima",
    adscheduleid: "Az87bY12"
  }
});


4. Define a schedule array within the advertising object. At the minimum, you must assign an ad tag to the tag property and assign pre to the offset property.

Alternatively, you can assign the URL of a VMAP tag to the schedule property.

jwplayer("myElement").setup({
  playlist: "https://cdn.jwplayer.com/v2/playlists/a12bc3D4", 
  advertising: {
    client: "googima",
    adscheduleid: "Az87bY12",
    schedule: [
      {
        offset: "pre",
        tag: "https://www.domain.com/adtag.xml"
      }
    ]
  }
});


5. Choose one of the following bids.settings objects. Use the advertising.bids.settings to configure this object.


// JW Player
bids: {
   settings: {
      mediationLayerAdServer: "jwp",
      floorPriceCents: 1000,
      floorPriceCurrency: "usd"
   },
}

// SpotX as Primary Adserver
bids: {
   settings: {
      mediationLayerAdServer: "jwpspotx"
   },
}

// DoubleClick for Publishers
bids: {
   settings: {
      mediationLayerAdServer: "dfp"
      buckets: [
        {
          min: 0,
          max: 25,
          increment: 0.50
        }
     ]
   },
}

// JW Player + DFP
bids: {
  settings: {
    mediationLayerAdServer: "jwpdfp",
    floorPriceCents: 1000,
    buckets: [
      {
        min: 0,
        max: 25,
        increment: 0.50
      }
    ]
  },
}


6. Add the configured bids object to the advertising object.

jwplayer("myElement").setup({
  playlist: "https://cdn.jwplayer.com/v2/playlists/a12bc3D4", 
  advertising: {
    client: "googima",
    adscheduleid: "Az87bY12",
    schedule: [...],
    bids: {
      settings: {
        mediationLayerAdServer: "jwpdfp",
        floorPriceCents: 1000,
        buckets: [
          {
            min: 0,
            max: 25,
            increment: 0.50
          }
        ]
      },
    }
  }
});

If you use DFP for mediation, be sure to set up line items within your Google Ad Manager account.


7. Add a bidders array to the bids object that defines the applicable name, id, pubid, and type for one or more ad partners. Use the advertising.bids.bidders to configure this object.

jwplayer("myElement").setup({
  playlist: "https://cdn.jwplayer.com/v2/playlists/a12bc3D4", 
  advertising: {
    client: "googima",
    schedule: [...],
    adscheduleid: "Az87bY12",
    bids: {
      settings: {...},
      bidders: [
        {
          name: "EMX",
          pubid: "12345",
          id: "12346",
          type: "OpenRTB",
        }
      ]
    }
  }
});


8. (Optional) If you use SpotX as an ad partner, you can add an optionalParams object to append custom parameters to the ad tag.

jwplayer("myElement").setup({
  playlist: "https://cdn.jwplayer.com/v2/playlists/a12bc3D4", 
  advertising: {
    client: "googima",
    adscheduleid: "Az87bY12",
    schedule: [...],
    bids: {
      settings: {...},
      bidders: [
        {...},
        {
          name: "SpotX",
          id: "85394",
          optionalParams: {
            custom: {
              name: "custom_param_name_goes_here",
              value: "custom_param_value_goes_here"
            }
          }
        }
      ]
    }
  }
});

9. (Optional) Use the Player configuration reference to add additional Video Player Bidding options.



Full code sample

jwplayer("myElement").setup({
  playlist: "https://cdn.jwplayer.com/v2/playlists/a12bc3D4", 
  advertising: {
    client: "googima",
    adscheduleid: "Az87bY12",
    schedule: [
      {
        offset: "pre",
        tag: "https://www.domain.com/adtag.xml"
      }
    ],
    bids: {
      settings: {
        mediationLayerAdServer: "jwpdfp",
        floorPriceCents: 1000,
        buckets: [
          {
            min: 0,
            max: 25,
            increment: 1
          }
        ]
      },
      bidders: [
        {
          name: "EMX",
          pubid: "12345",
          id: "12346",
          type: "OpenRTB"
        },
        {
          name: "SpotX",
          id: "85394",
          optionalParams: {
            custom: {
              name: "custom_param_name_goes_here",
              value: "custom_param_value_goes_here"
            }
          }
        }
      ]
    }
  }
});