Open rohanraj7316 opened 5 years ago
You should be able to access the vast
property of your VASTPlayer
to access the companion ad:
const player = new VASTPlayer({/* opts here */});
player.load('/some/vast/url').then(() => {
const companions = player.vast.find('ads[0].creatives', creative => (
creative.type === 'companions'
));
companions.forEach(companion => {
// do stuff to render companions
});
});
I'd also be open to a PR that adds companion support directly to the library, if you're interested in implementing that!
@minznerjosh can we have another div where we should inject the companion banner !! how do you prefer to proceed?
Does this library need to provide a div? You could just use your own, right?
i can write the implementation for the companion banners. but i can't decide the positioning of the banners. for that library need to provide the div.
hello, I have been trying to implement Companion Ads. but I am unable to figure out provisions to implement Companion Ads. Could you guide me regarding the implementation of "Companion Ads" present in VAST? @minznerjosh