Example 2 - A pre-roll and show stream with an overlay ad

A very short pre-roll ad plays followed by the show stream. 5 seconds into the show stream an overlay appears for 15 seconds - click on the overlay to start up a video ad. Once the video ad has played, the show stream resumes at the point at which the overlay was clicked.

The configuration for this example is:


var OAS_url = "http://oasc16.247realmedia.com/2";
var OAS_sitepage = "openvideoads.org/vast";
OAS_rdl = OAS_rdl != "" ? OAS_rdl.split("&")[1] : "";

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

        ova: {
            url: "",

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

            "regions": {
              "declarations": [
                {
                  "id": "bottom",
                  "verticalAlign": "bottom",
                  "horizontalAlign": "left",
                  "backgroundColor": "#000",
                  "padding": "-10 -10 -10 -10",
                  "width": 99,
                  "height": 67
                }
              ]
            },
            
            "ads": {
              "servers": [
                   {
                      "type": "OAS",
                      "apiAddress": OAS_url,
                      "customProperties": {
                         "target": [ "overlay", "XE", OAS_rdl, "if_nt_CookieAccept=" + OAS_CA, "XE"]
                      }
                   }
              ],
              "schedule": [
                  {
                      "zone": OAS_sitepage + "@" + "x01",
                      "position": "pre-roll"
                  },
                  {
                      "zone": OAS_sitepage + "@" + "Bottom",
                      "position": "bottom",
                      "width": 99,
                      "height": 67,
                      "startTime": "00:00:05",
                      "duration": "15"
                  }
              ],
            },

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