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

onComplete Event


I have a RSS playlist that will play through to the next item and so forth. This behavior is undesirable.
The *behavior I need* is as follows:
<ol>
<li>user clicks next button</li>
<li>song2.mp3 plays</li>
<li>song2.mp3 completed</li>
<li>song2.mp3 pause</li>
<li>*user clicks next button*</li>
<li>song3.mp3 plays</li>
<li>song3.mp3 completed</li>
<li>song3.mp3 pause</li>
<li>etc...</li>
</ol>
So basicly I want the user to click _next_ in order to proceed to the next track.

What is actually happening is *not desirable behavior*:
<ol>
<li>user clicks next button</li>
<li>song2.mp3 plays</li>
<li>song2.mp3 completed</li>
<li>song2.mp3 plays</li>
<li>song2.mp3 plays in loop until there's user interaction</li>
</ol>

It's probably my use of events on the embed.... onComplete (abox.html) maybe?
*Test Page URL*
http://s3-us-west-1.amazonaws.com/glsbx/abox/abox.html
or
http://glsbx.s3.amazonaws.com/abox/abox.html

*Test Page: abox.html*
bc.. <!DOCTYPE html>
<html>
<head>
<title>audioBox</title>
<meta charset="utf-8">
<script type="text/javascript" src="http://p.jwpcdn.com/6/8/jwplayer.js"></script>
</head>
<body>
<div id="abox">Contact support......</div>
<script type="text/javascript">
jwplayer("abox").setup ({
playlist: "playlist.rss",
width: "330",
height:"30",
events: {
onReady: function() {
jwplayer("abox").setVolume(100);
},
onComplete: function() {
jwplayer("abox").pause();
}
}
})
</script>
</body>
</html>



*Playlist: playlist.rss*
bc.. <rss version="2.0" xmlns:jwplayer="http://rss.jwpcdn.com/">
<channel>

<item>
<title>Song 1</title>
<description></description>
<jwplayer:source file="http://s3-us-west-1.amazonaws.com/glsbx/abox/song1.mp3" />
<jwplayer:source file="http://s3-us-west-1.amazonaws.com/glsbx/abox/song1.ogg" />
</item>

<item>
<title>Song 2</title>
<description></description>
<jwplayer:source file="http://s3-us-west-1.amazonaws.com/glsbx/abox/song2.mp3" />
<jwplayer:source file="http://s3-us-west-1.amazonaws.com/glsbx/abox/song2.ogg" />
</item>

<item>
<title>Song 3</title>
<description></description>
<jwplayer:source file="http://s3-us-west-1.amazonaws.com/glsbx/abox/song3.mp3" />
<jwplayer:source file="http://s3-us-west-1.amazonaws.com/glsbx/abox/song3.ogg" />
</item>

</channel>
</rss>

4 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

Call jwplayer().stop(), when the onComplete() event is fired.

JW Player

User  
0 rated :

Thanks for the prompt reply, Ethan.
So I just replace:
bc.. onComplete: function() {
jwplayer("abox").pause();


with this:
bc.. onComplete: function() {
jwplayer("abox").stop();


JW Player

User  
0 rated :

It's not exactly what I want, but I can work with this, thanks.

Ethan Feldman

JW Player Support Agent  
0 rated :

Yes, exactly, np.

This question has received the maximum number of answers.