You can use FV Player VAST to serve VAST/VPAID ads on any website using Flowplayer 5 or Flowplayer 6, you don’t have to use FV Player and you don’t even have to use WordPress at all.
Simply add this code to your page footer:
<script> var fv_vast_conf = { "ads":[ {"url":"http://ad5.liverail.com/?LR_PUBLISHER_ID=YOUR_ID&LR_SCHEMA=vast2-vpaid","engine":"flash"}, {"url":"http://www6.smartadserver.com/ac?siteid=YOUR_ID&vpw=[player_width]&vph=[player_height]&tmstp=[random_number]","engine":"html5"} ], "autoplay":[], "debug":"true", "swf":"http://your-site.com/fv-player-vast/swf/fv-player-vast.swf", "version":"0.3.3" }; </script> <script src='http://your-site.com/fv-player-vast/js/fv-player-vast.min.js'></script>
This will attach to load events of any Flowplayer and display the ads according to the settings. The properties which you need to set are:
fv_vast_conf.ads | Array of ad units to display. If the first ad fails to load (no video ad available), it continues with the next one and so on. Each item has URL and the engine – “flash” or “html5”. URL tags/macros are filled in automatically, see our Use of URL tags guide. |
fv_vast_conf.autoplay |
Enter array of element IDs of the Flowplayer wrapping DIVs which should auto-play. The ID must start with “wpfp_” and only the remaining part must be used in this array. Example:
|
fv_vast_conf.swf | The SWF path, required for VPAID ads |
fv_vast_conf.debug | Enables debug messages on JavaScript console |
If you are using VPAID ads, also load the SWFobject JavaScript library.
Leave a Reply