Does this have the ability to start automatically and go through the slides without using the controls?
This isn't currently supported but I like the idea. On the to-do list.
Hello,
This function would be great, is there a roadmap for this, a date...?
Also the ability to have a video that start automatically on a slide, going to next at the end of the video...
There's no roadmap for this project – I'm just getting to things as I find time here and there – but I'll let you know once this has been added. Continuing after a video ends is a very specific case so that should be implemented for that particular presentation. Starting the video when the slide activates can be achieved by using the 'slidechanged' event.
Thanks a lot, your project is fantastic !
So i wait until you add the ability to autostart the slideshow, and then i'll ask you details how to going next slide after the end of video.
Thanks a lot !
This has been added now. You'll need to specify a millisecond value (time between auto-sliding) in the Reveal.initialize call. For example:
Reveal.initialize({
autoSlide: 3000,
loop: true
});
great ! thank you, i gonna try !
i'll also see for an autostart and a event at the end of the video
it works very well !
Would you have an idea, how i could automatically start a video (local or youtube), pausing the autostart when playing, then going next slide when video ends...? I don't understand how to use 'slidechanged' event.
thanks !
Unfortunately there's currently no way to stop the auto-sliding programmatically so you'd need to add an API function for that as well (in the bottom of reveal.js). All you should need to do is call config.autoSlide = 0;
Not sure how to best adjust slide forwarding to video playback but it would involved the 'slidechanged' event as well as listening for when the video ends and adjusting the autoSlide property accordingly. Unfortunately I don't have time to help out with that one.
is it possible to auto play a single slide then stop ? thx
Yes it's possible , you can try it...........
// Slide every five seconds
Reveal.configure({
autoSlide: 5000
});
is it possible to apply autoslide for each slide?
i.e
for first slide - 2 sec
for second - 3 sec
@vinitpatel03 check out data-autoslide attribute
<section data-autoslide="2000"></section>
<section data-autoslide="3000"></section>
Hey,, I am sorry, is it possible to put animated gif in it?
I have enable autoSlide for a video slide.
The video duration is 10 seconds, and my autoSlide 3, but currently the video still playing until finished it.
@hakimel any idea to solve this???
for automatically going to next slide after youtube video (loaded by iframe) has ended:
var tag = document.createElement('script');
tag.src = "//www.youtube.com/player_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
function onYouTubeIframeAPIReady() {
function onPlayerStateChange(event) {
if (event.data == YT.PlayerState.ENDED) {
Reveal.next();
}
}
function createYouTubePlayersEventListeners() {
var selectors = [
".slide-background-content > iframe[data-src*='www.youtube-nocookie.com/embed/']"
,".slide-background-content > iframe[data-src*='www.youtube.com/embed/']"
].join(', ');
var iframeYouTubePlayers = document.querySelectorAll(selectors);
iframeYouTubePlayers.forEach(function(iframeYouTubePlayer) {
iframeYouTubePlayer.onload = function() {
new YT.Player(iframeYouTubePlayer, {
events: {
'onStateChange': onPlayerStateChange
}
});
}
});
}
createYouTubePlayersEventListeners();
}
Most helpful comment
This has been added now. You'll need to specify a millisecond value (time between auto-sliding) in the Reveal.initialize call. For example:
Reveal.initialize({
autoSlide: 3000,
loop: true
});