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
SSAI implementation #430
Comments
Hello, it seems you're describing the same issue than #429. No it doesn't need a player object to work but it will need to be initialized with your instance of vast client (optional), the ad object and the creative that you will play. See https://github.com/dailymotion/vast-client-js/blob/master/docs/api/vast-tracker.md for more examples // with a vastClient instance
const vastTracker = new VASTTracker(vastClient, ad, creative);
// without a vastClient instance
const vastTracker = new VASTTracker(null, ad, creative); Then you will be responsible to call the VASTTracker trackImpression method at the right time to fire the corresponding VAST trackers. You can check the video tag events on MDN to find the one that correspond the most to your need. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#events // loadeddata event will be triggered by the video tag when the first frame of the media has finished loading.
player.addEventListener('loadeddata', () => {
vastTracker.trackImpression()
}); For other trackers feel free to check all VASTTracker public methods available Let me know, if it helps 😉 |
Hi @ZacharieTFR thank You for Your respond. When you say : " Then you will be responsible to call the VASTTracker trackImpression method at the right time to fire the corresponding trackers. What do you mean by that ? |
Yes, it will be fired correctly if the VAST contains an
so you must call trackImpression as soon as the ad is displayed. |
Hi i have idea of trying to implement something like or exactly like Server side adding Ads.
Basically i would like to use this library on client side to fetch VAST tag (which i was able to do) and get ad content url (mp4 file)it self which i than forward to API which is doing slicing in .ts chunks and updating m3u8 manifest.(some basic version of that logic i already have).
What i don't know and can't figure it out is does Vast Tracker require some player object and player events so impression can be successfully executed or it can work with out it and how?
Thank You.
0
The text was updated successfully, but these errors were encountered: