`; container.insertAdjacentHTML('beforeend', videoHtml); var videoElement = container.lastElementChild; function showVideo() { var loader = document.getElementById('loader_id_TX6MrhiRDo'); if (loader) loader.style.display = 'none'; } const thumbnail = document.getElementById('video_thumbnail_id_TX6MrhiRDo'); if (thumbnail) { thumbnail.addEventListener('click', function() { const src = videoElement.getAttribute('src'); if (src.includes('youtube.com')) { const newSrc = src.includes('?') ? src.replace('autoplay=0', 'autoplay=1') : src + '?autoplay=1'; videoElement.setAttribute('src', newSrc); } else { videoElement.play(); } setTimeout(hideThumbnail, 500); }); } if (videoElement.tagName === 'IFRAME') { videoElement.onload = showVideo; } else { showVideo(); } });