Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Add a Pre-Roll


I have a code for VMAP for ad scheduler but i would like a pre-roll to start when you click play on the video

<vmap:VMAP xmlns:vmap="http://www.iab.net/vmap-1.0" version="1.0"> <vmap:AdBreak breakType="linear" breakId="85cac7e0fbad11e3b283fbde008b4e10" timeOffset="00:07:00"> <vmap:AdSource allowMultipleAds="true" followRedirects="true" id="1"> <vmap:AdTagURI templateType="vast3">
<![CDATA[
http://www.adotube.com/php/services/player/OMLService.php?avpid=oRYYzvQ&platform_version=vast20&ad_type=linear&groupbypass=1&HTTP_REFERER=http://www.longtailvideo.com&video_identifier=longtailvideo.com,test
]]>

</vmap:AdTagURI> </vmap:AdSource> </vmap:AdBreak> <vmap:AdBreak breakType="linear" breakId="85cac7e0fbad11e3b283fbde008b4e10" timeOffset="00:14:00"> <vmap:AdSource allowMultipleAds="true" followRedirects="true" id="1"> <vmap:AdTagURI templateType="vast3">
<![CDATA[
http://www.adotube.com/php/services/player/OMLService.php?avpid=oRYYzvQ&platform_version=vast20&ad_type=linear&groupbypass=1&HTTP_REFERER=http://www.longtailvideo.com&video_identifier=longtailvideo.com,test
]]>

</vmap:AdTagURI> </vmap:AdSource> </vmap:AdBreak> <vmap:AdBreak breakType="linear" breakId="85cac7e0fbad11e3b283fbde008b4e10" timeOffset="00:30:00"> <vmap:AdSource allowMultipleAds="true" followRedirects="true" id="1"> <vmap:AdTagURI templateType="vast3">
<![CDATA[
http://www.adotube.com/php/services/player/OMLService.php?avpid=oRYYzvQ&platform_version=vast20&ad_type=linear&groupbypass=1&HTTP_REFERER=http://www.longtailvideo.com&video_identifier=longtailvideo.com,test
]]>

</vmap:AdTagURI> </vmap:AdSource> </vmap:AdBreak> <vmap:AdBreak breakType="linear" breakId="85cac7e0fbad11e3b283fbde008b4e10" timeOffset="end"> <vmap:AdSource allowMultipleAds="true" followRedirects="true" id="1"> <vmap:AdTagURI templateType="vast3">
<![CDATA[
http://www.adotube.com/php/services/player/OMLService.php?avpid=oRYYzvQ&platform_version=vast20&ad_type=linear&groupbypass=1&HTTP_REFERER=http://www.longtailvideo.com&video_identifier=longtailvideo.com,test
]]>

</vmap:AdTagURI> </vmap:AdSource> </vmap:AdBreak> </vmap:VMAP>

96 Community Answers

Ethan Feldman

JW Player Support Agent  
1 rated :

Where are you running this?

info

User  
0 rated :

On our website

info

User  
0 rated :

http://www.bawn.tv/whatsthefunction/

Ethan Feldman

JW Player Support Agent  
0 rated :

Your ad tag – http://www.bawn.tv/Ads.xml

Seems to fail here – https://developers.google.com/interactive-media-ads/docs/vastinspector_dual

Events

(3:40:07 PM) Ads requested (3:40:08 PM) adError Ad error (code 1103): Unable to request ads from server. Cause: Error #2048: Security sandbox violation: https://imasdk.googleapis.com/flash/core/adsapi_3_0_153.swf cannot load data from http://www.bawn.tv/Ads.xml. (3:40:08 PM) Error: Unable to request ads from server. Cause: Error #2048: Security sandbox violation: https://imasdk.googleapis.com/flash/core/adsapi_3_0_153.swf cannot load data from http://www.bawn.tv/Ads.xml.

It seems to me that you need a crossdomain file here – http://www.bawn.tv/crossdomain.xml

Reference – http://support.jwplayer.com/customer/portal/articles/1403679-crossdomain-file-loading

info

User  
0 rated :

I had a few files uploaded with the same code would that be a reason it would not load?

info

User  
0 rated :

But how would i still ad the Pre-Roll to start before the video content starts?

