Is there a way to waterfall from IMA to VAST ads in jwplayer 6?

1.1k views Asked by At

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 );
1

There are 1 answers

0
Sid On

Short answer is - NO

From jwplayer.com support:

While configuring jwplayer instance - set 'client' option to vast if you are running VAST/VPAID ads, or to googima if you are running Google IMA ads. Note you cannot mix both ad formats in a single player embed. Choosing a client will maintain the same client until the player is set up again. Example: 'client': 'googima' or 'client': 'vast'

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