mirror of
https://github.com/TecharoHQ/anubis.git
synced 2025-08-03 17:59:24 -04:00

* fix(bench): await benchmark loop and adjust outline styles in templates Signed-off-by: Jason Cameron <git@jasoncameron.dev> * refactor: remove unused showContinueBar function and clean up video error handling Signed-off-by: Jason Cameron <git@jasoncameron.dev> * style: format code for consistency and readability using prettier Signed-off-by: Jason Cameron <git@jasoncameron.dev> --------- Signed-off-by: Jason Cameron <git@jasoncameron.dev>
17 lines
523 B
JavaScript
17 lines
523 B
JavaScript
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 = () => {
|
|
testarea.style.display = "none";
|
|
resolve(false);
|
|
};
|
|
});
|
|
};
|