doersino / markdeep-slides

Build presentation slides with Markdeep and present them right in your browser.
https://doersino.github.io/markdeep-slides/demo.md.html
BSD 2-Clause "Simplified" License
172 stars 13 forks source link

Make videos with the autoplay attribute start playing only when they're shown #11

Closed doersino closed 5 years ago

doersino commented 5 years ago

Right now, <video src="..." autoplay> causes the video to start playing on page load, which is not what you want in a presentation. Ideal behaviour would be...

I think this could be accomplished by translating the autoplay attribute into a data-autoplay attribute in a preprocessing step and invert this translation when the slide is active (and again once it becomes inactive).