bg videos remain muted on mobile, otherwise broken when navigating with swipe gestures
This commit is contained in:
parent
2fccb77405
commit
9ff27cfbc9
2
dist/reveal.esm.js
vendored
2
dist/reveal.esm.js
vendored
File diff suppressed because one or more lines are too long
2
dist/reveal.js
vendored
2
dist/reveal.js
vendored
File diff suppressed because one or more lines are too long
@ -36,7 +36,7 @@
|
||||
<video src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" data-autoplay></video>
|
||||
</section>
|
||||
|
||||
<section data-background-video="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" data-background-video-muted>
|
||||
<section data-background-video="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4">
|
||||
<h2>Background Video</h2>
|
||||
</section>
|
||||
|
||||
@ -68,7 +68,7 @@
|
||||
|
||||
<script src="../dist/reveal.js"></script>
|
||||
<script>
|
||||
Reveal.initialize();
|
||||
Reveal.initialize({hash: true});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
@ -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', '' );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user