Example 1.04.00 - VAST 1 Impression, Click and Events



The configuration for this example is:


function onImpressionEvent(event, forced) {
    if(forced) {
       debug("OVA CALLBACK: Forced impression fired");
    }
    else debug("OVA CALLBACK: Impression fired");
	debug(event);
}

function onTrackingEvent(event) {
	debug("OVA CALLBACK: Tracking event fired");
	debug(event);
}

function onClickTrackingEvent(event) {
	debug("OVA CALLBACK: Click tracking event fired");
	debug(event);
}

function onCustomClickTrackingEvent(event) {
	debug("OVA CALLBACK: Custom click tracking event fired");
	debug(event);
}

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

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

        ova: {
            url: "",

            "canFireEventAPICalls": true,
            "ads": {
                "companions": {
                    "regions": [
                        { "id":"companion", "width":"300", "height":"250" }
                    ]
                },
                "servers": [
                   {
                       "type": "OpenX",
                       "apiAddress": ""
                   }
                ],
                "notice": { "textStyle": "smalltext" },
                "schedule": [
                   {
                       "zone": "6",
                       "position": "pre-roll"
                   },
                   {
                       "zone": "33",
                       "position": "auto:bottom",
                       "startTime": "00:00:05",
                       "duration": 5
                   }
                ]
            },
            "debug": {
                 "levels": ""
            }
        }
    }
});