Example 3 - Autoplay when directly injecting the VAST Response



The configuration for this example is:


var VAST_RESPONSE='<?xml version="1.0" encoding="UTF-8" ?><VAST version="2.0">....';

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

        ova: {
            url: "",

            "autoPlay": true,

            "shows": {
                "streams": [
                    {
                        "file": "",
                        "duration":"00:00:30"
                    }
                ]
            },

            "debug": {
                "levels": ""
            },

            "ads": {
                "schedule": [
                    {
                       "position": "pre-roll",
                       "server": {
                           "type": "inject",
                           "tag": escape(escape(VAST_RESPONSE))
                       }
                    }
                ]
            }
        }
    }
});