Ethan Feldman

JW Player Support Agent  
0 rated :

What do you mean? The ad tag fails in Google’s own inspector.

Ethan Feldman

JW Player Support Agent  
0 rated :

That is what is done by default…

info

User  
0 rated :

Ok so how do i correct this issue? Because when the video player start you can see the ad breaks but no ad displays.

Ethan Feldman

JW Player Support Agent  
0 rated :

The ads are not displaying because you are missing a crossdomain.xml file on your server. I said that before.

info

User  
0 rated :

So i have to add http://www.bawn.tv/crossdomain.xml to the server?

Sorry for all of the questions. Just wanted to know why did it stop working.

Ethan Feldman

JW Player Support Agent  
0 rated :

Yes, you do. It was working before? What did you change?

info

User  
0 rated :

I removed some duplicated xml files

info

User  
0 rated :

I added a crossdomain.xml file to our server

info

User  
0 rated :

http://www.bawn.tv/crossdomain.xml

Ethan Feldman

JW Player Support Agent  
0 rated :

Now I get a different error:

Events

(6:24:43 PM) Ads requested (6:24:44 PM) adError Ad error (code 0): Custom content loaded, but there’s no event handler for it. (6:24:44 PM) Error: Custom content loaded, but there’s no event handler for it.

https://developers.google.com/interactive-media-ads/docs/vastinspector_dual

This is happening in the Google inspector, not even the JW Player.

I would add back what you removed. It might have broken something.

info

User  
0 rated :

ok

info

User  
0 rated :

http://www.bawn.tv/whatsthefunction

Try it now to see if that works

Ethan Feldman

JW Player Support Agent  
0 rated :

What did you change?

info

User  
0 rated :

The code was spaced out to much and didn't allow it to connect

Ethan Feldman

JW Player Support Agent  
0 rated :

That has nothing to do with it. The ads don’t work here.

info

User  
0 rated :

I changed the vast tags so no ads will display at the moment until they are activated. But i would like to know how to add a preroll code with the VMAP code displayed above

Ethan Feldman

JW Player Support Agent  
0 rated :

http://support.jwplayer.com/customer/portal/articles/1432026-vmap-ad-schedule

info

User  
0 rated :

<vmap:VMAP xmlns:vmap="http://www.iab.net/vmap-1.0" version="1.0">
<vmap:AdBreak breakType="linear" breakId="mypre" timeOffset="start">
<vmap:AdSource allowMultipleAds="true" followRedirects="true" id="1">
<vmap:VASTData>
<VAST version="3.0" xsi:noNamespaceSchemaLocation="vast.xsd">
...
</VAST>
</vmap:VASTData>
</vmap:AdSource>
<vmap:TrackingEvents>
<vmap:Tracking event="breakStart">http://vast.yashi.com/test
</vmap:Tracking>
</vmap:TrackingEvents>
</vmap:AdBreak>
<vmap:AdBreak breakType="linear" breakId="myid" timeOffset="00:10:23.125">
<vmap:AdSource allowMultipleAds="true" followRedirects="true" id="2">
<vmap:VASTData>
<VAST version="3.0" xsi:noNamespaceSchemaLocation="vast.xsd">...
</VAST>
</vmap:VASTData>
</vmap:AdSource>
<vmap:TrackingEvents>
<vmap:Tracking event="breakStart">http://vast.yashi.com/test
</vmap:Tracking>
</vmap:TrackingEvents>
</vmap:AdBreak>
<vmap:AdBreak breakType="linear" breakId="mypost" timeOffset="end">
<vmap:AdSource allowMultipleAds="true" followRedirects="true" id="3">
<vmap:VASTData>
<VAST version="3.0" xsi:noNamespaceSchemaLocation="vast.xsd">
...
</VAST>
</vmap:VASTData>
</vmap:AdSource>
<vmap:TrackingEvents>
<vmap:Tracking event="breakStart">http://vast.yashi.com/test
</vmap:Tracking>
</vmap:TrackingEvents>
</vmap:AdBreak>
</vmap:VMAP>

<h3>Features not yet supported</h3>
<ul>
<li>repeatAfter attribute</li>

Does this seem right?

Ethan Feldman

