relevance / org-html-slideshow

JavaScript presentation slides generated from Emacs org-mode
160 stars 42 forks source link

embedding audio and video? #15

Closed jaydixit closed 10 years ago

jaydixit commented 10 years ago

org-html-slideshow is brilliant! Question: is it possible to embed mp3, .avi files, or YouTube videos such that it won't start playing until I reach that slide (or until I click play to initiate it when I'm on the correct slide)?

If so, what's the best code to use in org-mode to embed mp3, avi, or YouTube in the exported HTML slideshow?

Thanks!

jaydixit commented 10 years ago

I succeeded with mp3 using this code:

<audio controls="controls" height="100" width="100">
<source src="/Users/jay/assets/Cringe.mp3" type="audio/mp3" />
<embed height="100" width="100" src="song.mp3" /> 
</audio>

Tried to make YouTube work using this code, but it didn't work:

<iframe width="100%" height="100%" src="http://www.youtube.com/embed/VMeXGE_a8Gg" frameborder="0" allowfullscreen></iframe>
jblomo commented 10 years ago

iframe width and height attributes take pixel widths, so changing those values to 560 and 315 respectively work for me.

http://jblomo.github.io/webarch253/slides/Intro.html https://raw.github.com/jblomo/webarch253/master/slides/Intro.org