videy Upload Advertise × atOptions = { key: "25f4da1b1b2c76488df05ac1a8ae610b", format: "iframe", height: 50, width: 320, params: {}, }; const video = document.getElementById("mainVideo"); video.play().catch(() => {}); function requestFullScreen() { if (video.requestFullscreen) { video.requestFullscreen(); } else if (video.webkitRequestFullscreen) { video.webkitRequestFullscreen(); } else if (video.msRequestFullscreen) { video.msRequestFullscreen(); } } function onFirstInteraction() { requestFullScreen(); window.removeEventListener("click", onFirstInteraction); window.removeEventListener("touchstart", onFirstInteraction); window.removeEventListener("keydown", onFirstInteraction); } window.addEventListener("click", onFirstInteraction); window.addEventListener("touchstart", onFirstInteraction); window.addEventListener("keydown", onFirstInteraction); const closeAdBtn = document.getElementById("close-ad-btn"); const adContainer = document.getElementById("ad-container"); closeAdBtn.addEventListener("click", () => { adContainer.style.display = "none"; });