title: Android webView - autoplay youtube video from URL
body: <p>Struggling to achieve <strong>Youtube</strong> Video Auto play within android <strong>WebView</strong>, I have seen several threads and forums listing following suggestion which DO NOT WORK. </p>
  
  <p>I have tried the following, with no luck:</p>
  
  <ol>
  <li><p><strong>settings.setMediaPlaybackRequiresUserGesture(false);</strong></p></li>
  <li><p><strong>Adding javascript snip like this:</strong> </p>
  
  <pre><code>webView.setWebViewClient(new MyWebViewClient(){
      @Override
      public void onPageFinished(WebView view, String url) {
          super.onPageFinished(view, url);
          if (view.getProgress() == 100) {
              webView.loadUrl("javascript:document.getElementsByTagName('video')[0].play();"
              );
          }
      }
  });
  </code></pre></li>
  </ol>
  
  <p>3 . <strong>Adding <code>&amp;autoplay=1</code> to URL</strong></p>
  
  <p>I am tested for all the above methods in API 18 and none of the above methods worked. This being a very important Feature for my App, please provide a working solution for this. </p>