Strange Behavior of Android VideoView - Can't Play Video
1)When the message "Can't Play Video" occurs?
Android usually gives out this message, when it is not able to play the media content. The reasons for this to happen can be anything like
- Unsupported file format
- Unsupported codecs
- Erroneous content
to mention a few.
2)What are the Solution for that?
Unless you have your own Media Framework in your app, there is no solution from the application level
3) What could be possible mistakes in my application?
Very unlikely the mistake is in your application. If you read the logs, you will see that the error seems to originate from the DataSource of opencore (Which version of android are you running anyway? It is still using Opencore instead of StageFright). It is recognizing it as a large file (> 2GB) and hence giving out the error "E/OsclDirectFileIO( 2182): [LargeFileSupport] OsclDirectFileIO::OpenFileOrSharedFd Error = -1"
The other thing to note is certain phones have better multimedia capability than the other phones, since OEM's can themselves improve the multimedia capability. So there is no written guarantee that all files can be played on all devices, even though it conforms to the supported formats, codecs mentioned by Android.
Android VideoView Can't play this video when streaming from localserver
Problem Solved by implementing Spring WebFlux.
Android VideoView Can't play video error especially .mp4
The problem was that the second video is not in H.264 AVC Baseline profile.
Can't play this video. Android videoView mp4 recorded by android device
Please refer below code snippet...problem was with the path declaration..
String uriPath = "android.resource://"+getPackageName()+"/"+R.raw.aha_hands_only_cpr_english;
Uri uri = Uri.parse(uriPath);
mVideoView.setVideoURI(uri);
Thats it...
VideoView can't play video error
the url you are trying to use is just a normal html - page (youtube) not the actual video. this way it can't work.
have a look at the official youtube api:
https://developers.google.com/youtube/android/player/
or try to open the url with a new intent:
startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse("http://www.youtube.com/watch?v=Hxy8BZGQ5Jo")));
this should open the video in a webview or the installed youtube app....
Related Topics
Android Camera: Onactivityresult() Intent Is Null If It Had Extras
Android Notification with Buttons on It
Creating a Dialogpreference from Xml
Can Gradientcolor Be Used to Define a Gradient for a Fill or Stroke Entirely in Xml
How to Create Multiple Pendingintents with the Same Requestcode and Different Extras
Intent Putextra Arraylist<Namevaluepair>
How to Check the Internet Connection Periodically in Whole Application
Android Studio- Program Type Already Present: Com.Google.Android.Gms.Internal.Measurement.Zzwp
Setting Audio File as Ringtone
Android Studio: Default Project Directory
Android Support Library Error After Updating to 23.3.0
Android Gcm (Push Notification): Device Doesn't Receive Notification If Application Is Stopped