Video test

Another proof-of-concept

Reading time: 1 minute(s) @ 200 WPM.

We now attempt to insert into our R Markdown file, which Hugo then renders into HTML, an mp4 video of dragonflies (insect order Odonata, in case you’re wondering) that were congregating in my front yard a few summers ago.

So I’m thinking, just insert it using a regular Markdown image tag, yes?

Like this:

![](/mp4/Dragonflies.mp4).

And so, that worked.

To center this video on the page I am using the deprecated HTML <center> tag inside of my R Markdown.

To view the raging controversy surrounding the deprecation of the beloved <center> tag, click here.

The video above used the default Markdown image tag. But here we’re using R Markdown, which understands Pandoc Markdown, and thus we can adjust the size of the video player like so:

![](/mp4/Dragonflies.mp4){width=400 height=300}

This gives us a better-looking video frame than what we get by default, at least on a desktop web browser. The size difference in video players doesn’t really make any difference when viewed on a small mobile device like a smartphone. Both sizes look the same in the smartphone’s video player.

Width and height are assumed to be in pixels unless specified otherwise. See Images for more details.

 Share!

 
comments powered by Disqus