Example 4 - Advanced VAST 2 Companion Types

Displays the full set of VAST 2 companion types - HTML (tags and scripting), iFrame, Static (image, swf, scripting). To support the script based companions, the external javascript functions contained in ova.js are called to insert the companion display code into the named DIV. Note the use of "processCompanionsExternally: true" to enable this feature.




300x250 static
(image)



300x250 static
(swf)



300x250 static
(script)



300x250 iframe



300x250 html (no script)



300x250 html
(script)

The configuration for this example is:


flowplayer("example", "", {
    plugins: {
        controls: {
            autoHide: "always"
        },

        ova: {
            url: "",

            "debug": {
                "debugger": "firebug",
                "levels": ""
            },

            "ads": {
                "pauseOnClickThrough": true,
                "bestBitRate": "high",
                "companions": [
                     {
                        "id":"companion-300x250-static-1",
                        "width":"300",
                        "height":"250",
                        "index": 0
                     },
                     {
                        "id":"companion-300x250-static-2",
                        "width":"300",
                        "height":"250",
                        "index": 1
                     },
                     {
                        "id":"companion-300x250-static-3",
                        "width":"300",
                        "height":"250",
                        "index": 2
                     },
                     {
                        "id":"companion-300x250-iframe",
                        "width":"300",
                        "height":"250",
                        "resourceType": "iframe"
                     }
                     {
                        "id":"companion-300x250-html-1",
                        "width":"300",
                        "height":"250",
                        "index": 4
                     }
                     {
                        "id":"companion-300x250-html-2",
                        "width":"300",
                        "height":"250",
                        "index": 5
                     }
                ],
                "schedule": [
                     {
                        "position": "pre-roll",
                        "server": {
                           "type": "direct",
                           "tag": ""
                        }
                     }
                ]
            }
        }
    }
});