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

Forums

/

inline config instead of config.xml

9 replies [Last post]
Reply

I need a random number in my preroll video call, thats why I cannot use a config.xml file but need to define my values inline. I tried this, but it doesnt work:

jwplayer('container').setup({
'width': 700,
'height': 400,
'file': '<?php echo $video; ?>',
    'plugins': {
       'ova': ''
    },
   'ova.json' : {
"ads": {
"servers": [{
"type": "OpenX",
"apiAddress": "vast.txt"
}],
"notice": { "textStyle": "smalltext" },
"displayCompanions": true,
"companions": [{
"id":"companion",
"width":"200",
"height":"240"
}],
"schedule": [{
"zone": "47",
"position": "pre-roll",
"server": {
"type": "direct",
"tag": "http://domain.de/vid?<? echo rand(100,999); ?>"
}
},
{
"zone": "48",
"position": "auto:bottom",
"width": 320,
"height": 80,
"startTime": "00:00:02",
"duration": "5"
}]
}
   },
    'modes': [
        {type: 'html5'},
        {type: 'flash', src: 'jwplayer/player.swf'},
        {type: 'download'}
    ]
});

Can anyone tell me what I'm doing wrong?
Any help is much appreciated.

Reply

Hi,

I think the main issue is that when using the "ova" ID for the plugins, you're loading the OVA SWF from the Longtail repository. That version (0.4.4) doesn't support the JSON based in-line setup.

To use the in-line setup, download the 1.0.0 OVA SWF from the OVA Developer Site (http://developer.longtailvideo.com/ova) - register on the site and then grab the V1.0.0 SWF from the "Download the Latest" page. Load that SWF up on your server and then reference it as follows:

...
plugins: {
     '/path/to/your/ova-jw.swf': {
     }
}

Note that the new V1.0.0 SWF is named "ova-jw.swf".

That's the first thing.

Now to the in-line setup.

There is a much cleaner way to configure OVA with the in-line JSON approach rather than use the messy "ova.json" variable.

Use the following approach:

....
plugins: {
     '/path/to/your/ova-jw.swf': {
            // Put your config directly in here
     }
}

Here's an example of that setup in practice:

http://static.openvideoads.org/qa/latest/ova.jwplayer.5x/examples/pages/setup/jw-embedder.html

Actually you can find a full set of v1.0.0 examples here - they may help:

http://static.openvideoads.org/qa/latest/ova.jwplayer.5x/examples/index.html

With v1.0.0 you can also set OVA variables in the ad tags. There is a variable for random-number generation so you can actually declare your ad tag as follows:

http://domain.de/vid?__random-number__

When OVA makes the ad call, the "__random-number__" variable will be replaced with an AS3 generated random number.

Hope this helps, let me know how you get on...

Paul

Reply

Thank you very much for your help. I downloaded the newest OVA version and changed the inline config as you recommended - yet it does not play my ad:

http://goo.gl/DlW2H

I don't get it, an old setup without the inline config works:

http://goo.gl/vFHB3

Why? What am I doing wrong?

Any help is much appreciated.

Reply

Hi...

The new version of OVA for JW5 implements "filtering" of ad types based on the mime type in the VAST response. Unfortunately ".mov" (quicktime) aren't selected by default. As your VAST response only has a ".mov" creative in it, OVA isn't matching it.

To stop OVA from "filtering" based on a restricted set of mime types, use the "filterOnLinearAdMimeTypes": false option as follows:

{
    "ads": {
        "filterOnLinearAdMimeTypes": false,
        "schedule": [
             ....

That will fix your problem...

Paul

Reply

PS: As an extra suggestion - if you turn up the OVA debug levels to include "vast_template, playlist" etc. you'll see the issues that OVA identifies as it runs in the Javascript console...

Paul

Reply

Thank you very much. Now it works in Firefox but as I went to check, it doesn't seem to play the ad in Internet Explorer 9. I don't understand why this is happening. Do you have any ideas?

Your help is much appreciated.

Reply

Hi.. I'm not 100% sure, but one thing I noticed when looking at your page is that you have some 404s coming up and some missing Javascript includes which is creating some problems with jQuery (there are some messages such as the following coming up):

$ is not a function

Those things have a habit of breaking Javascript in IE, so they may be causing a problem embedding the player via the Javascript embedder.

It's just a guess, but that's where I'd start - clean up those errors and see if it makes a difference first.

Paul

Reply

I created an error-free version here:

http://goo.gl/qMSSw

Still doesn't play the ad in Internet Explorer 9. Do you have any ideas? I've been trying a lot but so far - no difference.

Your help is much appreciated.

Reply

Ok, I think I found the reason.

In IE9, the player is loading as a HTML5 player. OVA is only available in Flash mode so OVA isn't being loaded.

Make Flash mode the primary mode in your JW Player setup (e.g. the first in the list of modes) and HTML5 the fallback mode and I think OVA will load then ...

Paul

Reply

That solved the problem!

Thank you very much for your help!!

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