简体   繁体   中英

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

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:

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

ps For the moment i am posting this the last version of jwplayer is 7.3.4

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM