Streaming videos on VideoView
<p>I have a simple <code>VideoView</code> and I'm trying to stream a video from a URL. Here's my code:</p>

<pre><code>//everything is in onCreate()

videoView = (VideoView)findViewById(R.id.video);

String videoAddress = "https://archive.org/download/ksnn_compilation_master_the_internet/ksnn_compilation_master_the_internet_512kb.mp4";
Uri videoUri = Uri.parse(videoAddress);

videoView.setVideoURI(videoUri);
videoView.start();
videoController = new MediaController(this);
videoController.setAnchorView(videoView);
videoView.setMediaController(videoController);
</code></pre>

<p><strong>The Problem:</strong></p>

<p>It takes close to 7-8 seconds to start the video. Keeps buffering till then. </p>

<p>It isn't about the internet connectivity because I played the same video, <em>in the same internet and at the same time</em>, in the browser. (running the browser parallel to the app). And it took only 1-2 seconds to start the video in the browser.</p>

<p>I tried several other videos too from different sources, and I'm facing this lag in all of them.</p>

<p>Similar questions has been asked a several times on SO, but are unanswered.</p>