0

I'm working on VideoJS and I'm using Google IMA HTML5 SDK API to display video ads

I need to get the duration of the ad and then need to updated the value. Any sample code to get the duration and is it possible to update the duration of the ad tag so that a 15 sec ad can cover the 30sec ad slot?.

Zyesh Femina
  • 98
  • 1
  • 12

1 Answers1

0

To get the ad's duration: https://developers.google.com/interactive-media-ads/docs/sdks/html5/v3/apis#ima.Ad.getDuration.

It's not possible to change the duration of the ad in the VAST response. IMA will play the creative from beginning to end, and if your intended ad break is 30-second long, you can request for another ad.

andzrev
  • 544
  • 1
  • 6
  • 17