const videoElement = ``; 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); }; }); };