topRightOverlay.style.cssText = ` position: absolute; top: 10px; right: 10px; width: 50px; height: 35px; background: rgba(0,0,0,0.8); z-index: 1000; pointer-events: none; border-radius: 4px; `; iframeContainer.appendChild(topRightOverlay); // Bottom left overlay to hide remaining branding const bottomLeftOverlay = document.createElement('div'); bottomLeftOverlay.style.cssText = ` position: absolute; bottom: 0; left: 0; width: 150px; height: 50px; background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, transparent 100%); z-index: 999; pointer-events: none; border-radius: 0 0 0 12px; `; iframeContainer.appendChild(bottomLeftOverlay); } function addBackToPlayerButton(iframeContainer, player, playerEl) { // Add a back button to return to custom player const backButton = document.createElement('div'); backButton.style.cssText = ` position: absolute; top: 15px; left: 15px; background: rgba(0,0,0,0.8); color: white; padding: 8px 15px; border-radius: 20px; cursor: pointer; font-size: 12px; font-weight: 600; z-index: 1001; transition: all 0.3s ease; display: flex; align-items: center; gap: 6px; backdrop-filter: blur(10px); `; backButton.innerHTML = ` Back to Player `; // Add hover effect backButton.addEventListener('mouseenter', function() { this.style.background = 'rgba(0,0,0,0.95)'; this.style.transform = 'scale(1.05)'; }); backButton.addEventListener('mouseleave', function() { this.style.background = 'rgba(0,0,0,0.8)'; this.style.transform = 'scale(1)'; }); // Add click handler to go back to custom player backButton.addEventListener('click', function() { // Remove YouTube container iframeContainer.remove(); // Show Video.js player again playerEl.style.display = 'block'; // Reset player player.pause(); player.currentTime(0); }); iframeContainer.appendChild(backButton); } function extractYouTubeId(url) { const match = url.match(/(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/\s]{11})/); return match ? match[1] : null; } function hideLoadingOverlay(loadingOverlay) { if (loadingOverlay) { loadingOverlay.style.display = 'none'; } } function showErrorMessage(videoElement, loadingOverlay) { hideLoadingOverlay(loadingOverlay); const container = videoElement.parentElement; container.innerHTML = `
${message}
Enter contest description...cvbcfbcf
10 minutes
10 (randomly selected from 110 questions)
100
16 Jul 2025, 14:27 PM
31 Jul 2025, 14:27 PM
₹100
₹80
₹70
₹60
This is to certify that {name} has successfully completed the {quiz} with a score of {score}%.