There was an error while loading. Please reload this page.
1 parent 207b0c7 commit d14727bCopy full SHA for d14727b
1 file changed
js/reveal.js
@@ -2904,7 +2904,7 @@
2904
2905
// HTML5 media elements
2906
toArray( slide.querySelectorAll( 'video, audio' ) ).forEach( function( el ) {
2907
- if( el.hasAttribute( 'data-autoplay' ) ) {
+ if( el.hasAttribute( 'data-autoplay' ) && typeof el.play === 'function' ) {
2908
el.play();
2909
}
2910
} );
@@ -2945,7 +2945,7 @@
2945
if( slide && slide.parentNode ) {
2946
2947
2948
- if( !el.hasAttribute( 'data-ignore' ) ) {
+ if( !el.hasAttribute( 'data-ignore' ) && typeof el.pause === 'function' ) {
2949
el.pause();
2950
2951
0 commit comments