title: Not able to play video in Web View
body: <p>i am not able to play video on Android web view.</p>
  
  <p>I have kept the html and video file in my assets folder.</p>
  
  <p>Whenever i load the html file , it gives me the error</p>
  
  <pre><code>05-01 12:31:16.092: E/MediaResourceGetter(17241): Unable to read file: file:///android_asset/MediaBook2%20(2)/2B952499A0E681.mp4
  </code></pre>
  
  <p>And whenever i press on the play button i get the following error</p>
  
  <pre><code>05-01 12:31:23.680: E/chromium(17241): [ERROR:webmediaplayer_android.cc(328)] Not implemented reached in virtual void content::WebMediaPlayerAndroid::setRate(double)
  05-01 12:31:23.710: E/MediaPlayer(17241): error (1, -2147483648)
  05-01 12:31:23.710: E/MediaPlayer(17241): Error (1,-2147483648)
  </code></pre>
  
  <p>Am able to load any remote video and run,But problem is when i load the local video from the assets folder
  Code to load the files and setup the web view</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState)
  {
      super.onCreate(savedInstanceState);
  
      // Remove title bar
      requestWindowFeature(Window.FEATURE_NO_TITLE);
  
      setContentView(R.layout.activity_webview);
      mContentView = (LinearLayout) findViewById(R.id.linearlayout);
      // Keep the webview setup ready
      setupWebView();
  
  
  }
  
  public void setupWebView()
  {
      webView = (WebView) findViewById(R.id.webView);
      // progressBar = (ProgressBar) findViewById(R.id.progressBarForWebView);
  
      WebSettings webViewSettings = webView.getSettings();
      webViewSettings.setJavaScriptEnabled(true);
      webViewSettings.setJavaScriptCanOpenWindowsAutomatically(true);
      webViewSettings.setPluginState(PluginState.ON);
      webView.getSettings().setAllowFileAccess(true);
      webView.setSoundEffectsEnabled(true);
      webView.setWebViewClient(new SLCWebViewClient());
      webView.setWebChromeClient(new WebChromeClient());
      loadContentsInWebView();
  
  }
  public void loadContentsInWebView()
      {
  
          String localURL = "file:///android_asset/MediaBook2 (2)/SampleForVideo.html";
          logger.debug("WebView URL: {}", localURL);
          try {
              webView.loadUrl(localURL);
          }
          catch (Exception e) {
              e.printStackTrace();
              logger.error("Error while loading url", e);
          }
      }
      private class SLCWebViewClient extends WebViewClient
  {
      @Override
      public boolean shouldOverrideUrlLoading(WebView view, String url)
      {
          view.setWebChromeClient(new WebChromeClient()
          {
  
              private View mCustomView;
  
              @Override
              public void onShowCustomView(View view, WebChromeClient.CustomViewCallback callback)
              {
                  // if a view already exists then immediately terminate the new one
                  if (mCustomView != null) {
                      callback.onCustomViewHidden();
                      return;
                  }
  
                  // Add the custom view to its container.
                  mCustomViewContainer.addView(view, COVER_SCREEN_GRAVITY_CENTER);
                  mCustomView = view;
                  mCustomViewCallback = callback;
  
                  // hide main browser view
                  mContentView.setVisibility(View.GONE);
  
                  // Finally show the custom view container.
                  mCustomViewContainer.setVisibility(View.VISIBLE);
                  mCustomViewContainer.bringToFront();
              }
  
          });
  
          webView.loadUrl(url);
  
          return true;
      }
  </code></pre>
  
  <p>The Sample For Video.html code</p>
  
  <pre><code>    &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;title&gt;Testing for Video&lt;/title&gt;
  &lt;body&gt;
  
  &lt;video width="320" height="240" controls&gt;
    &lt;source src="2B952499A0E681.mp4"&gt;
  &lt;/video&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Code for the layout file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;FrameLayout
        android:id="@+id/fullscreen_custom_content"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#FF000000"/&gt;
  
  &lt;LinearLayout 
        android:id="@+id/linearlayout"
        android:layout_width="fill_parent" 
        android:layout_height="fill_parent"&gt; 
  
   &lt;WebView
         android:id="@+id/webView"
         android:layout_width="fill_parent"
         android:layout_height="fill_parent" /&gt;
  </code></pre>
  
  <p></p>
  
  <p></p>
  
  <p>cheers,
  Saurav</p>