Looking to make a carousel were I can add control the following:
Slide1 AutoPlay a 30 second video and then move to the next.
Slide2 AutoPlay a 20 second video and then move to the next.
Slide3 AutoPlay a 50 second video and then move to the next.
I saw this, but not sure it will help.
<script>
// Customize carousel slide intervals
$('#videoCarousel').on('slide.bs.carousel', function (e) {
var carousel = $(this);
var interval;
switch (e.to) {
case 0:
interval = 5000; // 5 seconds for slide 0
break;
case 1:
interval = 8000; // 8 seconds for slide 1
break;
case 2:
interval = 3000; // 3 seconds for slide 2
break;
default:
interval = 5000; // Default interval
}
carousel.carousel('pause');
setTimeout(function() {
carousel.carousel('next');
}, interval);
});
</script>
You have more things to think about than just advancing the slide, like video buffering times, so you would advance the slide when the video ends, not a fixed duration.
Do you need audio? The browser restrictions on autoplay and how this will work on mobile.
Auto playing video without opt in is bad for the mobile user experience.
Also would you want people to be able to advance without waiting.
You are heading into pay a web developer territory really, so I will only give you some things to consider. I wont be providing any solutions.
But I will give you a hint, you can make use of the BS carousel events
Then with all this you need to question if a carousel is actually the right approach, when you can just embed this and manage it with Javascript.
Man, Pete as busy as you are I am thankful for your willingness to help.
i don’t know anything about buffering video. I did see some info on Preload the video.
You’re are correct about advancing the video to the next when the video ends.
I would like the audio to play, but I am aware it does not always work.
People advancing could be done through the arrows
If I knew JS… yes
Yeah but you can do this in the video edit which will be so much slicker and smoother?
You can cut it to fade in whatever time you want and have much better transitions and much easier to add and change in the future.
To me personally its like your trying to use a Carousel to be a video editing suite with code etc where a video to me makes so much more sense and visually will be much better.
If your using Blocs then you have a Mac and will have iMovie on - thats perfect for so many applications and even thought its classed as a basic editing suite you will not believe the power this tool has, I’ve seen mind-blowing videos edited on it from my videos guys on events.
Good luck which ever way you do.
ps, forgot to mention - if you have Audio on these videos too, then doing a video will be more powerful in terms of keeping levels the same, fading out audio at the end of each transition rather than a SNAP to go to next slide, and even overlay some nice music on the slide transition if need be and add titles.
Okay I get what you are saying. While your suggestion some good thoughts, it will not work because the amount of mp4 would make the file too large. I appreciate you taking the time to reply.
Thanks Pete, I’ve got a few I am going to try.
It would be cool, if a Blocs had this feature of adding a Video Carousel with the at some of the of the thing I’ve mentioned.