First things first:
VAST (Video Ad Serving Template): XML document format describing an ad to be displayed in, over, or around a Video Player or a Wrapper pointing to a downstream VAST document to be requested.
VPAID (Video Player Ad-Serving Interface Definition): Establishes a common interface between video players and ad units, enabling a rich interactive in-stream ad experience.
Your question is (currently) confusing, as it's not clear what you want to achieve. What I got so far is:
- Player loads VAST - MediaFile: VPAID
- VPAID shall load another (third party) VAST - if you call a specific JS function
- Third Party MediaFile play-out
Assuming the VPAID is yours (Proxy VPAID)
Every player which supports VPAID (and your VPAID version) will call the initAd()
function. There is no need to implement a magic function to contact your API for the third party VAST tag. Just implement the API call with VAST response, so it will be executed if VPAID.initAd
gets called.
Note 1: Your VPAID would need to be a fully qualified VAST/VPAID player itself.
Note 2: You would need to implement it for JavaScript and Flash
Assuming the VPAID isn't yours
No VPAID will provide a functionality to replace the content - the advertiser actually wants to serve - with different content. Not via VAST or anything. Cause it would not make sense for the advertiser ;)
Assuming the player is yours
You could implement that API call (simple VAST resource request) into your player, so it will get the third party VAST directly. No VPAID needed.
Note: Please also have a look for VAST Wrapper - this might help.
If nothing of this is what you want to achieve, please please please edit your question so it is 100% clear what you are asking for.
I hope this was helpful somehow and have a nice day!