A place to experiment technically with what I can do on a ZeroBlog, before I try it on my real blog.Follow in NewsfeedFollowing
I'm looking for an alternative to animated GIFs, so I need the MP4 to behave like an animated GIF does:
The WYSIWYG editor does not have an "Insert video" button, so this will have to be 100% manual.
And Markdown code does not have an "Insert video" tag (the way it has
![img name](img URL) for images), so I will have to find and use appropriate HTML code.
I've inserted a (long-form) video on my blog cloned from My ZeroBlog (see this post here). Let's see if I can get the video working and displaying with all the other requirements (auto play, auto loop, no control bar) here on a regular ZeroBlog.
I copy the MP4 into the same
\data\img folder as the images.
Now to find the right HTML code. From previous experiments, I already know how to do the following with HTML5 code on a MyZeroBlog:
The question is, can I do the same here on a regular ZeroBlog? And can I do the following extras?
I take a look at the following results
So I will try to adjust the following code:
<video width="320" height="240" autoplay loop> <source src="movie.mp4" type="video/mp4" /> <source src="movie.ogg" type="video/ogg" /> Your browser does not support the video tag. </video>
I'm using an MP4 (I'd forgotten about OGG, so I don't have a version in that format) and so I'll delete the line about OGG. I'll adjust the width and height attributes, as well as the URL obviously, to
<video width="500" height="286" autoplay loop> <source src="data/img/Monty.Python.Every.Sperm.Is.Sacred--MP4.mp4" type="video/mp4" /> Your browser does not support the video tag.</video>
(For some reason the WYSIWYG code tool displays the original block of code on multiple lines of text, easier to view, but puts the second block of code all on one line, even when I try adjusting it back to multiple lines.)
Now I'll try switching into Markdown edit mode and pasting that.
Success!!! The MP4 video automatically displays, plays and loops, with no control bar visible.
For some reason, when I originally tried inserting a video with HTML code on a ZeroBlog (going back and forth between WYSIWYG and Markdown modes), it kept screwing up, in different ways. But here it went just fine. CORRECTION: After publishing and reloading the page, the video does not play, just a still image.
Autoplaying video tends to be a curse on the modern web. So I, like many people, have found a way to block that, in my case, using a browser extension. The video autoplays for me because I've specifically allowed / whitelisted
http://127.0.0.1:43110 in my browser extension. But other people may not have done that.