This example illustrates how to use the sendEvent(LOAD) JW Javascript API with "ova.reload":true to trigger the loading of a new ad scheduled show stream.
The configuration for this example is:
The onClick event for the button is declared as follows:
<button type="button" onclick="player.sendEvent('LOAD', { file:'http://www.youtube.com/watch?v=KSu3EyNL_iQ', image:'http://www.teradeportes.com/images/podcasts/futbolnacional/2010/Quito270910_085803.jpg', 'ova.reload': true });">Trigger Load of New Stream</button>
"" is defined as:
<config>
<ova.title>
Loading Shows and Ads "On Demand" via player.sendEvent(LOAD...)
</ova.title>
<ova.json>
{
"autoPlay": false,
"ads": {
"servers": [
{
"type": "OpenX",
"apiAddress": "http://openx.openvideoads.org/openx/www/delivery/fc.php"
}
],
"notice": { "textStyle": "smalltext" },
"schedule": [
{
"zone": "18",
"position": "pre-roll"
}
]
},
"debug": {
"levels": "fatal, config, vast_template, vpaid, playlist, api, analytics, http_calls",
"debugger": "firebug"
}
}
</ova.json>
</config>