Después de hacer clic en la miniatura, el video de YouTube no se abre. Deja blanco en blanco, hay que recargar para ver el video principal
$(function () { var videos=$(".video"); videos.on("click", function () { var elm=$(this), conts=elm.contents(), le=conts.length, ifr=null; for (var i=0; i < le; i++) { if (conts[i].nodeType==8) ifr=conts[i].textContent; } elm.addClass("player").html(ifr); elm.off("click"); } ); } ) <div class="video"> <img class="zoom-video" src="~/image/body/special-offer.png"> <iframe width="600" src="https://www.youtube.com/embed/Ze7xsy9tVVQ" frameborder="0" allowfullscreen></iframe> </div>Intente copiar el iframe provisto del video. Vaya al video, haga clic en compartir, luego haga clic en incrustar.
Copie y pegue el código allí e intente ejecutar el código nuevamente.
Aquí hay un ejemplo:
<iframe width="560" height="315" src="https://www.youtube.com/embed/dQw4w9WgXcQ" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>