I would like to serve a IMA ad but "waterfall" to VAST on error. Is it posible to do it?
As far as I know when you initialize a jwplayer you must set the client ("vast" or "googima"), so we cant change the client in the "onAdError" event.
Any option to set the client in the "onAdError" event?
This is what I'm trying to do:
var aAds = [ {
client: "vast",
tag: "http://foo.com/vast.xml"
}, {
client: "googima",
tag: "http://foo.com/ima.xml"
}];
jwplayer("container1").setup({
image: "http://foo.com/bar.png",
file: "http://foo.com/bar.mp4",
advertising: {
client: "vast" // This is mandatory, isn't it?
}
});
var iAd = 0;
function showNextAdd( onPlay ) {
if (onPlay && iAd > 0) return;
if (iAd < aAds.length) {
jwplayer().playAd( aAds[iAd++].tag );
}
}
// Try first add on start
jwplayer().onPlay( function(){
showNextAdd(true);
});
// If error try next
jwplayer().onAdError( showNextAdd );
Short answer is - NO
From jwplayer.com support:
more here: https://support.jwplayer.com/customer/portal/articles/1431665-vast-advertising
p.s. For the moment i am posting this the last version of jwplayer is 7.3.4