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

programatically stopping an Ad playing


Hi,

I am integrating with jwplayer and VAST

is there a way to stop the player while an ad is playing ?



jwplayer().stop() does not seem to stop the ad playing, it seems it only stop the video content (bkaovAYt-640.mp4)

jwplayer("container1").setup({
image: "http://s1-www.ltvimg.com/cdn/farfuture/A4Ot5zIiiX6I0zhJTvqF9xyAg6frFcAuXu3YpmtQUzc/mtime:1388777784/sites/default/files/vast-preoll.png",
file: "http://content.bitsontherun.com/videos/bkaovAYt-640.mp4",
primary: 'flash',
advertising: {
client: "vast",
}
});

// start the ad now
_getVideoPlayer().playAd('http://demo.jwplayer.com/player-demos/assets/preroll.xml');


// from a button:
jwplayer("container1").stop()

thanks!

4 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

I am not sure if this is something we really support, but do you have an example of where you are trying this? Why do you want to stop an ad?

JW Player

User  
0 rated :

thanks nathan i managed stop the videos and remove the player no matter if they are ads or content by calling .remove().

all good

-sc

JW Player

User  
0 rated :

thanks ethan not nathan ;-)

Ethan Feldman

JW Player Support Agent  
0 rated :

Np ;-)

This question has received the maximum number of answers.