title: Youtube JavaScript API - Pause audio when either youtube video plays
body: <p>I have background noise on a website which the client wants playing on loop throughout the website, so I have set up an <code>&lt;audio&gt;</code> tag which autoplays and loops.</p>
  
  <p>On several pages, I have multiple Youtube embedded iframes which are declared using the embedded code from the youtube video pages, for example:</p>
  
  <p><code>&lt;iframe width="420" height="315" src="http://www.youtube.com/embed/Y3OR9HnB14I?rel=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;</code></p>
  
  <p>What they want, is that when a youtube video is played / resumed, the audio pauses and when a youtube video is stopped / paused then resume the audio.</p>
  
  <p>Has anyone got an idea on how to do this using the Youtube Javascript API?</p>