title: How to play video on my app with url
body: <p>When I play video using my internal storage it is working fine but when I give  URL this says can't play this video.Please give suggestion. Thanks in advance.</p>
  
  <pre><code>    public class Video-demo extends Activity {
        private static final String path ="http://demo.digi-corp.com/S2LWebservice/Resources/SampleVideo.mp4";
        private VideoView video;
          private MediaController ctlr;
         @Override
         public void onCreate(Bundle icicle) {
              super.onCreate(icicle);
              getWindow().setFormat(PixelFormat.TRANSLUCENT);
              setContentView(R.layout.videoview);
  
              video = (VideoView) findViewById(R.id.video);
              video.setVideoPath(path);
  
              ctlr = new MediaController(this);
              ctlr.setMediaPlayer(video);
              video.setMediaController(ctlr);
              video.requestFocus();
       }
  }
  </code></pre>