I have a url to a video. I want to stream the video to my application. I can download the video file completely and then play it but i want that while downloading the video the video should also be played, like in youtube. I have a php server running which has the video on it. I have seen this question being asked but there were no answers for any of the questions.
You can go through code
void playvideo(String url)
{
String link=url;
Log.e("url",link);
view1 = (VideoView) findViewById(R.id.myVideoView);
getWindow().setFormat(PixelFormat.TRANSLUCENT);
MediaController mc = new MediaController(this);
mc.setMediaPlayer(view1);
view1.setMediaController(mc);
view1.setVideoURI(Uri.parse(link));
view1.requestFocus();
view1.start();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With