title: YouTube onStateChange event is suddenly not working
body: <p>I had everything working fine until about two weeks ago. I haven't changed any code.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function loadYtVideo(video, advert, advert_link, splash, splash_link){
     var params  = { allowScriptAccess: "always", wmode: "transparent" };
     var atts    = { id: "eda-player", wmode: "transparent" };
     var swfobject;
     adv.orig    = video;
     swfobject.embedSWF("https://www.youtube.com/v/"+adv.orig+"?rel=0&amp;enablejsapi=1&amp;playerapiid=ytplayer","ytapiplayer", "719", "404", "8", null, null, params, atts);
  }
  
  function onYouTubePlayerReady(playerId) {
      //It's fired
      edaplayer = document.getElementById('eda-player');
      edaplayer.addEventListener("onStateChange", "playerState");
  }
  
  function playerState(state) {
      //it's not fired
      console.log(state);
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="adv-video"&gt;
     &lt;div id="ytapiplayer"&gt;
         &lt;script&gt;
             $(document).ready(function(){
                 loadYtVideo($.getUrlVar('ytVideo'), 'eM2ja9LE0YE', 'http://wilmax.ru/', '', '');
             });
         &lt;/script&gt;
     &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I found posts with similar problem, but solutions in those posts are not working in this case.
  Any help would be greatly appreciated.</p>