initial import from /x/ monorepo

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso 2025-03-17 19:33:07 -04:00
commit 9923878c5c
No known key found for this signature in database
61 changed files with 5615 additions and 0 deletions

16
cmd/anubis/js/video.mjs Normal file
View file

@ -0,0 +1,16 @@
const videoElement = `<video id="videotest" width="0" height="0" src="/.within.website/x/cmd/anubis/static/testdata/black.mp4"></video>`;
export const testVideo = async (testarea) => {
testarea.innerHTML = videoElement;
return (await new Promise((resolve) => {
const video = document.getElementById('videotest');
video.oncanplay = () => {
testarea.style.display = "none";
resolve(true);
};
video.onerror = (ev) => {
testarea.style.display = "none";
resolve(false);
};
}));
};