I have to play a video in my android app. The file is stored on a online file server
link is : http://view.vzaar.com/923037/video
I am unable to play this file using VideoView. I also tried to load this file into WebView but the WebView opens Web Browser and then the file starts playing.
Is there any way to play these kind of file directly into my app without downloading into device?
For your VideoView, the prpoblem is with setVideoPath
method. You need to use setVideoURI
instead to specify a streaming source:
VideoView mVideoView = (VideoView) findViewById(R.id.vdoTest);
mVideoView.setMediaController(new MediaController(this));
String viewSource ="http://view.vzaar.com/923037/video";
mVideoView.setVideoURI(Uri.parse(viewSource));
This should work, provided the video is encoded correctly: (AAC+H.264, baseline)
write this html code and load it in webview:
<html><body><embed src="http://view.vzaar.com/923037/video" width="100%" height="100%"></embed></body></html>
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