#1770, set 'data-paused-by-reveal' attribute only for the media elements, which are not already in paused state.

This commit is contained in:
Markku Roponen 2016-12-13 16:02:26 +02:00
parent da40eafccd
commit 962c6c133b
1 changed files with 1 additions and 1 deletions

View File

@ -3071,7 +3071,7 @@
if( slide && slide.parentNode ) {
// HTML5 media elements
toArray( slide.querySelectorAll( 'video, audio' ) ).forEach( function( el ) {
if( !el.hasAttribute( 'data-ignore' ) && typeof el.pause === 'function' ) {
if( !el.hasAttribute( 'data-ignore' ) && typeof el.pause === 'function' && el.paused === false ) {
el.setAttribute('data-paused-by-reveal', '');
el.pause();
}