title: How to detect when Iframe video ends? No API
body: <p>I have a iframe generated on my site. The src of the iframe is video id from database. I would like to know, how can I detect that the video finishes playing.
  My embeded youtube video:</p>
  
  <pre><code>echo "&lt;iframe width='50%' height='60%' id='cc' src='https://www.youtube.com/embed/" . $data_song[0] . "' frameborder='1' allowfullscreen&gt;&lt;/iframe&gt;&lt;br&gt;";
  </code></pre>
  
  <p>Thanks for any advice.</p>