Google Dynamic Ad Insertion (DAI)

Examples of Google DAI configurations for VOD and Live streams

License: Enterprise
Player Version:
Author: Alex Bussey | GitHub

This page demonstrates JW Player's Google Dynamic Ad Insertion (DAI) Integration for server side ad insertion.

For more information, see our Getting Started with DAI support article.

In all examples, the specified "file" is a fallback option, in the event that there is a network error, or the timeout (3000ms) is reached.

In this example, you can insert your cmsID and videoID values and click the Re-Setup Player button to setup the player with those values.

In this example, you can insert your assetKey value and click the Re-Setup Player button to setup the player with that value.

    playerInstance.setup({
  "playlist": [{
    "file": "//content.jwplatform.com/manifests/Qlh3p9ly.m3u8",
    "daiSetting": {
      "cmsID": 2477953, // your cmsID will go here
      "videoID": "tears-of-steel" // your videoID will go here
    }
  }],
  "advertising": {
    "client": "dai"
  }
});
  
    playerInstance.setup({
  "playlist": [{
    "file": "//content.jwplatform.com/manifests/Qlh3p9ly.m3u8",
    "daiSetting": {
      "assetKey": "sN_IYUG8STe1ZzhIIE_ksA" // your assetKey would go here
    }
  }],
  "advertising": {
    "client": "dai"
  }
});
  
    playerInstance.setup({
  "playlist": [{
    "file": "//content.jwplatform.com/manifests/Qlh3p9ly.m3u8",
    "daiSetting": {
      "cmsID": YOUR_CMSID_HERE,
      "videoID": YOUR_VIDEOID_HERE
    }
  }],
  "advertising": {
    "client": "dai"
  }
});
  
    playerInstance.setup({
  "playlist": [{
    "file": "//content.jwplatform.com/manifests/Qlh3p9ly.m3u8",
    "daiSetting": {
      "assetKey": YOUR_ASSETKEY_HERE
    }
  }],
  "advertising": {
    "client": "dai"
  }
});
  
Please Note: This player implementation is a Proof of Concept only provided to show the possibilities of the JW Player and Platform and should not be taken as an offer to create, edit or maintain custom integration or development.