My application uses a simple VideoView .It uses an 3gp file from assetsbut all i can see is a blank screen and music of that video.
Would someone help me to display the video?
P.S-I am trying it on emulator?
Do not use emulator for testing video playback. Its ability to handle video playback is very limited. You should use actual device to play videos.
Check https://stackoverflow.com/a/3005928/1341006 by Commonsware for more details
Related
I can load a video from the web. All works fine.
However, when a network connection is slow the video is buffering. So I want to set the quality of video while, streaming it automatically or manually.
I am blank about this.
If I am not mistaken, VideoView only plays the video. Here is the documentation on it, doesn't seem to have that option at all.
I'd suggest you use the youtube API instead if you can.
I need to play a video with fullscreen when a user plays it.
Unfortunately, as far as I understand, if the HTML5 Video tag is used, Android plays it in-frame. So that tried webkitEnterFullScreen() and it seems to work(kind of...) but user has to click the play button again. Overall performance feels a bit clumsy and not sure if old OS like 2.0+ could handle it.
As an alternative method, I'm now trying to play video using direct link rather than the Video tag. For example, [a href="video.mp4"]Click to play[/a]. I think that it works well but the only problem is that it asks to choose a application either 'Video Player' or 'Browser'.
So my question is
How can I define using javascript to play the video using Video Player, so that the selection dialog won't prompt?.
What is the native video player for Android? For example, iOS uses Quicktime and it is possible to embed video using Quicktime object. And are there any equivalent method for Android?
When the Video tag is used, how to play video simultaneously with fullscreen?
try following code :
String path1="/path/to/video/file.3gp";
Uri uri=Uri.parse(path1);
VideoView video=(VideoView)findViewById(R.id.VideoView01);
video.setVideoURI(uri);
video.start();
You have to realize something very important: There is no native video player for android.
There is a dozens players for android and it is not your decision but the users decision if he should use player A or B. Don't try to force Android users to iOS behavior, it really doesn't give a better impression.
I have an mp4 video thats 1200*780 resolution that I am not able to play on my android device.I am using android 2.1 device for testing the application.I am using video view to play videos on my emulator.But I had read somewhere that video view has a limitation that it will not play videos above 320px.What should I do if I want large videos to be played on my android device?
You should resize video. For this you have create a custom class to VideoView and override onMeasure method. This link will help you. Its in detail.
I am working with an Android and PhoneGap application and am using the HTML5 video tag to play videos on my web page. When I play the video I get the audio output but the video is not visible. How can I play a HTML5 video on Android?
I've written about this issue a number of times. See my previous answer:
Playing video on AVD with phonegap
Also, I'm working on monkey patching the video tag on Android so hopefully we'll have something even better soon.
Guys
I am new to android and want to write a simple application that plays a video in android using video view. I have written the code it is working but the view is not clear. It is blurred. What should I do?? Please Help.
Is there any alternative to video view to achieve that...?? I want to play the recorded video from android phones
There are two possibilities. Either the quality of the video might be low or you would have tried it in a emulator. Sometimes it is possible for emulator to have some problems with playing video which I have personally faced. So you have to try it in a real device.
And regarding alternative for videoview, there is no such alternatives available I believe. But still videoview should be simple to play a video.