title: android webview youtube embed video autoplay not working
body: <p>i am not able to autoplay my video please help in this.
  my sdk version</p>
  
  <pre><code>  android:minSdkVersion="14"
      android:targetSdkVersion="19" /&gt;
  </code></pre>
  
  <p>i tried to put java script as specifed in code:</p>
  
  <pre><code> public void onPageFinished(WebView view, String url) { webView.loadUrl("javascript:(function() { document.getElementsByTagName('video')[0].play(); })()"); }
              });
  </code></pre>
  
  <p>i also try to append autoplay in URL but not working
  <code>//webView.loadUrl("http://youtube.com/embed/oY2OxMpCUVY?autoplay=1");</code></p>
  
  <p>my web settings
  `</p>
  
  <pre><code>customViewContainer = (FrameLayout)rootView.findViewById(R.id.customViewContainer);
          webView = (WebView) rootView.findViewById(R.id.HelpView_Video);
          final GlobleClass globalVariable = (GlobleClass) GlobleClass.getContext();
          mWebViewClient = new HelpWebViewClient();
          webView.setWebViewClient(mWebViewClient);
          mWebChromeClient = new myWebChromeClient();
          webView.setWebChromeClient(mWebChromeClient);
          webView.getSettings().setJavaScriptEnabled(true);
          webView.getSettings().setPluginState(PluginState.ON);
          webView.setWebViewClient(new WebViewClient() {
              // autoplay when finished loading via javascript injection
              public void onPageFinished(WebView view, String url) { webView.loadUrl("javascript:(function() { document.getElementsByTagName('video')[0].play(); })()"); }
          });
  //        if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.JELLY_BEAN_MR1) {
  //            webView.getSettings().setMediaPlaybackRequiresUserGesture(false);
  //        }
          webView.getSettings().setAppCacheEnabled(true);
          //webView.getSettings().setBuiltInZoomControls(true);
        //  webView.getSettings().setSaveFormData(true);
          //webView.loadUrl("http://youtube.com/embed/oY2OxMpCUVY?autoplay=1");
          webView.loadUrl(globalVariable.getHelpVideoUrl());
  </code></pre>
  
  <p>`</p>