title: Youtube API Yt.Player object not working with phonegap/on mobile [Yt player object vs. direct iframe]
body: <p>i embedded my youtube player like this on my website:</p>
  
  <pre><code>&lt;div id="player"&gt; &lt;/div&gt; 
  
  var player;
      function onYouTubePlayerAPIReady() {
          player = new YT.Player('player', {
  
            videoId: 'P2jViqMnnK4',
            events: {
              'onReady': onPlayerReady,
              'onStateChange': onPlayerStateChange,
               'onError': onError,
  
            },
            playerVars: {
  
                      'controls': 0,
                      'showinfo': 0,
                      'iv_load_policy': 3,
                  },
          });
      }
  </code></pre>
  
  <p>now i´ve written a script which loads new youtube videos from a xml file. </p>
  
  <p>I want to make a phonegap application with just this script playing youtube videos, but it isn´t working on android. </p>
  
  <p>I´ve tested the other method of embedding it:</p>
  
  <pre><code>&lt;iframe id="player" type="text/html" width="640" height="390"
   src="http://www.youtube.com/embed/M7lc1UVf-VE?enablejsapi=1&amp;origin=http://example.com"
   frameborder="0"&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>This works quite well, but i don´t know how to set the parameters i´ve set in the player object. And i don´t know how to connect my "changing script" with the direct iframe player.</p>
  
  <p><strong>My Questions:</strong> </p>
  
  <ol>
  <li><p>Is there a way to get the yt.player object working with phonegap/on mobile?</p></li>
  <li><p>If not, how can i add my paramaters (i have in the yt.object player) to the direct iframe</p></li>
  </ol>
  
  <p>thanks a lot!</p>