I am trying to implement Youtube videos on automatic slides while click is made in video slide it should play and should stay on the same slide while playing video, to do that i need to detect the click in iframe,thanks in advance
Here they gave answer about your question: Detect Click into Iframe
Found a solution:
We can’t detect a click in Iframe you better place a image or a button in iframe,In that button or image you can enable autoplay by playmethod & pausemethod.You can hide the button after a click is made by hide(). Hope it helps you!
toggle(){
this.slides.stopAutoplay();
if(this.hideButton)
{
this.hideButton = false;
let listaFrames = document.getElementsByTagName("iframe");
for(var i=0;i<listaFrames.length;i++)
{
let iframe=listaFrames[i].contentWindow
iframe.postMessage('{"event":"command","func":"'+ 'playVideo'+ '","args":""}', '*');
}
}
Tnq for the help, i’ve also found a solution