We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb9e507 commit 740f472Copy full SHA for 740f472
js/reveal.js
@@ -2454,6 +2454,17 @@ var Reveal = (function(){
2454
autoSlide = config.autoSlide;
2455
}
2456
2457
+ // If there are media elements with data-autoplay,
2458
+ // automatically set the autoSlide duration to the
2459
+ // length of that media
2460
+ toArray( currentSlide.querySelectorAll( 'video, audio' ) ).forEach( function( el ) {
2461
+ if( el.hasAttribute( 'data-autoplay' ) ) {
2462
+ if( autoSlide && el.duration * 1000 > autoSlide ) {
2463
+ autoSlide = ( el.duration * 1000 ) + 1000;
2464
+ }
2465
2466
+ } );
2467
+
2468
// Cue the next auto-slide if:
2469
// - There is an autoSlide value
2470
// - Auto-sliding isn't paused by the user
0 commit comments