Example 1.01.00 - Ad Scheduling callbacks (pre-roll, overlay, companions)

Loading the player ...

The configuration for this example is:


<script type="text/javascript">

function onAdSchedulingStarted() {
	debug("OVA CALLBACK: Ad scheduling started");
}

....

function onAdSchedulingComplete(ads) {
	debug("OVA CALLBACK: Ad scheduling complete - " + ads.length + " ads scheduled");
	debug(ads);
}

jwplayer("container").setup({
       flashplayer: "", 

       width: 540,
       height: 360,

       controlbar: "bottom",

       playlist:[
           { 
               file: "http://streaming.openvideoads.org/shows/bbb-640x360.mp4",
               duration: 10
           }
       ],

       plugins: {
           "../../../dist/swf/ova-jw.swf": { 
               "ads": {
                   "displayCompanions": true,
                   "companions": {
                       "regions": [
                           { "id":"companion", "width":"150", "height":"360" }
                       ]
                   },
                   "servers": [
                       {
                           "type": "OpenX",
                           "apiAddress": "http://openx.openvideoads.org/openx/www/delivery/fc.php"
                       }
                   ],
                   "notice": { "textStyle": "smalltext" },
                   "schedule": [
                       {
                           "zone": "6",
                           "position": "pre-roll"
                       },
                       {
                           "zone": "33",
                           "position": "auto:bottom",
                           "width": 450,
                           "height": 50,
                           "startTime": "00:00:05",
                           "duration": "15"
                       }
                   ]
               },

               "debug": {
                  "levels": "fatal, config, vast_template, vpaid, http_calls, playlist, api"
               }
           }
       }
});
</script>