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

Playlist with RTMP streaming set video with playlistItem() ignores stop


I'm working with a playlist and the content is being served via RTMP. I have a set of buttons on the page that allows the user to jump to a specific video.

When they do this I run the following Javascript:

bc.. jwplayer().playlistItem(index) // index is passed in via the button
jwplayer().stop();



The problem I have is that the stop() call is ignored, the video will switch and then begin buffering/playing, I have found that if I use a setTimeout on the stop that it will work but it's shot in the dark to guess the right number of milliseconds to use. Is there another way to prevent the video from playing when I set the playlistItem?

For completeness here's my embed code:

bc.. jwplayer("player").setup({
playlist: [
{
"image": "video-1.jpg",
"sources": [
{
"file": "1.smil"
},
{
"file": "https://s3.amazonaws.com/hways-video/1.mp4"
}
]
},
{
"image": "2.jpg",
"sources": [
{
"file": "2.smil"
},
{
"file": "2.mp4"
}
]
},
{
"image": "3.jpg",
"sources": [
{
"file": "3.smil"
},
{
"file": "3.mp4"
}
]
}
],
width: "100%",
primary: 'flash',
aspectratio: "16:9",
autostart: false
});

1 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

Do you have a link?

This question has received the maximum number of answers.