javascriptjwplayeradsvast

How can I embed the following VAST tag in a test page?


Let's say I've got a VAST ad tag for pre-roll large videos. When I enter the VAST url in the browser, The content of the VAST doc contains:

...
<MediaFile delivery="progressive" width="500" height="300"
  type="application/javascript" apiFramework="VPAID">
   <![CDATA[
    http://path/to/some.js
   ]]>
</MediaFile>
...

As you can see, the media file is of type .js and not really a media file (e.g. .mp4)

How can I embed this VAST tag in my test page?

I'm not sure that adding it to our player playlist will be a good solution since as I understand, the .js file itself contains a reference to a player


Solution

  • When setting up the JW Player with a VAST tag, you do it like this - http://support.jwplayer.com/customer/portal/articles/1431665-basic-preroll-video-ads

    jwplayer('myElement').setup({
      file: 'assets/myVideo.mp4',
      primary: 'flash',
      advertising: {
        client: 'vast',
        tag: 'http://adserver.com/vastResponse.xml'
      }
    });