How to feed my VAST XML to player?

2,251 views
Skip to first unread message

Pavlo Ivanchyshyn

unread,
Jan 20, 2016, 1:55:16 PM1/20/16
to Interactive Media Ads SDK
Hello guys,

I have a VAST XML like this one: http://rtr.innovid.com/r1.5554946ab01d97.36996823;cb=%25%CACHEBUSTER%25%25

or like this:

https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dlinear&correlator=


or/and more or less complicated VAST XML v2/v3.


I was looking through the google.developers documentation, but didn't find any information about how to feed my VAST XML to player.


The main ideas is: I have a VAST XML and I want to play it in a player. Like here for VAST XML: https://developers.google.com/interactive-media-ads/docs/sdks/html5/vastinspector


Do somebody knows how to resolve this issue?


Thanks for advise.

Tyler Sidell (IMA SDK Team)

unread,
Jan 20, 2016, 4:04:11 PM1/20/16
to Interactive Media Ads SDK
Hi Pavlo,

Are you currently using the IMA SDK?  I'd suggest taking a look at the Getting Started Guides depending on the platform that you are building for.  The IMA SDK is used to parse the ad tag and play ads in your player.  We have 4 versions of the SDK (HTML5FlashiOS, and Android).

As an example, if you want to use the HTML5 SDK, you can follow along here.  If you follow the example and want to test with your own ad tag, you can replace the following variable with your tag:
adsRequest.adTagUrl = 'https://pubads.g.doubleclick.net/gampad/ads?' +
'sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&' +
'impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&' +
'cust_params=deployment%3Ddevsite%26sample_ct%3Dlinear&correlator=';

Each platform has different steps to get started, so please narrow down the specific SDK, try the guides and if you have any questions we'll be glad to assist. 

Thanks,
Tyler Sidell
IMA SDK Team

Pavlo Ivanchyshyn

unread,
Jan 20, 2016, 4:12:22 PM1/20/16
to Interactive Media Ads SDK
Hi Tyler,

Thanks for your response!

I'm trying to use HTML5 SDK.
I saw the variable called `adsRequest.adTagUrl` but it looks like it requires URL, but I have only VAST XML as a string, without any links and so on. Is it possible to insert raw VAST XML inside of this variable? Or I must upload this data on remote host and use only URL to any file with VAST XML?

Thanks!


среда, 20 января 2016 г., 23:04:11 UTC+2 пользователь Tyler Sidell (IMA SDK Team) написал:

Tyler Sidell (IMA SDK Team)

unread,
Jan 20, 2016, 4:44:56 PM1/20/16
to Interactive Media Ads SDK
Hi Pavlo,

The SDK makes a video ad request to either DoubleClick for Publishers (DFP), Google AdSense, or any VAST-compliant ad server.  We would suggest that you serve this through a VAST-compliant ad server.

Thanks,
Tyler Sidell
IMA SDK Team

Pavlo Ivanchyshyn

unread,
Jan 20, 2016, 5:48:59 PM1/20/16
to Interactive Media Ads SDK
So far, it comes from ad server, but I don't know something about the ad server. I have a VAST XML as a string only and I want to show how it will be demonstrated via player.

среда, 20 января 2016 г., 23:44:56 UTC+2 пользователь Tyler Sidell (IMA SDK Team) написал:

Pavlo Ivanchyshyn

unread,
Jan 20, 2016, 6:42:03 PM1/20/16
to Interactive Media Ads SDK
As I mentioned in the first my post, I need to implement something as we can see here:
https://developers.google.com/interactive-media-ads/docs/sdks/html5/vastinspector

for VAST XML, we are writing only VAST XML, without any links to ad server, etc.

четверг, 21 января 2016 г., 0:48:59 UTC+2 пользователь Pavlo Ivanchyshyn написал:

Pavlo Ivanchyshyn

unread,
Jan 21, 2016, 7:53:57 AM1/21/16
to Interactive Media Ads SDK
So, I'm following these steps:

1) creating adDisplayContainer with an alternative video element
2) initializing it
3) creating a new adsLoader with a created adDisplayContainer
4) add Event listeners for adsLoader

