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

Ad content only


Hello, there is a way to use the jwplayer to display only ads ( no video needed ) ??
Like this,
jwplayer("container").setup({
advertising: {
client: "vast",
tag: "http://serve.vdopia.com/adserver/vastxml/4b2d8203d7734396e4546ae4161890b5/preroll|ytpreroll/category:IAB1|IAB2|IAB4|IAB8|IAB7;api_test:true;format:vast;tagtype:publisher;ru=[referrer];rand=[TIME_STAMP]"
}
});

4 Community Answers

Todd

JW Player Support Agent  
0 rated :

Sorry, we do not have an “ads only” mode, so you must have a file: ’’ defined in your jwplayer().setup() in order to make the player work. My suggestion would be to have a half-second long blank MP4 video with just a black screen. The player will start, play your ad, and then show the black screen briefly. The end result is basically imperceptible for your viewers.

d...

User  
0 rated :

try using this event listener

playerInstance.on("adComplete",function(event){
//add code here
});
playerInstance.on("adError",function(event){
//add code here
});

Todd

JW Player Support Agent  
0 rated :

You would still need to instantiate our player with a file: ’’ in order to be able to call those ads-related API events.

d...

User  
0 rated :

Yes he should. So in his case it would be like this... sorry I forgot to add the file :)

var playerInstance = jwplayer("#containerId").setup({
file: "urlToTheVideoFile",
image: "urlToTheImageFile",
mediaid:"yourMediaId",
primary: "flash",
advertising: {
client: "vast",
tag: "http://serve.vdopia.com/adserver/vastxml/4b2d8203d7734396e4546ae4161890b5/preroll|ytpreroll/category:IAB1|IAB2|IAB4|IAB8|IAB7;api_test:true;format:vast;tagtype:publisher;ru=[referrer];rand=[TIME_STAMP]"
}
});
playerInstance.on("adComplete",function(event){
//add code here.
// If you want to remove the player after the ad video is completed
// do a jwplayer("#containerId").remove();
});
playerInstance.on("adError",function(event){
//add code here
});

This question has received the maximum number of answers.