This commit is contained in:
Hakim El Hattab 2015-03-25 15:48:10 +01:00
parent 70ab0ae80b
commit e19931abab

View file

@ -3501,14 +3501,17 @@
// If there are media elements with data-autoplay, // If there are media elements with data-autoplay,
// automatically set the autoSlide duration to the // automatically set the autoSlide duration to the
// length of that media // length of that media. Not applicable if the slide
toArray( currentSlide.querySelectorAll( 'video, audio' ) ).forEach( function( el ) { // is divided up into fragments.
if( el.hasAttribute( 'data-autoplay' ) ) { if( currentSlide.querySelectorAll( '.fragment' ).length === 0 ) {
if( autoSlide && el.duration * 1000 > autoSlide ) { toArray( currentSlide.querySelectorAll( 'video, audio' ) ).forEach( function( el ) {
autoSlide = ( el.duration * 1000 ) + 1000; if( el.hasAttribute( 'data-autoplay' ) ) {
if( autoSlide && el.duration * 1000 > autoSlide ) {
autoSlide = ( el.duration * 1000 ) + 1000;
}
} }
} } );
} ); }
// Cue the next auto-slide if: // Cue the next auto-slide if:
// - There is an autoSlide value // - There is an autoSlide value