regebro / hovercraft

Make dynamic impressive presentations from text files!
https://hovercraft.readthedocs.org
MIT License
1.48k stars 209 forks source link

Video/Audio support. Copy files defined in <source> tags + add docs for video and audio #204

Closed PostPollux closed 4 years ago

PostPollux commented 4 years ago

This change is a quick and easy fix for the support of video and audio files. I know there is another pullrequest here for this feature, but it seems it has been there forever and won't get merged in the near future. My implementation modifies the generate.py to also look for <source> tags and then grab the files specified in "src" and copy them over. So it works fine with both the live server and the export. I also modified the documentation to show how to include a video or an audio at this moment. Maybe it is not the nicest solution as we have to use the "raw" directive. But it is definitely an improvement over the current state of not handling it at all. So I think it should be ok for now. If the proper implementation gets merged it can of course be changed. But it would be a pitty if we couldn't really use videos with hovercraft! Because hovercraft! is awesome!

regebro commented 4 years ago

This is a nice and simple addition. Could you rebase this, and maybe even add a test, that would be cool.

PostPollux commented 4 years ago

Ok, rebase done. Actually I have no idea how to write tests. Never done that...

regebro commented 4 years ago

OK, I'll create an issue that I should write a test for it.