JW Player Support Agent  
0 rated :

Seems OK to me.

info

User  
0 rated :

just pluged it in an doesn't seem to be working.

http://www.bawn.tv/whatsthefunction3

Ethan Feldman

JW Player Support Agent  
0 rated :

http://www.bawn.tv/vmap.xml

Does not work here – https://developers.google.com/interactive-media-ads/docs/vastinspector_dual

Events

(12:10:23 PM) Ads requested (12:10:24 PM) adError Ad error (code 302): No ads were found in the ad response. At least one ad is required to be able to load or play. (12:10:24 PM) Error: No ads were found in the ad response. At least one ad is required to be able to load or play

info

User  
0 rated :

There is a test ad: http://vast.yashi.com/test

But i feel that its in the wrong location or the code that i have generated is not correct.

Again I am sorry for the repeated questions. I am following the directions which got the midrolls working but the preroll is not activating

Ethan Feldman

JW Player Support Agent  
0 rated :

This seems to work. Have you tried to load this into your player?

info

User  
0 rated :

I did and it works as only a preroll but i wanted to have a midroll, and post-roll

Ethan Feldman

JW Player Support Agent  
0 rated :

Here is a sample you can use:

https://gist.github.com/emaxsaun/e57d976feefd52948498

info

User  
0 rated :

Thanks I will test it out

Ethan Feldman

JW Player Support Agent  
0 rated :

Np

info

User  
0 rated :

So after </vmap:AdSource> should i plug in the vast tag?

Ethan Feldman

JW Player Support Agent  
0 rated :

Try ours exactly first. It works.

info

User  
0 rated :

Ok so i applied it http://www.bawn.tv/whatsthefunction3

I don't see the midroll dots or anything.

Ethan Feldman

JW Player Support Agent  
0 rated :

You seem to be using the JW Player WordPress plugin. I would disable it. You have no need for it, as you are a JW Platform customer.

info

User  
0 rated :

I am appying it using the code i get from JWPlayer Platform

Ethan Feldman

JW Player Support Agent  
0 rated :

Can you disable the WP plugin?

info

User  
0 rated :

I did

info

User  
0 rated :

bawn.tv/vmap.xml

You can see the code on our server

Ethan Feldman

JW Player Support Agent  
0 rated :

Your VMAP is not working because of a CORS issue.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://www.bawn.tv/vmap.xml. This can be fixed by moving the resource to the same domain or enabling CORS.

http://enable-cors.org/

info

User  
0 rated :

Wow! So now i am kind of lost it states add this as a header:

Access-Control-Allow-Origin: *


So i assume to add this on top of the VMAP Code listed abover

Ethan Feldman

JW Player Support Agent  
0 rated :

It has to be added to your web server, in .htaccess.

info

User  
0 rated :

U have updated the .htaccess

info

User  
0 rated :

I mean i have updated the .htaccess

Ethan Feldman

JW Player Support Agent  
0 rated :

No you didn’t. You added it to – http://www.bawn.tv/vmap.xml, which broke the XML.

info

User  
0 rated :

Sorry I corrected it

Ethan Feldman

JW Player Support Agent  
0 rated :

Now http://www.bawn.tv/vmap.xml is a 500 internal server error

info

User  
0 rated :

# BEGIN WordPress
Access-Control-Allow-Origin: *
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Ethan Feldman

JW Player Support Agent  
0 rated :

Same error now.

http://content.jwplatform.com/previews/X6szBdVD-vgUfKl60

ET http://www.bawn.tv/vmap.xml

Error loading file

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://www.bawn.tv/vmap.xml. This can be fixed by moving the resource to the same domain or enabling CORS.

info

User  
0 rated :

This is was is in the .htaccess

Ethan Feldman

JW Player Support Agent  
0 rated :

You should ask your host to do this for you at this point.

info

User  
0 rated :

ok

info

User  
0 rated :

http://www.bawn.tv/whatsthefunction2

Seeming to be working

info

User  
0 rated :

Now to trying to see where to put the vast tag?

Where Should it go :

<vmap:AdSource id="midroll-1-ad" allowMultipleAds="false" followRedirects="true">
<vmap:AdTagURI templateType="vast3">/static-tag/midroll.xml?mr1</vmap:AdTagURI>

