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

How to play ads in jwplayer

I need to play some ads before video play using jw player .

My code file :-

$res = '<?xml version="1.0" encoding="UTF-8"?>';
$res .= '<VAST version="2.0">';
$res .= '<Ad id="static">';
$res .= '<InLine>';
$res .= '<AdSystem>Static VAST Template</AdSystem>';
$res .= '<AdTitle>Static VAST Tag</AdTitle>';
$res .='<Impression></Impression>';
$res .= '<Creatives>';
$res .= '<Creative>';
$res .= '<Linear>';
$res .= '<Duration>00:00:08</Duration>';
$res .= '<TrackingEvents>';
$res .='<Tracking event="start"></Tracking>';
$res .='<Tracking event="firstQuartile"></Tracking>';
$res .='<Tracking event="midpoint"></Tracking>';
$res .='<Tracking event="thirdQuartile"></Tracking>';
$res .='<Tracking event="complete"></Tracking>';
$res .='<Tracking event="pause"></Tracking>';
$res .='<Tracking event="mute"></Tracking>';
$res .='<Tracking event="fullscreen"></Tracking>';
$res .='</TrackingEvents>';
$res .='<VideoClicks>';
$res .='<ClickThrough></ClickThrough>';
$res .='<ClickTracking></ClickTracking>';
$res .='</VideoClicks>';
$res .='<MediaFiles>';
$res .='<MediaFile type="video/mp4" bitrate="300" width="480" height="270">';
$res .='';
$res .='</MediaFile>';
$res .='</MediaFiles>';
$res .='</Linear>';
$res .='</Creative>';
$res .='</Creatives>';
$res .='</InLine>';
$res .='</Ad>';
$res .='</VAST>';

file: '',
primary: 'flash',
advertising: {
client: 'vast',
tag: '<?php // echo $res ;?>'

width: 480,
height: 270

here $res contains the xml format of my ads video file .

1 Community Answers


JW Player Support Agent  
0 rated :

I saw this same question on Stack Overflow, but I will reply here as well.

You cannot provide the contents of the VAST tag in that parameter. You must only give the URL to the VAST tag in the tag: ’’ parameter.

This question has received the maximum number of answers.