Transitioning sound with show.js

I am studying the use of opens.js and I find it very powerful. I am surprised that you can make a sound showing the sound with each slide transition. I made a presentation with an automatic spread option, and it would be useful to have a sound when changing a slide. Can anybody help me? Thanks

+7
source share
1 answer

To do this, you can use the data-autoplay attribute, it works for both video and audio elements. When this attribute is present in the media element inside the .js disclosure, this element will automatically play / pause when entering / leaving the slide in which it is located.

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

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

+8
source share

All Articles