title: Youtube Api playVideo method doesn't work on some mobile devices
body: <p>I am trying to create a website for mobile where after clicking on an image a youtube video to play.</p>
  
  <p>I have tested on several Android mobile phones/versions and on some doesn't behaves as intended. </p>
  
  <p>What I mean is it stops at buffering and never reaches to play the video. Another thing that I noticed is that the player works after the user triggers the video to play and not programatically. More detailed if I directly show the youtube player, the user click to play video and afterward click a button/image to play another video this works.</p>
  
  <p>I have posted here the test page that I worked with <a href="http://jsfiddle.net/ryjzt82h/2/" rel="nofollow">JsFiddle</a> </p>
  
  <pre><code>$(document).ready(function () {
  
  // Caching jQuery objects
  var $body = $('body'),
      $log = $('#log'),
      $yt = $('#ytplayer'),
      $ytwrap = $('#ytwrapper'),
      $choices = $('#choices');
  
  
  // This code loads the YouTube API
  var tag = document.createElement('script');
  tag.src = "https://www.youtube.com/iframe_api";
  $body.append(tag);
  
  // This will become the player object when the API is ready
  var player;
  
  // See what kind of device we're using
  var userAgent = navigator.userAgent.toLowerCase();
  var isAndroid = userAgent.indexOf('android') &gt; -1;
  var isIpad = userAgent.indexOf('ipad') &gt; -1;
  var isIphone = userAgent.indexOf('iphone') &gt; -1;
  
  
  window.onYouTubeIframeAPIReady = function onYouTubeIframeAPIReady() {
  
      player = new YT.Player('ytplayer', {
          videoId: videos[0],
          playerVars: {
              allowfullscreen: 'allowfullscreen',
              playsinline: 0
          },
          events: {
              'onReady': onPlayerReady,
                  'onStateChange': onPlayerStateChange
          }
      });
  
  
      window.player = player;
      //hide player 
    slidePlayer(false);
  
  };
  
  
  function onPlayerStateChange(event) {
  
      // When a video starts playing,
      // enable the fake fullscreen mode on Android &amp; iPad
      if (event.data == YT.PlayerState.PLAYING) {
          if (isIpad) {
              fakeFullScreen(true);
          } else if (isAndroid) {
              fakeFullScreen(true);
          }
      }
  
      // On pause: hide the player, show thumbs
      if (event.data == YT.PlayerState.PAUSED) {
  
          if (isAndroid) {
              // Exit fullscreen
              fakeFullScreen(false);
  
              // Scroll back to choices
              window.scrollTo(0, playerTop);
          } else if (isIpad) {
              fakeFullScreen(false);
              window.scrollTo(0, playerTop);
          } else if (isIphone) {
              slide(false);
          }
      }
  }
  
  
  
  $('#vstImageAd .imageWrap img').click(function (e) {
  
      e.preventDefault();
  
      var $this = $(this);
  
      if (player) {
  
          $this.css("display", "none");
          slidePlayer(true);
  
          player.playVideo();
      }
  
  });
  
  
  // When a thumb image is pushed, start the video
  $('#choices .playthumb img').click(function (e) {
  
      var $this = $(this),
          nr = parseInt($this.data('nr'));
  
      if (!videos[nr]) nr = 1;
  
      player.loadVideoById(videos[nr]);
  
      // Hide the thumbs
      slide(true);
   });
  });
  </code></pre>