#1770, resume playback for paused media.
This commit is contained in:
parent
d6406e433e
commit
6831f6c174
|
@ -3016,7 +3016,8 @@
|
||||||
|
|
||||||
// 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-autoplay' ) && typeof el.play === 'function' ) {
|
if( ( el.hasAttribute( 'data-autoplay' ) || el.hasAttribute( 'data-paused-by-reveal' ) ) && typeof el.play === 'function' ) {
|
||||||
|
el.removeAttribute('data-paused-by-reveal');
|
||||||
el.play();
|
el.play();
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
@ -3071,6 +3072,7 @@
|
||||||
// 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.addAttribute('data-paused-by-reveal');
|
||||||
el.pause();
|
el.pause();
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
Loading…
Reference in New Issue