diff --git a/README.md b/README.md index 557ca4b2..9220b2bb 100644 --- a/README.md +++ b/README.md @@ -346,6 +346,13 @@ Reveal.initialize({ // instead of using the defaultTiming value totalTime: 0, + // Specify the minimum amount of time you want to allot to + // each slide, if using the totalTime calculation method. If + // the automated time allocation causes slide pacing to fall + // below this threshold, then you will see an alert in the + // speaker notes window + minimumTimePerSlide: 0; + // Enable slide navigation via mouse wheel mouseWheel: false, diff --git a/plugin/notes/notes.html b/plugin/notes/notes.html index b5635bc5..fdb81ad1 100644 --- a/plugin/notes/notes.html +++ b/plugin/notes/notes.html @@ -540,6 +540,7 @@ callRevealApi( 'getSlidesAttributes', [], function ( slideAttributes ) { callRevealApi( 'getConfig', [], function ( config ) { var totalTime = config.totalTime; + var minTimePerSlide = config.minimumTimePerSlide || 0; var defaultTiming = config.defaultTiming; if ((defaultTiming == null) && (totalTime == null)) { callback(null); @@ -574,6 +575,11 @@ // And now we replace every zero-value timing with that average timings = timings.map( function(x) { return (x==0 ? timePerSlide : x) } ); } + var slidesUnderMinimum = timings.filter( function(x) { return (x < minTimePerSlide) } ).length + if ( slidesUnderMinimum ) { + message = "The pacing time for " + slidesUnderMinimum + " slide(s) is under the configured minimum of " + minTimePerSlide + " seconds. Check the data-timing attribute on individual slides, or consider increasing the totalTime or minimumTimePerSlide configuration options (or removing some slides)."; + alert(message); + } callback( timings ); } ); } );