Hello, i am new to this, i have a question about autoplay or playonce in ova configuration file (xml).
I need the player to strat when someone enters the page, showing the pre-roll ad, and then stop.
I dont want to autostart the video after the ad is showed.
How do i do that?
Hi Christian,
That's a little tricky.. it's a nice scenario though.
By default, "autostart" with the JW Player options, or "autoPlay" as an OVA option means that playback will continue to the stream after the pre-roll.
So, the question is - are we able to work around that in some way to force the player to "stop" once the ad has complete.
It may be possible using the OVA Javascript callbacks.
What I think you could try to do is listen for the "onLinearAdFinish(ad)" callback from OVA and then go "jwplayer("container").stop()" to force the player to stop.
To use the "onLinearAdFinish(ad)" callback, you need to be running at least OVA RC5 (from the OVA Developer Site at http://developer.longtailvideo.com/ova - register on there and grab the RC5 SWF from the "Download the Latest" page).
Here's an example of the Javascript callbacks in action - this may help give you some guidance...
http://static.openvideoads.org/qa/rc6-13/ova.jwplayer.5x/examples/pages/javascript/example1.02.html
I'm not 100% sure that the approach will work, but I'm pretty sure it's worth a go...
Hope this helps,
Paul