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

jwplayer().stop(); - How to use this code for multiple players?

Hi, I tried but i'm not a pro in programming so I have no clue how to do this..

My menu look like this :

<li><a href="#page2" onclick="jwplayer('video_pub').stop();" rel="slide">PUBLICITS</a>·</li>
<li><a href="#page3" onclick="jwplayer('video_pub').stop();" rel="slide">FILMS/TV</a>·</li>
<li><a href="#page4" onclick="jwplayer('video_pub').stop();" rel="slide">JEUX VIDO</a>·</li>
<li><a href="#page5" onclick="jwplayer('video_pub').stop();" rel="slide">PROJETS</a>·</li>
<li><a href="#page6" onclick="jwplayer('video_pub').stop();" rel="slide">CONTACT</a></li>

The thing is I want other video ID to stop if I click on different menu..

How do I do this?

I have tried : onclick="jwplayer('video_pub','video1').stop();"
Doesn't work. Only the 'video_pub' stop...

Anyone help please !

3 Community Answers

JW Player

-1 rated :


work for you?

JW Player

0 rated :

think events

bc.. onReady: function ()
do something here to stop th eother player

Note also, if you are using multiple events then I would list the above first in the events listing and have a comma after the }

Using the events feature of the JWPlayer is IMHO an extremely powerful feature which I use extensively on my web site;

JW Player

0 rated :

Thanks AB ! It works!

Wow that was easy ! I feel stupid !

I have tried jwplayer('video_pub', 'video1', 'etc').stop();
and so on...

Never thought of this !

Thanks !!!!

This question has received the maximum number of answers.