My name is Nicolas Martignoni and I'm a teacher and teacher trainer. I live in Switzerland, near Fribourg. You can find me on my blog, or on Mastodon.
I'm an OpenEdTech enthusiast, a Moodle freak and free software person.
A Hugo theme component to embed videos using HTML video element
License: GNU General Public License v3.0
My name is Nicolas Martignoni and I'm a teacher and teacher trainer. I live in Switzerland, near Fribourg. You can find me on my blog, or on Mastodon.
I'm an OpenEdTech enthusiast, a Moodle freak and free software person.
I'm getting this message when I try to embed the video in a markdown >
quote. The video itself can get played finely nevertheless.
Your browser doesn't support embedded videos, but don't worry, you can download it and watch it with your favorite video player!
See this video:
Awesome work, video width attribute doesn't take effect. I tried percentage and px
When I embed multiple videos on the same page using the shortcode, a message is displayed below the one of the videos linking to a download of the first video, regardless whether it's unsupported or not.
I can't quite predict below which video the message will appear.
Hello.
Look here, please:
https://stenografia.pl/repo/filmy/
It's a static page, not part of the blog, but the movie file is in the same folder as index.md. As you see, the control bar appeares, so the module works. But no movie.
What do I do wrong?
Thanks in advance for help.
I want use an video i have upload on my web server, now i have a link like this: https://xxxxx.com/xxxx.webm
When i trying to add this link in my page:
{{< video src="https://xxxxx.com/xxxx.webm" type="video/webm" preload="auto" >}}
I get some error:
Building sites โฆ ERROR 2021/05/08 21:42:36 No file with filename "https://xxxxx.com/xxxx.webm" found.
It looks like i can't use http link.
Hello Martignoni,
Maybe it is a silly question. I'm using Hugo for a few days, and I've installed the plugin that you have made.
I tried to put a video inside public/images, public/media, static/media, and variations, and I always have the same result:
Building sites... ERROR 2020/04/12 23:55:40 No file with filename "media/conan_1" found.
At content/posts/my-post.md I put:
{{< video src="media/conan_1" loop="true" >}}
The file name is conan_1.mp4 (Conan is related to conan.io)
How is the correct way to assign videos? Could you help me?
Thank you for the plugin.
I fixed this by adding the playsinline attribute to the video.html file:
{{ if eq (.Get "playsinline") "true" }}playsinline {{ end }}
Hello.
Where do I save my .mp4 videos? Also, could you explain exactly what a page bundle
is?
Thanks!
Hi! I tried using this shortcode, but I get following runtime error when linking to an unsupported video, I guess (m4v).
failed to render shortcode "video": failed to process shortcode: "D:\website\themes\hugo-video\layouts\shortcodes\video.html:55:8": execute of template failed: template: shortcodes/video.html:55:8: executing "shortcodes/video.html" at <i18n "videoUnsupported" $video_dl>: error calling i18n: runtime error: index out of range [0] with length 0
Maybe it has to do with hugo switching to Goldmark from Blackfriday.
changing line
hugo-video/layouts/shortcodes/video.html
Line 55 in 0774536
to
<p>{{ i18n "videoUnsupported" $video_dl | markdownify }}</p>
solves this.
Sorry, that I'm too lazy right now to do a proper pull request.
Thanks for the theme, love to include videos before I can put them on youtube.
Only think is that I would like to put the videos into static/
next to the content
folder so that I separate the static content from the actual markdown content.
From #9 I figure that I can not use a path like /movies/my-video.mp4
where movies
is placed in static
?
dummyvideo.txt
(not a real video) in the bundle of the post. Do not place any other ressource file in the bundle (other that index.md
).{{< video src="dummyvideo" >}}
.No video is displayed or, alternatively, an error with adequate message is displayed.
The video
tag allows a height
attribute that would be useful for portrait-oriented videos if the theme supported it.
{{< video src="video" >}}
with no video file of this name in the bundleAn error with adequate message is displayed with no other error.
This player is looking much better than html5 stock, and has a lot of features https://videojs.com/
There is a theme with it, but I couldn't make additional module from it https://github.com/laozhu/hugo-nuo
When I built my site locally, everything worked as expected. Now I pushed the site to gitlab pages and the build failed. I traced it down to .MediaType.Suffixes
returning []
.
The file in question is a m4v video file.
hugo-video/layouts/shortcodes/video.html
Line 31 in ee4a22c
The page resource is found though. It just can't determine the extension.
I'll look for a solution.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.