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

Swapping video divs


Hi,

I currently have a video carousel that contains 8 videos, and a main video div which also contains a video. I want my main video div to be replaced by the videos from the video carousel when the main video is done.

jwplayer("main_video").setup({
file: "big_buck.mp4",
image: "big_buck.png",
height: 350,
width: 1000,
autostart: true,
events: {
onComplete:function(){
jwplayer("main_video").load('container1');
jwplayer("main_video").play()
}
}
});
jwplayer("container1").setup({
file: "big_buck.mp4",
image: "big_buck.png",
height: 150,
width: 250

});
jwplayer("container2").setup({
file: "big_buck.mp4",
image: "big_buck.png",
height: 150,
width: 250

});
jwplayer("container3").setup({
file: "big_buck.mp4",
image: "big_buck.png",
height: 150,
width: 250

});

that is my current setup, just testing it out on one video for now. The carousel videos are container1, container2, container 3. Right now when the main video div video finishes, it just turns the jwplayer black and i cant reload the original main video and i get thrown a 404 error in the console.

Im trying to avoid a playlist because my carousel is setup through the slick plugin, so i cant temper with it too much. Is there another way to do it? Thank you!

3 Community Answers

George

JW Player Support Agent  
0 rated :

How many active players are you expecting to have at any given moment?

Maaz

User  
0 rated :

Just one active player at a given moment, the active player being the main video.

George

JW Player Support Agent  
0 rated :

In which case, you basically have one player and multiple images. Have a look at this demo:
http://qa.jwplayer.com.s3.amazonaws.com/~george/playlist_sidebar_images_no_meta.html

This question has received the maximum number of answers.