title: How to catch youtube video player's Play/Pause event using Javascript?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/8152814/make-callback-after-play-button-is-pushed-youtube-embed-video">Make callback after play button is pushed - Youtube embed video</a>  </p>
  </blockquote>
  
  
  
  <p>I have a Youtube video embeded on my website. The code is as below</p>
  
  <pre><code>&lt;iframe width="280" height="180" frameborder="0" src="http://www.youtube.com/embed/U5BVeZybEV4" title="YouTube video player"  allowfullscreen&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>What I want to do is, when I click on <strong>Play</strong> button of the Video, it should execute a javascript alert function as</p>
  
  <pre><code>alert("Clicked Play");
  </code></pre>
  
  <p>Same way, if I click on Pause button, it should execute a javascript alert function as</p>
  
  <pre><code>alert("Clicked Pause");
  </code></pre>
  
  <p>Any suggestion how can I catch these Events ?</p>
  
  <p>Thanks in advance.</p>