Vidtest
I made this page to test whether embedding videos was supported using MkDocs (what this site is built on). As it turns out, it is! Which is good news for a webcomic of mine. However, (from what I can tell) this requires mixing HTML in as well. I'll display for you at the bottom a code block showing what I did, tho if you really want you can just inspect element. π
This is an animated webp. You can just call it like an image; same as the kitty gif.
Static webp's work as well; my friend sent a "0 days since last [something] incident" meme as a webp and it failed to display, so I created this monstrosity (note the comic sans! π):
Here are the videos; the first is an mp4 the second (and third) is an mov. The main thing to keep in mind here is to close off your HTML calls with the corresponding </[format]>
. Otherwise, it is the last thing you'll ever see... π§ (but no, really, it'll just give up there and load nothing else past that on the webpage!!!)
You can see in the final of the 3 media controls are not shown; they come up in a right click. You can see the difference in the code block below, but it's as simple as putting the word "controls" in the call.
You can also do music/audio, and in various formats. The first is an mp3, the second, an ogg. Then, finally, a wav, just to prove it's possible (and put a strain on your browser <3).
Regular Show Planet Chasers Intro:
Regular Show Planet Chasers song:
Regular Show Summertime Lovin':
Now, I tried removing the "controls" word from the HTML call for the wav... as expected, it just vanishes!!! lol. That said, you can substitute it for "autoplay" to invisibly play the song as soon as the page is opened, but it seems most browsers block it from actually doing that. I had to manually approve its request.
(For those who don't know, wav is enormous as a filetype and a big reason we got compressed filetypes like mp3 and ogg; here, the wav is half the length and twice the size of the ogg!!!)
Alright, alright, as promised, the code block:
I made this page to test whether embedding videos was supported using MkDocs (what this site is built on). As it turns out, it is! Which is good news for a webcomic of mine. However, (from what I can tell) this requires mixing HTML in as well. I'll display for you at the bottom a code block showing what I did, tho if you really want you can just inspect element. π
This is an animated webp. You can just call it like an image; same as the kitty gif.
![happyturtle](assets/vidtestfiles/happyturtle.webp)
![catte](assets/vidtestfiles/catte.gif)
Static webp's work as well; my friend sent a "0 days since last [something] incident" meme as a webp and it failed to display, so I created this monstrosity:
![webpown](assets/vidtestfiles/webpincident.webp)
Here are the videos; the first is an mp4 the second (and third) is an mov. The main thing to keep in mind here is to close off your HTML calls with the corresponding `</[format]>`. Otherwise, it is the last thing you'll ever see... π§ (but no, really, it'll just give up there and load nothing else past that on the webpage!!!)
<video controls src="../../assets/vidtestfiles/imfish.mp4" type="video/mp4"> </video>
<video controls src="../../assets/vidtestfiles/mydentist.mov" type="video/mov"> </video>
<video src="../../assets/vidtestfiles/mydentist.mov" type="video/mov"> </video>
You can see in the final of the 3 media controls are not shown; they come up in a right click. You can see the difference in the code block below, but it's as simple as putting the word "controls" in the call.
You can also do music/audio, and in various formats. The first is an mp3, the second, an ogg. Then, finally, a wav, just to prove it's possible (and put a strain on your browser <3).
Regular Show Planet Chasers Intro:
<audio controls src="../../assets/vidtestfiles/planetchasersintro.mp3" type="audio/mp3"> </audio>
Regular Show Planet Chasers song:
<audio controls src="../../assets/vidtestfiles/planetchaserspostintro.ogg" type="audio/ogg"> </audio>
Regular Show Summertime Lovin':
<audio controls src="../../assets/vidtestfiles/summertimelovinregularshow.wav" type="audio/wav"> </audio>
Now, I tried removing the "controls" word from the HTML call for the wav... as expected, it just vanishes!!! lol. That said, you can substitute it for "autoplay" to invisibly play the song as soon as the page is opened, but it seems most browsers block it from actually doing that. I had to manually approve its request.
(For those who don't know, wav is enormous as a filetype and a big reason we got compressed filetypes like mp3 and ogg; here, the wav is half the length and twice the size of the ogg!!!)
Alright, alright, as promised, the code block: