Example 2 - Excluding Ad from the Flowplayer JS Playlist Plugin

This example illustrates how to ensure that ads are excluded from the Flowplayer Javascript Playlist plugin. The plugin requires a small modification to exclude items that start with "advertisement" in the title. A modified version of the Flowplayer JS plugin has been provided in this release - "flowplayer.playlist-3.0.7.modified.js" (download here).

The RSS playlist file that is loaded by this example can be found here.



The configuration for this example is:


$(function() {
  $f("player", "", {
      playlist: "",

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

          ova: {
                url: "",

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

              "ads": {
                  "pauseOnClickThrough": true,
                  "servers": [
                      {
                        "type": "OpenX",
                        "apiAddress": "",
                        "allowAdRepetition": true
                      }
                  ],
                  "schedule": [
                      {
                        "zone": "5",
                        "position": "pre-roll"
                      }
                  ]
              }
          }
      }
  }).playlist(".clips", {loop: true});

  // setup scrolling for the playlist elements
  $("div.playlist").scrollable({
    items:"div.clips",
    vertical:true,
    next:"a.down",
    prev:"a.up"
  });
});