How to play selected videos from sdcard using VideoView - android

I recently created a file chooser. I got it from http://www.dreamincode.net/forums/topic/190013-creating-simple-file-chooser/ and it only shows a text saying "File Chosen - 'filename'".
I wanted it to be played in VideoView.
I tried to google but I couldn't find it.
Can you guys help me out? Thank you so much.

I think your question is already exist at there :
How to play videos from SD Card
You should pass the URI of the video that's in the SD-Card to the VideoView control.
Couple of helpful links :
http://mrbool.com/how-to-play-video-formats-in-android-using-videoview/28299
How to play a video from url using videoview smoothly?
How to play .mp4 video in videoview in android?
Video playing using Video View in android

Related

Cannot download videos from youtube or vimeo from my android application

I am developing an android application, I want to download a video from youtube and play it in video view of my application. If it is possible? if I download videos from open source URI of the internet, it worked but from youtube, it shows can't play this video error. please give me a solution.

VideoView or WebView in YouTube Android App

Now this is a really stupid one! Forgive me on this question please but I really don't know the answer to it. My question is What have Youtube used to play videos intheir Android app? I mean is it a WebView or Just a simple VideoView? I used VideoView to play videos from the URL associated with them but it doesn't look as nice as YouTube's VideoView (or whatever it is)
And is there any other option to play videos from a URL other than using the code below? Because it just plays video in the native video player. If the red-marked portion in the image below is a VideoView, how does it look better than the normal VideoView? Or is it a WebView? Which one is a better option (in terms of UI) to play video from a URL? I'm using GingerBread and want to play mp4 or .flv videos in a VideoView or WebView (whichever is the better option, preferably like Android's YouTube app)
Uri data = Uri.parse(movieurl);
intent.setDataAndType(data,"video/3gpp");
startActivity(intent);

Progressive Streaming Videoplayer

I am developing an application in which I have a list of videos to be downloaded from the URLs. Each video is of about 10 min duration. Now, what I want is that the video is downloaded progressively in background and similarly displaying the downloaded video as like in Youtube.
I have tried using VideoView but it cant succeed.
So is it possible to do such with help of android's VideoView?
Thanks in advance.
This http://blog.infidian.com/2008/04/04/tutorial-custom-media-streaming-for-androids-mediaplayer/ shall help you. Would comment, but I can't.

Youtube video in VideoView

I want to play a remote video in a Videoview. Anybody knows a good free server to load my videos in it to later stream in a videoview? Is possible to see in a videoview Youtube videos? I have see another questions but I donĀ“t understand. Anybody can put a example to play a Youtube video or remote video for another server in a videoview?
Thank you
You can check android-youtube-player, a project to make YouTube videos play in a VideoView. The usage instructions and sample Activity code is available.
You can definitely stream video directly into a VideoView without a problem, and you set it up normally as well:
Uri pathtoVideo = Uri.parse(path);
videoView.setVideoURI(pathToVideo);
However, there are a lot of videos on Youtube that aren't mobile-friendly, and will end up throwing a "This Video Cannot Be Played" error.
The MediaPlayer on Android can only play "progressive streamable contents" which basically means: 1. the movie atom has to precede all the media data atoms. 2. The clip has to be reasonably interleaved. If it doesn't, you'll get the error I mentioned above.
Have you considered the YouTube API for android? I recently posted a tutorial on how to use the video and thumbnail views from the API here

How to get Youtube video list and play while clicking the video

I want to access Youtube videos and display the thumbnail of the video along with its title in a ListView. On clicking of the thumbnail, the video should be played. Can anyone suggest some sample program related to my need or link.
You can try the below link to solve your problem. Please check the same.
http://it-ride.blogspot.in/2010/04/android-youtube-intent.html

Categories

Resources