AD is not working on Web Player

Hello there,

I was attempting to add ads to my web player by following the guide Setting up Ads with the Web Player.
However, the provided code does not seem to work, even when I ran the example in CodeSandbox Demo at preroll-static-config - CodeSandbox you provided.

But when I tested the same Ad URL in the demo provided by Google at IMA HTML5 Video Suite Inspector, it worked perfectly fine.
Upon further inspection, I found that the Ad request and response differ between the Bitmovin and Google demos.

The responses for both
Bitmovin

<?xml version="1.0" encoding="UTF-8"?>
<VAST xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vast.xsd" version="3.0"/>

Google

<?xml version="1.0" encoding="UTF-8"?>
<VAST xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vast.xsd" version="4.0">
 <Ad id="697200496">
  <InLine>
   <AdSystem>GDFP</AdSystem>
   <AdTitle>External NCA1C1L1 LinearInlineSkippable</AdTitle>
   <Description><![CDATA[External NCA1C1L1 LinearInlineSkippable ad]]></Description>
   <Error><![CDATA[https://pubads.g.doubleclick.net/pagead/interaction/?ai=BFGc4qBOQZJKJFcmQpt8PvOi3wAeQ1Y_rBgAAABABIKjduyY4AViwlILG1wFgnQGyARNnb29nbGVhZHMuZ2l0aHViLmlvugEKNzI4eDkwX3htbMgBBdoBNGh0dHBzOi8vZ29vZ2xlYWRzLmdpdGh1Yi5pby9nb29nbGVhZHMtaW1hLWh0bWw1L3ZzaS_AAgLgAgDqAiUvMTI0MzE5MDk2L2V4dGVybmFsL3NpbmdsZV9hZF9zYW1wbGVz-AKC0h6AAwGQA7AJmAOsAqgDAeAEAdIFBhDw3rnMApAGAaAGI6gHmgaoB_PRG6gHltgbqAeqm7ECqAeDrbECqAf_nrECqAffn7EC2AcB4AcB0ggUCIBhEAEYHTICigI6AoBASL39wTrYCAKACgWYCwHQFQH4FgGAFwE&sigh=emLgAisiKJg&label=videoplayfailed[ERRORCODE]]]></Error>
   <Impression><![CDATA[https://securepubads.g.doubleclick.net/pcs/view?xai=AKAOjsuP_FOaZ3eekG_y7W7kFnzT36BHYdnafsGCw4REX5t3HI2tQVAt3fIO-dJN-92REXh2uoG38Zm4TX_TTTAjDff-EC7v3ZZ8CA1rELTDMDnB3QyDa-UpijApy7rk1r1wWX62Yf_vUZ2TKmnj8nEutj8nDJueY5cB2Wbw5SeQnYYc8uSllPdCjTA8qZiDC_kE1MuxkMQn1SKHACUyAm-bWrlzDI6AExm6-RfDKuq4_xAou4PP93HODTS3zIk6MGtMg4EZ-ToFSWK-TYdldJ4YWfa-OYFTfXQOS6chvrQOM9OS_v1aeoR8QqJ4jL6yIJBvd_MTpOCXxZRVswmzPc2uLQbClKNWkzsAtw&sai=AMfl-YTPbss8Le3zLngXQuu4kH03MFWGlBfNXzIwGB6uJo23dNvfC6S0SPyKcxYuFG_G9Ni-2URR0BxytnsXyfMmPJTjUhpaj36XsWyT2bo20YnKOAzagT9lOQGCfyq5Pg&sig=Cg0ArKJSzBTT0hW1PP78EAE&uach_m=[UACH]&adurl=]]></Impression>
   <Creatives>
    <Creative id="57860459056" sequence="1">
...

It appears that the response from the Google demo is much more complicated and complete compared to Bitmovin demo. Can anyone provide some tips or insights on why this is the case? Thank you!

Hi @alvin.yang , welcome to Bitmovin community and thanks for your question. To start with, I tried the preroll-static-config - CodeSandbox that you prepared and am able to get the pre-roll Ad successfully.

Regarding the different VAST response that see between Bitmovin sample and IMA video suite inspector is potentially due to Google server not filling the Ad in case of Bitmovin request. This could have several reasons but since you are using an example IMA VAST tag(https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dskippablelinear&correlator=), you need to add a random number to correlator query parameter(last one in the query parameter list). Please try using a different value for every request foe example correlator=123456.

Another important point to consider is that you have enabled bitmovin-advertising module in your demo. We recommend to do this for all cases except when you are using Google Ad server. When using Google Ads server, please use the default IMA Ad module. IMA SDK in the client will auto populate such field values and are more compatible with Google Ads server. But if this Ad was only used for testing purpose and eventually you plan to use a non-Google Ad server/provider, then please stick to using Bitmovin Adversitising Module(BAM) as you have done in the demo app.

Please let us know if you have any follow up question(s).

Hi @lucky.goyal, thank you for the prompt reply. It’s now working perfectly. I believe the issue was caused by the ad responses being blocked by my browser extensions. Regardless, everything is functioning properly now.
In regards to your suggestion that I shouldn’t use BAM since it’s better suited for non-Google Ad server, I did revise a bit in the demo, but I’m not sure if I’ve done correctly. Would you be able to check and advise me on the matter? Thank you.

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bitmovin Player Demo</title>
  <meta charset="UTF-8"/>
  <meta http-equiv="X-UA-Compatible" content="text/html; charset=utf-8" />

  <!-- Bitmovin Player -->
  <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bitmovin-player@8/bitmovinplayer.js"></script>

  <style>
    .player-wrapper {
      width: 90%;
      margin: 20px auto;
      box-shadow: 0 0 30px rgba(0,0,0,0.7);
    }
  </style>
</head>
<body>
<div class="player-wrapper">
  <div id="player"></div>
</div>

<script type="text/javascript">
  var conf = {
    key: 'c11455ce-6b45-4449-9f78-dd99e2014c2d',
    analytics: {
      key: '3664a5c4-564f-44ab-8616-78dc17ccb6dd',
      title: 'Ads Test',
      videoId: 'wizard-Ads_Test-1687244670119',
    },
    advertising: {
        adBreaks: [
            {
            tag: {
                type: 'vast',
                url:
                    'https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dskippablelinear&correlator='
                }
        }
        ]
  }    
  };

  var source = {
    title: 'Ads Test',
    dash: 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd',
  };

  var player = new bitmovin.player.Player(document.getElementById('player'), conf);
  player.load(source);
</script>

</body>
</html>

Hi @alvin.yang , glad that you found the issue with Ad blocker. The updated demo without BAM looks good.