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

adComplete not fires on beforeComplete

I want to fire, when a postroll-ad was viewed until the end.

My Code:

jwplayer("player").on('beforeComplete', function(e){

jwplayer("player").on('adComplete', function(e){
console.debug("ad complete");

the "adComplete" never fires. on prerolls (beforeStart) and midrolls (onTime) the event fires.

Is it a bug?

3 Community Answers


JW Player Support Agent  
0 rated :


I believe you might be missing the advertising: {} parameter which tells the player what type of ad it is loading. I’ve included an example below:

var playerInstance = jwplayer(‘myElement’);playerInstance.setup({file: ‘bunny.mp4’,advertising: {client: “vast”,}});
playerInstance.on(‘beforeComplete’, function(){playerInstance.playAd(‘,test’); console.debug(“adPlayed”);


melanie N/A

0 rated :

Hi Randy,

i don't had the advertising-tag, but i had the preroll through the jw üplayer library. I have there a vast-code and i think that the advertising-tag was added by the library.

I add the tag manualy and my code looks like this:

<script type="text/javascript" src=""></script>

<script type="text/javascript">
file: "http....",
image: 'http...',
title: "My Title",
androidhls: true,
advertising:{client: "vast"}

Nothing changed. The adcomplete event is not there when i use playAd in the onBeforecomplete.


0 rated :

Hi Randy,

any News?

This question has received the maximum number of answers.