#1770, set 'data-paused-by-reveal' attribute only for the media elements, which are not already in paused state.
This commit is contained in:
parent
da40eafccd
commit
962c6c133b
1 changed files with 1 additions and 1 deletions
|
@ -3071,7 +3071,7 @@
|
||||||
if( slide && slide.parentNode ) {
|
if( slide && slide.parentNode ) {
|
||||||
// HTML5 media elements
|
// HTML5 media elements
|
||||||
toArray( slide.querySelectorAll( 'video, audio' ) ).forEach( function( el ) {
|
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.setAttribute('data-paused-by-reveal', '');
|
||||||
el.pause();
|
el.pause();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue