sound transition with reveal.js
Asked Answered
P

1

8

I'm learning to use reveal.js and I find it very powerful. I wonder wether it's possible to make reveal play a sound at each slide transition. I made a presentation with the auto-sliding option on and it would be usefull to have a sound when the slide changes. Can someone help me ? Thanks

Postmaster answered 14/11, 2013 at 11:37 Comment(0)
M
11

You can use the data-autoplay attribute for this, it works for both video and audio elements. When this attribute is present on a media element inside of reveal.js that element will play/pause automatically as you enter/leave the slide it lives in.

<section>
  <audio data-autoplay src="yourAudioFile.mp3"></audio>
</section>

https://github.com/hakimel/reveal.js#embedded-media

Molarity answered 14/11, 2013 at 13:39 Comment(1)
Thank you.It works perfectly with Chromium Browser but not in Firefox ? Why ?Postmaster

© 2022 - 2024 — McMap. All rights reserved.