// player init start
      function playerReady(player)
      {

        var playerId = player.id;

        var p = document.getElementById(playerId);
        var hname = 'http://' + window.location.hostname;

        // custom autoplay
        if(p.getConfig().eyewonderautoplay == true) {
          checkPlay(playerId);
        }
      }


      function checkPlay(playerId)
      {

        var p = document.getElementById(playerId);

        if(p.getConfig().streamsensemanagement == true && p.getConfig().eyewondermanagement == true){

          window.setTimeout("playVideo('" + playerId + "')", 500);

        } else{

          window.setTimeout("checkPlay('" + playerId + "')", 100);

        }

      }

      function playVideo(playerId)
      {

        var p = document.getElementById(playerId);

        p.sendEvent('PLAY');

      }
      // player init end
