googleads / videojs-ima

IMA SDK Plugin for Video.js
Apache License 2.0
450 stars 284 forks source link

Is it possible to override the default ad tag from query params? #1057

Closed rochapablo closed 1 year ago

rochapablo commented 2 years ago

While playing the ad using videojs and player.ima I've notice the following parameters (https://pubads.g.doubleclick.net/gampad/ads?...vpa=click&vpmute=1)

vpa: click
vpmute: 1

To that, I would like to know if it's possible to override (https://support.google.com/admanager/answer/7320899?hl=en) this items.

I've tried

player.ima({
    ...
    adTagParams: {
        vpa: 'auto',
        vpmute: null
    },
    cust_params: {
        vpa: 'auto',
        vpmute: null
    }
});

but nothing changes.

Kiro705 commented 2 years ago

Hello @rochapablo ,

These values are set by the sdk, but this is based on how the ad request is built.

To set these values when the plugin builds the ad request, used the following additional settings:

Note: I am unclear why adWillPlayMuted is deprecated, but I don't think there is a plan to remove this functionality.

This issue is unrelated to DAI support https://github.com/googleads/videojs-ima/issues/772.

Thank you, Jackson IMA SDK team

rochapablo commented 2 years ago

Hello @Kiro705, thank you very much, I'll be looking into this right after lunch.

Thank you again.

rochapablo commented 2 years ago

Hello @Kiro705, well unfortunately none of the additional settings worked for me. I would like to unset the information instead of set a value. Also I don't have the option to set vpa to 'auto', instead it's always set to 'click'.

Kiro705 commented 2 years ago

Hello @rochapablo ,

To confirm, the code you are using should look something like this:

var imaOptions = {
  adTagUrl: 'YOUR_AD_TAG',
  autoPlayAdBreaks: true,
  adWillPlayMuted: false,
  // any additional options.
};

player.ima(imaOptions);