Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Companion Ads. #17

Open
rohanraj7316 opened this issue Jan 10, 2019 · 4 comments
Open

Support for Companion Ads. #17

rohanraj7316 opened this issue Jan 10, 2019 · 4 comments

Comments

@rohanraj7316
Copy link

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

@minznerjosh
Copy link
Owner

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!

@rohanraj7316
Copy link
Author

@minznerjosh can we have another div where we should inject the companion banner !!
how do you prefer to proceed?

@minznerjosh
Copy link
Owner

Does this library need to provide a div? You could just use your own, right?

@rohanraj7316
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants