yjwen / org-reveal

Exports Org-mode contents to Reveal.js HTML presentation.
1.4k stars 247 forks source link

Video links support? #325

Closed louiscleung closed 6 years ago

louiscleung commented 6 years ago

First of all, excellent package!

My request would be able to add links to video assets from the org file (like how you added images for the background as Properties) that will generate the appropriate html expected for reveal.JS such as:

<video data-autoplay class="stretch" src="./movies/a_cool_movie.mp4"></video>

thanks to anyone that takes that on - it seems a useful feature for a presentation these days and would mean one doesn't have to leave org mode to manually add to the html export!

doolio commented 6 years ago

Check out lechten's emacs-reveal project which builds upon org-reveal.

louiscleung commented 6 years ago

hi Doolio, I'm afraid I don't see any mention of video links in Lechten's modifications... if I've missed it, could you point to the lines in their ox-reveal.el? thank you.

lechten commented 6 years ago

Hi, my fork does not add anything special for videos. In one presentation I use this to display a video:

@@html:<video controls width="400" height="300" src="https://archive.org/download/LinusTorvaldsOnGittechTalk/LinusTorvaldsOnGittechTalk.ogv#t=460"></video>@@

I never used stretch, but you could add the class above.

@doolio I just cleaned up the code a bit (no longer misusing image CSS, but with separate video CSS).

louiscleung commented 6 years ago

hi @lechten - thanks a lot!! I think the concept of inserting raw html and leveraging the underlying ox-html (which i didn't know about until you posted that) is the way to go for now.

It seems the long term solution for org-reveal should be inserting images movies websites with "img", "video", "iframe" tags and leaving

for just the color of the background (slide). Who knows, if no one has done it by then, I could give it a try this summer to understand ox-reveal.el and allow addition of img/video from custom tags in the properties drawer. I'm a emacs/org/lisp noob so it's only an expectation that this can be done :)

At least for now, I have a route to insert media html directly into the org file presentation without having to edit the exported reveal html file (HT @lechten) so we can probably close this.

lechten commented 6 years ago

Hi @louiscleung, I'm not sure how a uniform treatment for img, video, and iframe might look like. For images, I created my own solution based on macros, which you can see in my howto for emacs-reveal. One could hide the embedding of HTML for videos (and iframes) with similar macros with parameters for source URL, dimensions, maybe class.

So far, I did not add something like this because that video example is my single use case for videos. The licensing issues are not clear to me. The Digital Media Law Project seems to suggest that currently there might be no problems in the US. I'm under European jurisdiction, though.

louiscleung commented 6 years ago

thanks @lechten! my content (images and movies) are created from my own scientific research so I have jurisdiction on their possession and presentation. Thus, I hope you see my motivation to have a simpler way of adding and organising such media links (>90% of the content I have in presentations) to an org file that can be exported to reveal.js to present to my peers.