Integration‎ > ‎

Preroll Video

Preroll video has never been this easy.
We currently support three ways of integrating Vdopia preroll video ads into your mobile website.
1) .VDO Playback: In this case Vdopia's preroll ad will run on the page itself using our proprietary .VDO format. For this we require that you have direct links (anchor tags) from your page to the video.
Here is an example of such tag:
<script type='text/javascript' src='http://serve.vdopia.com/adserver/html5/getjs?file=preroll'></script> <script type='text/javascript'> var params= { ak: "AX123", //API KEY version: "1.0", //VERSION adFormat:"preappvideo", output:"json" }, tag="a", //Tag Name on which preroll should be triggered attr="rel", //Attribute name to filter out the tags on which preroll should be applied val="preroll", //Attribute value for filtering out vdo=VDOPIA.Preroll("http://serve.vdopia.com/adserver/html5/inwapads", params, true,tag, attr, val); </script>


Here is a sample page. This should work on mobile safari, Blackberry Browsers (>5.0) and Android Browsers.

2) Native Playback: In this case Vdopia's preroll ad will play on native player. For this we require that you have direct links (anchor tags) from your page to the video. Do not use this tag on ipad.
Here is an example of such tag:
<script type='text/javascript' src='http://serve.vdopia.com/adserver/html5/getjs?file=preroll'></script> <script type='text/javascript'> var params= { ak: "AX123", //API KEY version: "1.0", //VERSION adFormat:"preappvideo", output:"json" }, tag="a", //Tag Name on which preroll should be triggered attr="rel", //Attribute name to filter out the tags on which preroll should be applied val="preroll", //Attribute value for filtering out vdo=VDOPIA.Preroll("http://serve.vdopia.com/adserver/html5/inwapads", params, false, tag, attr, val); </script>


Here is sample page. This will work on android browsers (>2.0) and mobile safari.

3) iPad Preroll: Video playback experience on iPad is very different than other handheld devices. So we have put an extra effort to make our preroll solution inline with this experience. This solution enables publisher to player preroll on video tag in mobile safari on iPad. Here is an example page.

Here is an example of such tag:
<script type='text/javascript' src='http://serve.vdopia.com/adserver/html5/getjs?file=preroll'></script> <script type='text/javascript'> var params= { ak: "AX123", //API KEY version: "1.0", //VERSION adFormat:"preappvideo", output:"json" }, vdo=VDOPIA.Preroll("http://serve.vdopia.com/adserver/html5/inwapads", params, false); </script>


Apart from this you need to add following piece of javascript (or similar) whenever you are playing a video using video tag. (on mobiles safari media playback requires user interaction).

<script type='text/javascript'> someCallToActionImage.onclick=function(){ vdo.loadAd(document.getElementById("YOUR_VIDEO_TAG_ID")); } </script>


Comments