I'm using YouTube iframe to embed videos on my site.
<iframe width="100%" height="443" class="yvideo" id="p1QgNF6J1h0" src="http://www.youtube.com/embed/p1QgNF6J1h0?rel=0&controls=0&hd=1&showinfo=0&enablejsapi=1" frameborder="0" allowfullscreen></iframe>
And i have multiplie videos on the same page.
I want to stop all of them or one of them in a click of a button using javascript or so.
Is it possible?
UPDATE:
I tried what Talvi Watia said and used:
$('#myStopClickButton').click(function(){ $('.yvideo').each(function(){ $(this).stopVideo(); });});
I'm getting:
Uncaught TypeError: Object [object Object] has no method 'stopVideo'