title: Youtube iframe player API 'onReady' event does not get triggered inspite of suggested fixes
body: <p>I'm using the youtube iframe player API for an app that I'm building. Everything worked fine until about a month ago (Feb 2014). None of the events get fired now, not even 'OnReady'. One of the posts suggested adding "origin=" to the src attribute. That didn't fix it for me. Here's a snippet of my code - I'm using angularjs.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;iframe id="player" width="1280" height="720" frameborder="0" allowfullscreen="" src="https://www.youtube.com/embed/-PXgGnKhEdQ?autoplay=1&amp;theme=light&amp;color=white&amp;origin=http://127.0.0.1:8000"&gt;
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>$scope.onYouTubeIframeAPIReady = function(id) {
      var player = new YT.Player('player', {
          videoId: id,
          events: {
              'onReady': function (event) {
                   player.addEventListener('onStateChange', function(e) {
                       console.log('onReady');
                   });
               },
               'onStateChange': function (event) {
                   console.log('onStateChange')
               }
          }
      });
  }
  </code></pre>
  
  <p>The video plays and stops, but these events do not get fired. I also see an error "Error: Ad adLoadError error: Unable to request ads from server. Cause: Error #2032 errorCode: 1103". Not sure if that is interfering with the event mechanism.</p>
  
  <p>Any help is appreciated.</p>
  
  <p>Thanks,
  Deepa</p>