- HTML5 video player with the IMA HTML5 SDK integrated. If you don't have one, check out our Get Started guide.
- If you're not familiar with VPAID 2, you can read more at IAB's VPAID page.
Enabling VPAID 2 support
google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED); ... var adDisplayContainer = new google.ima.AdDisplayContainer(adContainerElement); var adsLoader = new google.ima.AdsLoader(adDisplayContainer); ...
The available VPAID modes are as follows:
ENABLED- Allows VPAID ads with the default settings.
INSECURE- Allows VPAID ads in insecure mode. For more info, see IFrame security and Video player proxy element below.
DISABLED- VPAID ads will not play. If a requested ad returns a VPAID creative, an error will be thrown.
VPAID 2 support caveats
ImaSdkSettings.setVpaidMode(...) like so:
Video player proxy element
For security and proper mobile functionality, in
ENABLED mode the IMA HTML5 SDK doesn't provide the actual video element to the ad; instead it provides a proxy element that mimics much of the functionality of the normal video element. For ad creatives that call only supported API methods, there should be no behavior changes in the rendering of the creatives. With
VpaidMode.INSECURE mode, the SDK will provide the video player element instead of the proxy.
Here are the methods, listeners and attributes available on the video proxy element:
Event types for addEventListener
- Does this enable VPAID creatives in the IMA HTML5 SDK?