title: Control Youtube video player using Javascript from FireFox addon
body: <p>I wrote a FireFox addon which has a button on the toolbar.
  On click event, I am trying to find the EMBED element and try to call pauseVideo() on it, but it doesn't work.</p>
  
  <p>I am sure the object I get is the EMBED so no doubt about that, because I display the 'src'</p>
  
  <pre><code>var p1 = content.document.getElementById("movie_player");
  window.alert(p1.src);
  </code></pre>
  
  <p>The problem is pauseVideo() doesn't work:</p>
  
  <pre><code>try
  {
  p1.pauseVideo();
  }
  catch(e)
  {
    window.alert(e); // this gives 'pauseVideo() is not a function'
  }
  </code></pre>
  
  <p>Also, the 'allowscriptaccess' attribute is set to 'always'.
  Any idea why it doesn't work? I am out of ideas.</p>
  
  <p>Thanks!</p>