title: Android HTML5 video in Meteor + Phonegap/Cordova
body: <p>So I have made a Web app using meteor and it plays videos stored in its public folder quite nicely. The problem is when I build it into a native app for Android, it doesn't seem to be able to find the videos. </p>
  
  <p>Just wondering if anyone knows how to solve this problem. I would like the videos to be stored locally if possible (in the app cache?). I'm currently using a videojs package for meteor. And I've tried different format videos like mp4, ogg and webm. </p>
  
  <p>Cheers! </p>
  
  <h2>Update:</h2>
  
  <p>I've managed to find a solution that requires no plugins. Meteor allows you to replace a few Cordova files during the build, by creating a <code>cordova-build-override</code> folder under the root project folder. So I've added a file in:</p>
  
  <pre><code>cordova-build-override/platforms/android/src/com/{somename}/{appname}/{AppName}.java
  </code></pre>
  
  <p>Then I've gone into the <code>.meteor/local/cordova-build/{follow same dir as above}</code> and copied the produced *.java to the file. And added these few lines.</p>
  
  <pre><code>import android.os.Bundle;
  import org.apache.cordova.*;
  import android.webkit.Websettings; // This is the added line
  
  public class AppName extends CordovaActivity 
  {
      @Override
      public void onCreate(Bundle savedInstanceState)
     {
          super.onCreate(savedInstanceState);
          super.init();
          // Set by &lt;content src="index.html" /&gt; in config.xml
          super.loadUrl(Config.getStartUrl());
          //super.loadUrl("file:///android_asset/www/index.html");
  
          // The two lines bellow are what I've added.
          WebSettings ws = super.appView.getSettings();
          ws.setMediaPlaybackRequiresUserGesture(false);
     }
  }
  </code></pre>
  
  <p>And this has allowed me to play inline HTML5 videos with videojs in cordova+meteor. And no extra plugin.</p>