and then...
create an adsRequest and requestAds from the Ad server(but I don't need to load it from remote server, I just have a VAST XML and I want to load it, instead of loading xml from remote server, but  as I can see in documentation, adTagUrl is a required field for AdsRequest....

and here I don't know how can I load the VAST XML from my textarea to the adsLoader (which classes or/and methods to use)

четверг, 21 января 2016 г., 1:42:03 UTC+2 пользователь Pavlo Ivanchyshyn написал:

Tyler Sidell (IMA SDK Team)

unread,
Jan 21, 2016, 9:27:37 AM1/21/16
to Interactive Media Ads SDK
Hi Pavlo,

Thanks for the clarification. Instead of adTagUrl, you can pass in your VAST response via adsResponse, which will allow you to specify a VAST document to be used as the ads response instead of making a request via an ad tag url.

Cheers,
Tyler Sidell
IMA SDK Team

Pavlo Ivanchyshyn

unread,
Jan 21, 2016, 9:35:18 AM1/21/16
to Interactive Media Ads SDK
ah, I understand...

But what should be a value of adTagUrl? It can't be empty because its a required field.

четверг, 21 января 2016 г., 16:27:37 UTC+2 пользователь Tyler Sidell (IMA SDK Team) написал:

Tyler Sidell (IMA SDK Team)

unread,
Jan 21, 2016, 10:53:15 AM1/21/16
to Interactive Media Ads SDK
Hi Pavlo,

You can try setting adTagUrl to any junk string such as "tagUrl" and then setting the adsResponse to the VAST response.  Another option is to set adTagUrl to an empty string:
adsRequest.adTagUrl = '';

Please give that a try and let us know if that works for you.

Thanks,
Tyler Sidell
IMA SDK Team

Pavlo Ivanchyshyn

unread,
Jan 21, 2016, 2:53:20 PM1/21/16
to Interactive Media Ads SDK
Yeah, it works. Thanks.

I guess, it makes sense to fix it in the documentation, that adTagUrl is an optional parameter too, because if it possible to set it up to the empty string, it means that it's not required. I spent really a lot of hours because of this issue.

четверг, 21 января 2016 г., 17:53:15 UTC+2 пользователь Tyler Sidell (IMA SDK Team) написал:

Tyler Sidell (IMA SDK Team)

unread,
Jan 21, 2016, 4:49:23 PM1/21/16
to Interactive Media Ads SDK
Hi Pavlo,

Thanks for the recommendation.  Will speak to the rest of the team to see if we can update the documentation pertaining to this item.

Cheers,
Tyler Sidell
IMA SDK Team

Miro Baia

unread,
Jul 12, 2019, 9:21:34 AM7/12/19
to Interactive Media Ads SDK
I'm in big trouble for not understanding much of js I've been trying for some time to setup the ads.js file and I'm not getting it. I already did the whole situation in ad manager for video and I can not configure it, I got this code:
 
'iu=/20842751/PescWeb&description_url=http%3A%2F%2Fpescweb.com%2Fgoogleads%2Fsimple%2F&env=vp&impl=s&correlator=&tfcd=0&npa=0&gdfp_req=1&'+
'output=vast&sz=1x1|640x480&ciu_szs=320x50&min_ad_duration=30000&max_ad_duration=60000&unviewed_position_start=1'; 

and this setting is not responding. Someone to help me in this situation.
The code is the one below. How to properly set up to insert into ads.js:


Thanks in advance!

Miro Baia

unread,
Jul 12, 2019, 9:22:28 AM7/12/19
to Interactive Media Ads SDK

IMA SDK

unread,
Jul 12, 2019, 3:37:44 PM7/12/19
to show...@gmail.com, ima...@googlegroups.com
Hello there,

Thanks for reaching out to us. We have a sample apps which has all necessary steps required for implementing IMA SDK. Please go through this documentation and our sample apps and let us know if you have any issues. 

Regards,
Deepika Uragayala
 

ref:_00D1U1174p._5001U8KxNU:ref
Reply all
Reply to author
Forward
0 new messages