title: how to play video in Android Web view using html5
body: <p>I was used the below code for playing video in android WebView which contains a , I have placed the the video and the poster image in asset folder. </p>
  
  <pre><code>vWebview = (WebView)findViewById(R.id.VWebview);
  vWebview.getSettings().setJavaScriptEnabled(true);
  vWebview.getSettings().setPluginsEnabled(true);
  
  ViewContent(raw);   
  
  
  InputStream fileStream = getResources().openRawResource(R.raw.test); 
  int fileLen = fileStream.available();
  byte[] fileBuffer = new byte[fileLen]; 
  fileStream.read(fileBuffer); 
  fileStream.close(); 
  String displayText = new String(fileBuffer);
  vWebview.loadDataWithBaseURL("fake://not/needed", displayText, "text/html", "utf-8", "");
  </code></pre>
  
  <p>The html file is like that:</p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&gt;
  &lt;title&gt;Hello World&lt;/title&gt;
  
  
  &lt;body&gt;
  &lt;div&gt;
  
  &lt;p&gt;
  &lt;video src="file:///android_asset/bigbuck.m4v" poster="file:///android_asset/test.jpg" onclick="this.play();"/&gt;
  &lt;/p&gt;
  
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>It is working fine. the poster image is showing properly, as soon as I am clicking it is giving error:</p>
  
  <pre><code>05-12 10:24:22.207: ERROR/http(2882): Null or empty value for header "Host"
  05-12 10:24:22.207: ERROR/webcoreglue(2882): *** Uncaught exception returned from Java call!
  05-12 10:24:22.262: ERROR/AndroidRuntime(2882): Uncaught handler: thread WebViewCoreThread exiting due to uncaught exception
  05-12 10:24:22.262: ERROR/AndroidRuntime(2882): java.lang.RuntimeException: Null or empty value for header "Host"
  05-12 10:24:22.262: ERROR/AndroidRuntime(2882):     at android.net.http.Request.addHeader(Request.java:161)
  05-12 10:24:22.262: ERROR/AndroidRuntime(2882):     at android.net.http.Request.&lt;init&gt;(Request.java:126)
  05-12 10:24:22.262: ERROR/AndroidRuntime(2882):     at android.net.http.RequestQueue.queueRequest(RequestQueue.java:359)
  05-12 10:24:22.262: ERROR/AndroidRuntime(2882):     at android.net.http.RequestQueue.queueRequest(RequestQueue.java:327)
  05-12 10:24:22.262: ERROR/AndroidRuntime(2882):     at android.webkit.HTML5VideoViewProxy$PosterDownloader.start(HTML5VideoViewProxy.java:275)
  05-12 10:24:22.262: ERROR/AndroidRuntime(2882):     at android.webkit.HTML5VideoViewProxy.loadPoster(HTML5VideoViewProxy.java:490)
  05-12 10:24:22.262: ERROR/AndroidRuntime(2882):     at android.webkit.WebViewCore.nativeTouchUp(Native Method)
  05-12 10:24:22.262: ERROR/AndroidRuntime(2882):     at android.webkit.WebViewCore.access$3400(WebViewCore.java:48)
  05-12 10:24:22.262: ERROR/AndroidRuntime(2882):     at android.webkit.WebViewCore$EventHub$1.handleMessage(WebViewCore.java:1095)
  05-12 10:24:22.262: ERROR/AndroidRuntime(2882):     at android.os.Handler.dispatchMessage(Handler.java:99)
  05-12 10:24:22.262: ERROR/AndroidRuntime(2882):     at android.os.Looper.loop(Looper.java:123)
  05-12 10:24:22.262: ERROR/AndroidRuntime(2882):     at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:612)
  05-12 10:24:22.262: ERROR/AndroidRuntime(2882):     at java.lang.Thread.run(Thread.java:1096)
  </code></pre>