1
0
mirror of https://github.com/hakimel/reveal.js.git synced 2025-08-06 06:38:08 +02:00

bg videos remain muted on mobile, otherwise broken when navigating with swipe gestures

This commit is contained in:
Hakim El Hattab
2020-06-16 11:20:15 +02:00
parent 2fccb77405
commit 9ff27cfbc9
4 changed files with 9 additions and 4 deletions

View File

@@ -117,7 +117,12 @@ export default class SlideContent {
}
// Enable inline playback in mobile Safari
//
// Mute is required for video to play when using
// swipe gestures to navigate since they don't
// count as direct user actions :'(
if( isMobile ) {
video.muted = true;
video.setAttribute( 'playsinline', '' );
}