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

Need to show ad only once

Hi Team,

We've setup a player using jw-player. We're facing this issue of ad repeating after every vod loads. Jw-player is calling ad server with every new vod.

To execute this scenario please do following steps:
1. click on the link let the ad play.
2. click on next button, to the right of the player.
3. Observe ad comes again.

To give you a clue, we're encoding the vod in php, then in flash its decoded, that decoded path is then given to jw-player.

See video clipping to understand more about this issue:
view link of the player setup:

1 Community Answers


JW Player Support Agent  
0 rated :


I am assuming you are getting an ad in front of every video because you have a playlist with a pre-roll ad scheduled. Instead of the pre-roll ad schedule, I would create a variable named adPlayed and set it to false. Using our Javascript API’s onPlay() call, I would check to see if adPlayed == false, then set adPlayed = true, then play the ad with our playAd() call. The rest of the videos should play without loading an ad now.

Hope this helps,

This question has received the maximum number of answers.