Created
August 8, 2018 14:32
-
-
Save ybootin/08fbc3314833c420e7d18d9f6238bfc0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<body> | |
<div id="vpaid-container"> | |
<div id="video-container"></div> | |
<div id="ad-container" style="width:400px;height: 300px"></div> | |
</div> | |
<script> | |
var vpaidAd | |
var script = document.createElement('script') | |
var video = document.createElement('video') | |
video.setAttribute('muted', 'true') | |
document.getElementById('video-container').appendChild(video) | |
script.onload = function() { | |
vpaidAd = window.getVPAIDAd() | |
vpaidAd.subscribe(function() { | |
vpaidAd.startAd() | |
}, 'AdLoaded') | |
vpaidAd.initAd(400, 300, 'normal', 512, {AdParameters:'{"creativeId":"17ca4647-eabd-8885"}'}, { | |
slot: document.getElementById('ad-container'), | |
videoSlot: video, | |
videoSlotCanAutoplay: true, | |
}) | |
} | |
script.src = 'https://loader.seedtag.com/vpaid.js' | |
document.body.appendChild(script) | |
setTimeout(function() { | |
vpaidAd.resizeAd(300, 200, 'normal') | |
}, 3000) | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment