Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

A simple pre-roll setup using OBJECT EMBED tags

7 replies [Last post]
Reply

Hi,

I get asked quite frequently to provide a simple pre-roll "embed" tag setup for JW Player so I thought I'd post this for everyone's reference.

There are several easy setup options available to add OVA configuration to object embed tags for JW Player.

1. Reference the OVA configuration via an external file
2. Use the "ova.tag=" flashvar
3. Use the "ova.json=" flashvar

Before using any of these options however, please always download the latest OVA "development" release from the OVA Developer site (go to http://developer.longtailvideo.com/ova and register on that site, login, then go to the "Download the Latest" page and grab the latest OVA development SWF). This is important because OVA is constantly evolving and fixes/new features are added daily that you will miss out on unless you stay up to date with the latest development release.

Now, quickly running through each option.

1. Referencing an external configuration file

The easiest way to add OVA for JW Player to object embed tags is via the use of an external config file as follows:

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0" WIDTH="450" HEIGHT="300" id="player">
<PARAM NAME=movie VALUE="/path/to/your/player.swf">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#000000>
<PARAM NAME=allowfullscreen VALUE="true">
<PARAM NAME=allowscriptaccess VALUE="always">
<PARAM NAME=flashvars VALUE="plugins=/path/to/your/ova.swf&config=/path/to/your/config/ova01.xml">
<EMBED
id="player"
data="/path/to/your/player.swf"
src="/path/to/your/player.swf"
width="450"
height="300"
allowscriptaccess="always"
allowfullscreen="true"
flashvars="plugins=/path/to/your/ova.swf&config=/path/to/your/config/ova.xml"
>
</EMBED>
</OBJECT>

The "ova.xml" file is structured as follows:

<config>
</ova.json>
   {
       "debug": {
           "levels": "fatal, config, vast_template"
       },

       "ads": {
           "schedule": [
                 {
                    "position": "pre-roll",
                    "tag": "put-your-static-ad-tag-here"
                 }
           ]
       }
   }
<ova.json>
</config>

Don't forget to replace any cache-busting parameters in the tag with "__random-number__" so that OVA can replace that at runtime with a random number to break the cache.

2. Using the "ova.tag" flashvar

There is a short-cut available for pre-roll only setups with a static ad tag.

This shortcut is a flashvar config option called "ova.tag".

"ova.tag" removes the need to use an external config file for very simple pre-roll only + static ad tag setups.

You can use the "ova.tag" option directly with object embed tags as follows:

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0" WIDTH="450" HEIGHT="300" id="player">
<PARAM NAME=movie VALUE="/path/to/your/player.swf">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#000000>
<PARAM NAME=allowfullscreen VALUE="true">
<PARAM NAME=allowscriptaccess VALUE="always">
<PARAM NAME=flashvars VALUE="plugins=/path/to/your/ova.swf&ova.tag=/put/your/static/ad/tag/here">
<EMBED
id="player"
data="/path/to/your/player.swf"
src="/path/to/your/player.swf"
width="450"
height="300"
allowscriptaccess="always"
allowfullscreen="true"
flashvars="plugins=/path/to/your/ova.swf&ova.tag=/put/your/static/ad/tag/here"
>
</EMBED>
</OBJECT>

When using the "ova.tag" flashvar it is critical that you replace any ampersands (&) with "__amp__" before placing the ad tag in the flashvar config. If you don't, the ad tag will be broken up into individual flashvars and fail to work.

For instance, if your ad tag is:

http://openx.openvideoads.org/openx/www/delivery/fc.php?script=bannerTypeHtml:vastInlineBannerTypeHtml:vastInlineHtml&zones=pre-roll0-0%3D5&nz=1&source=&r=__random-number__&block=1&format=vast&charset=UTF-8

it should be entered as:

http://openx.openvideoads.org/openx/www/delivery/fc.php?script=bannerTypeHtml:vastInlineBannerTypeHtml:vastInlineHtml__amp__zones=pre-roll0-0%3D5__amp__nz=1__amp__source=__amp__r=__random-number____amp__block=1__amp__format=vast__amp__charset=UTF-8

Now onto the final approach...

3. Using the "ova.json" flashvar

If you have a more complex setup, but wish to avoid using an external configuration file for OVA, you can embed the full OVA configuration via OBJECT EMBED tags using the "ova.json" flashvar.

You can find a full tutorial on "ova.json" here:

http://www.longtailvideo.com/support/open-video-ads/ova-for-jw-player-5/13165/how-to-inject-ova-conf...

The short of it is however that you take the full OVA configuration, url encode it, then inject it directly via a flashvar called "ova.json".

So a configuration that looks like:

   {
       "debug": {
           "levels": "fatal, config, vast_template"
       },

       "ads": {
           "schedule": [
                 {
                    "position": "pre-roll",
                    "tag": "put-your-static-ad-tag-here"
                 }
           ]
       }
   }

when url encoded looks like:

%7B%22ads%22%3A%7B%22schedule%22%3A%5B%7B%22position%22%3A+%22pre-roll%22%2C%22tag%22%3A+%22put-your-static-ad-tag-here%22%7D%5D%7D%7D

and when it's used with the OBJECT EMBED tags is as follows:

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0" WIDTH="450" HEIGHT="300" id="player">
<PARAM NAME=movie VALUE="/path/to/your/player.swf">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#000000>
<PARAM NAME=allowfullscreen VALUE="true">
<PARAM NAME=allowscriptaccess VALUE="always">
<PARAM NAME=flashvars VALUE="plugins=/path/to/your/ova.swf&ova.tag=/put/your/static/ad/tag/here">
<EMBED
id="player"
data="/path/to/your/player.swf"
src="/path/to/your/player.swf"
width="450"
height="300"
allowscriptaccess="always"
allowfullscreen="true"
flashvars="plugins=/path/to/your/ova.swf&ova.json=%7B%22ads%22%3A%7B%22schedule%22%3A%5B%7B%22position%22%3A+%22pre-roll%22%2C%22tag%22%3A+%22put-your-static-ad-tag-here%22%7D%5D%7D%7D"
>
</EMBED>
</OBJECT>

Hope this helps…

Paul

Reply

What if I'd like to use my own pre-roll video and not something from a provider like the OVA setup is?

Reply

Hi Sheldon,

Can I ask - are you ad serving your own pre-roll? (e.g. with your own ad server setup via something like OpenX) or are you just going to serve up a VAST template that points to the location of your own pre-roll stream?

Paul

Reply

I am interested in this as well. Can you cover the simplest case, adding a preroll from a url. For example progressive or streaming from a server like S3 or something.
I often have clients who konw

Reply

ung... sorry, about that....
Anyways, I often have clients who know the url of the video and preroll and simply want a basic embed code to run the preroll without getting OpenX or OVA or some other system involved.
What is the best way to do this?

Reply

Well, you'd just setup a playlist in the player.

The standard JW documentation will help you there:

http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/12536/configuration-options

Paul

Reply

Hi, we have a cms (drupal).
We need to load some videos on it.
We have also a basic embed solution in order to run some short ads videos before the video selected by the users.
All videos are stored in our cms under two different directories.
The goal is to show randomly one of the preroll ads videos before to start the video selected by the visitors of the website. Endoding will be done by us before upolading the videos in mp4 format so that iOS compatibility is preserved.
Hope somebody can give me a step by step guide or help in order to do it smoothly.
Thanks in advance.
Nino

Reply

Hi,

From the description I'm not completely sure that Open Video Ads is the right thing for you.. when you save you have a "basic embed solution in order to run some short ad videos" before the main video, what does that mean?

OVA requires ads to be ad served via a VAST compliant ad server/provider?

How are you serving the video ads? (in a little more detail)

Paul

Post new comment

  • Allowed HTML tags: <code> <blockquote> <em> <strong> <strike> <ul> <li> <ol>
  • You may post code using <code>...</code> .
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options