title: Load video from assets into HTML5 webview - Android
body: <p>Like the title says, I need to load a video (.mp4) from the assets folder into a WebView.
  I've tried a couple of things:</p>
  
  <p>//First</p>
  
  <pre><code>String webpage = "&lt;!doctype html&gt;&lt;head&gt;&lt;meta charset='utf-8'&gt;&lt;/head&gt;&lt;body&gt;&lt;video id='video' controls='controls' autoplay='autoplay' height=" + m.getHeight() + " width=" + m.getWidth() + "&gt;&lt;source src='file:///android_asset/1003/landscape_1003_1_m864.mp4' /&gt;&lt;/video&gt;&lt;/body&gt;&lt;/html&gt;";
  
  wv.loadData(webpage, "text/html", "utf-8");
  </code></pre>
  
  <p>//Second</p>
  
  <p>Load the same webpage but using the loadUrl() method</p>
  
  <pre><code>wv.loadUrl(webpage);
  </code></pre>
  
  <p>//Third</p>
  
  <p>Loading the exact same webpage but with another method</p>
  
  <pre><code>wv.loadDataWithBaseURL("file:///android_asset/", webpage,"text/html", "utf-8", null);
  </code></pre>
  
  <p>I've tried to change the first parameter to null,also the webpage, ...</p>
  
  <p>Everything has to be added dynamically (the webview itself, the url to the video, the width, height, ...) so making a XML file is not an option.</p>
  
  <p>A lot of solutions I've found on the internet was to move the video to the Raw folder or SD card, but that is not an option (business decision).</p>
  
  <p>It would be nice if somebody could help me.</p>
  
  <p>P.S. If you could help me with the exact same thing but showing the video in a videoview with all the controls like a html5 video element (play, pause, seekbar, fullscreen) feel free!</p>