Example 1.01.04 - Multiple Prerolls



The configuration for this example is:


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

function onLinearAdScheduled(ad) {
    debug("OVA CALLBACK: Linear ad scheduled - type is '" + ad.type + "'");
    debug(ad);
    ++linearAdCount;
}

...

flowplayer("a.example", "", {
    playlist: [
        {
            url: "",
            duration: 30
        }
    ],

    plugins: {	    
        controls: {
            autoHide: "always"
        },

        ova: {
            url: "",

            "canFireAPICalls": true,
            

            "ads": {
                 "companions": {
                     "regions": [
                         { "id":"companion", "width":"150", "height":"360" }
                     ]
                 },
                 "notice": { "textStyle": "smalltext" },
                 "schedule": [
                       {
                           "position": "pre-roll",
                           "tag": "http://www.adotube.com/kernel/vast/vast.php?
                                   omlSource=http://www.adotube.com/php/services/player/OMLService.php?
                                   avpid=UDKjuff__amp__ad_type=pre-rolls__amp__platform_version=vast20as3__amp__vpaid=1__amp__
                                   rtb=0__amp__publisher=adotube.com__amp__title=[VIDEO_TITLE]__amp__tags=[VIDEO_TAGS]__amp__
                                   description=[VIDEO_DESCRIPTION]__amp__videoURL=[VIDEO_FILE_URL]"
                       },
                       {
                           "position": "pre-roll",
                           "tag": "http://openx.openvideoads.org/openx/www/delivery/fc.php?
                                   script=bannerTypeHtml:vastInlineBannerTypeHtml:vastInlineHtml__amp__
                                   zones=pre-roll0-0%3D5__amp__nz=1__amp__source=__amp__r=R0.8349904902279377__amp__block=1__amp__
                                   format=vast__amp__charset=UTF-8"
                       }
                 ]
            },

            "debug": {
                 "levels": ""
            }
        }
    }
});