Ethan Feldman

JW Player Support Agent  
0 rated :

Glad you got it.

Just replace the sample tags from our demo with your own.

info

User  
0 rated :

So replace this line

<vmap:AdTagURI templateType="vast3">/static-tag/midroll.xml?mr1</vmap:AdTagURI>

With our own?

So for example:

<vmap:AdTagURI templateType="vast3">http://vast.yashi.com/testI>

Ethan Feldman

JW Player Support Agent  
0 rated :

<vmap:AdTagURI templateType="vast3">/static-tag/midroll.xml?mr1</vmap:AdTagURI>

Becomes:

<vmap:AdTagURI templateType="vast3">http://vast.yashi.com/testI</vmap:AdTagURI>

info

User  
0 rated :

Oh ok got it! Thanks

Ethan Feldman

JW Player Support Agent  
0 rated :

Np

info

User  
0 rated :

So that didn't work when i input the vast tag codes

info

User  
0 rated :

I changed it back to see what it wrong with the code

Ethan Feldman

JW Player Support Agent  
0 rated :

Then something might be wrong with your tags? Our demo works fine, as you can see.

info

User  
0 rated :

Right! But I created a http://www.bawn.tv/midroll.xml to match what was in the sample to see if that works but it didn't call the add

Ethan Feldman

JW Player Support Agent  
0 rated :

You broke our sample entirely.

Look at it.

<script> jwplayer("myElement").setup({ advertising: { client: "vast", tag: "http://search.spotxchange.com/vast/2.00/79391" } }); </script>

Come on.

How is this anything like what we did?

You put a JW Player setup into an XML…

info

User  
0 rated :

No no no, I mean sample

/static-tag/midroll.xml?mr1

I created

http://www.bawn.tv/midroll.xml

To match the /midroll.xml

info

User  
0 rated :

Basically i am attempting to have the bawn.tv/midroll.xml call the ad that i am trying to test to see if it works.

Ethan Feldman

JW Player Support Agent  
0 rated :

Your ad tags can’t have jw player set ups in them! You can’t put Jw player setup JS code into an XML file.

info

User  
0 rated :

I understand that and i wanted to change it but it seems like the set-up and how the vast tag i have been provided are not calling

Ethan Feldman

JW Player Support Agent  
0 rated :

Just make the vmap xml a list of all of your ad tags. Just like our sample. Don’t put JS into an XML. It will break.

info

User  
0 rated :

Here is what the code is with our tag replaced:

