i think i might've found a way to embed actual video files here using SVGs. in short, you can do this:
let fs = require("fs")
let e = content => `<svg version="1.1" class="center-block" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="400" height="300">
<foreignObject width="400" height="300">
<video xmlns="http://www.w3.org/1999/xhtml" width="400" autoplay="" loop="" muted="" crossorigin="anonymous">
<source src="data:video/mp4;base64,${content}"></source>
</video>
</foreignObject>
</svg>`
// write string to file
fs.writeFileSync("video.svg", e(fs.readFileSync("video.mp4").toString("base64")))
that on itself actually works: svg file
but heres the weird part. if i put that into a <img> tag, this happens:
depending on your browser, that is either a video player with no video or just nothing. does anyone have a clue how to fix this lol