Skip to content

Instantly share code, notes, and snippets.

@ybootin ybootin/vpaid.html
Created Aug 8, 2018

What would you like to do?
<!doctype html>
<div id="vpaid-container">
<div id="video-container"></div>
<div id="ad-container" style="width:400px;height: 300px"></div>
var vpaidAd
var script = document.createElement('script')
var video = document.createElement('video')
video.setAttribute('muted', 'true')
script.onload = function() {
vpaidAd = window.getVPAIDAd()
vpaidAd.subscribe(function() {
}, 'AdLoaded')
vpaidAd.initAd(400, 300, 'normal', 512, {AdParameters:'{"creativeId":"17ca4647-eabd-8885"}'}, {
slot: document.getElementById('ad-container'),
videoSlot: video,
videoSlotCanAutoplay: true,
script.src = ''
setTimeout(function() {
vpaidAd.resizeAd(300, 200, 'normal')
}, 3000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.