Enable Google DAI playback (Web Player)

Enable ad playback with the Google Dynamic Ad Insertion ad client


JWP's Google IMA Dynamic Ad Insertion (DAI) integration allows you to deliver ads and content within a single manifest. By eliminating the buffering between ads and content, this single manifest improves the user experience. After acquiring the required items listed in the Requirement section, you can enable Google DAI ad playback in your web player content.



Requirements

  • JWP advertising requirements

  • Google's Ad Manager 360 Advanced

  • Google account information listed in the following table

    PropertyDescription
    assetKey* string(Required - Live Stream) Stream asset key, used for live streams

    You can find this ID in your Google Ad Manager portal. Ask your Google representative for assistance locating this ID.
    cmsID* string(Required - Video on Demand) Content management system ID of the video, used for video on demand

    You can find this ID in your Google Ad Manager portal. Ask your Google representative for assistance locating this ID.
    videoID* string(Required - Video on Demand) Identifier of the DAI video to be displayed, used for video on demand

    You can find this ID in your Google Ad Manager portal. Ask your Google representative for assistance locating this ID.
    adTagParameters 8.18.3+ objectLimited set of key-value pairs that enable the player to override default information with custom information during a stream request

    See: Supply Targeting Parameters to Your Stream.
    apiKey stringStream request API key
    assetFormat stringStream format to request

    Possible Values:
    • hls (default)
    • dash


Configure the player setup

🚧

For the following reasons, be sure that the URL used for the playlist[].file is consistent with the media content registered with Google DAI for your videoID or assetKey:

  • If the DAI request fails, the video URL will play as a fallback.
  • Analytics will be attributed to correct media item.

Use the following steps to set up dynamic ad insertion for a single playlist item:

  1. For a specific playlist item, define a daiSetting object with your Google account information.

    • If you are displaying a video on demand (VOD), define cmsID and videoID
    • If you are displaying a live stream, define assetKey.
  2. If your content is protected, set the apiKey property within the daiSetting object.

  3. In the advertising object, set "client": "dai".

    {
      "playlist": [{
        "file": "//cdn.jwplayer.com/manifests/{media_id}.m3u8",
        "daiSetting": {
          "cmsID": "{cms_id}",
          "videoID": "{video_id}",
          "apiKey": "api_key" // this is optional
        }
      }],
      "advertising": {
        "client": "dai"
      }
    }
    
    {
      "playlist": [{
        "file": "//cdn.jwplayer.com/manifests/{media_id}.m3u8",
        "daiSetting": {
          "assetKey": "{asset_key_id}",
          "apiKey": "{api_key}" // this is optional
        }
      }],
      "advertising": {
        "client": "dai",
      }
    }