<?xml version="1.0" encoding="UTF-8"?>
<vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">
<vmap:AdBreak timeOffset="start" breakType="linear" breakId="preroll">
<vmap:AdSource id="preroll-ad" allowMultipleAds="false" followRedirects="true">
<vmap:AdTagURI templateType="vast3">"http://vast.yashi.com/5004&vid_id=vgUfKl60&vid_title=BawnTv</vmap:AdTagURI>
</vmap:AdSource>
</vmap:AdBreak>
<vmap:AdBreak timeOffset="00:01:40.000" breakType="nonlinear" breakId="overlay-1">
<vmap:AdSource id="overlay-1-ad" allowMultipleAds="false" followRedirects="true">
<vmap:AdTagURI templateType="vast3">/static-tag/overlay.xml</vmap:AdTagURI>
</vmap:AdSource>
</vmap:AdBreak>
<vmap:AdBreak timeOffset="00:05:00.000" breakType="linear" breakId="midroll-1">
<vmap:AdSource id="midroll-1-ad" allowMultipleAds="false" followRedirects="true">
<vmap:AdTagURI templateType="vast3">http://vast.yashi.com/5004&vid_id=vgUfKl60&vid_title=BawnTv</vmap:AdTagURI>
</vmap:AdSource>
</vmap:AdBreak>
<vmap:AdBreak timeOffset="00:06:40.000" breakType="nonlinear" breakId="overlay-2">
<vmap:AdSource id="overlay-2-ad" allowMultipleAds="false" followRedirects="true">
<vmap:AdTagURI templateType="vast3">/static-tag/overlay.xml</vmap:AdTagURI>
</vmap:AdSource>
</vmap:AdBreak>
<vmap:AdBreak timeOffset="00:10:00.000" breakType="linear" breakId="midroll-2">
<vmap:AdSource id="midroll-2-ad" allowMultipleAds="false" followRedirects="true">
<vmap:AdTagURI templateType="vast3">http://vast.yashi.com/5004&vid_id=vgUfKl60&vid_title=BawnTv</vmap:AdTagURI>
</vmap:AdSource>
</vmap:AdBreak>
<vmap:AdBreak timeOffset="00:11:40.000" breakType="nonlinear" breakId="overlay-3">
<vmap:AdSource id="overlay-3-ad" allowMultipleAds="false" followRedirects="true">
<vmap:AdTagURI templateType="vast3">/static-tag/overlay.xml</vmap:AdTagURI>
</vmap:AdSource>
</vmap:AdBreak>
<vmap:AdBreak timeOffset="00:20:00.000" breakType="linear" breakId="midroll-3">
<vmap:AdSource id="midroll-3-ad" allowMultipleAds="false" followRedirects="true">
<vmap:AdTagURI templateType="vast3">http://vast.yashi.com/5004&vid_id=vgUfKl60&vid_title=BawnTv</vmap:AdTagURI>
</vmap:AdSource>
</vmap:AdBreak>
<vmap:AdBreak timeOffset="00:21:40.000" breakType="nonlinear" breakId="overlay-4">
<vmap:AdSource id="overlay-4-ad" allowMultipleAds="false" followRedirects="true">
<vmap:AdTagURI templateType="vast3">/static-tag/overlay.xml</vmap:AdTagURI>
</vmap:AdSource>
</vmap:AdBreak>
<vmap:AdBreak timeOffset="end" breakType="linear" breakId="postroll">
<vmap:AdSource id="postroll-ad" allowMultipleAds="false" followRedirects="true">
<vmap:AdTagURI templateType="vast3">http://vast.yashi.com/5004&vid_id=vgUfKl60&vid_title=BawnTv</vmap:AdTagURI>
</vmap:AdSource>
</vmap:AdBreak>
</vmap:VMAP>

Ethan Feldman

JW Player Support Agent  
0 rated :

Yep, that looks fine. No idea why you created your own xml files with JS code in there.

info

User  
0 rated :

Yea not sure but its not working with the preroll, midroll, or post.

Ethan Feldman

JW Player Support Agent  
0 rated :

Ours worked fine though, right?

info

User  
0 rated :

Yea but when i plug in our vast tags it seem to not display the Ad breaks etc or looks like its attempting to call an ad

Ethan Feldman

JW Player Support Agent  
0 rated :

Can you revert it back to our sample so I can test something?

info

User  
0 rated :

Ok one second doing it now

info

User  
0 rated :

Changed it back

Ethan Feldman

JW Player Support Agent  
0 rated :

I don’t see any ads here ?

http://www.bawn.tv/whatsthefunction2/

info

User  
0 rated :

It may take a second to update

Ethan Feldman

JW Player Support Agent  
0 rated :

Still nothing.

info

User  
0 rated :

http://www.bawn.tv/whatsthefunction3

Ethan Feldman

JW Player Support Agent  
0 rated :

No ads here either. Are you actually trying out the changes yourself?

info

User  
0 rated :

I see the ad breaks now

Ethan Feldman

JW Player Support Agent  
0 rated :

I do not.

info

User  
0 rated :

On my end i see the ad breaks with the JW code

info

User  
0 rated :

I see the ads on

http://www.bawn.tv/whatsthefunction2

And i am changing the codes myself

info

User  
0 rated :

Is the JW Player vpaid compliant?

Ethan Feldman

JW Player Support Agent  
0 rated :

Yes it is.

info

User  
0 rated :

See if its working on?

Ethan Feldman

JW Player Support Agent  
0 rated :

Still nothing on your link.

info

User  
0 rated :

Ok well i will convert back to just the midroll code because that worked and for some reason the preroll don't want to work

Ethan Feldman

JW Player Support Agent  
0 rated :

ok

info

User  
0 rated :

http://www.bawn.tv/whatsthefunction2

Seems to work

Ethan Feldman

JW Player Support Agent  
0 rated :

Great

This question has received the maximum number of answers.