Pause youtube video when scrolls out of the viewport
<p>I tried searching for the solution and yet no luck.</p>

<p>Problem is, I need to pause the youtube video when the video leaves <code>viewport</code> while scrolling.</p>

<p>I found this sample but this has video id and in my scenario, I have <code>iframe</code> so this solution isn't working on <code>iframe</code>.</p>

<p>Here is my <strong><a href="https://jsfiddle.net/49cvf2oa/" rel="nofollow">Fiddle</a></strong> </p>