I have created an app for Android 4.0.3 (Samsung Galaxy Tab 10.1")
The app play an mp4 video file all the time in full screen mode.
When the video stop(finish), the app start it again from the beginning.
Now the problem is that after 15 minutes I got an error like "cannot play this video"
So I compiled the same app for Android 2.0.3 for my HTC Desire Z and works great, without any problem.
So please help me to figure out where is the problem here?
Related
I'm experience four separate bugs with the official cordova media capture plugin on a Nexus 6 phone running Android 6.
Some of these bugs did not occur on the Nexus 6p. So I know there may be some phone specific issues here. Any help would be greatly appreciated.
Bug 1
open app at portrait orientation
then rotate to landscape
press record, then stop
notice how video preview is rotated in wrong orientation
Bug 2
open app
change camera facing from rear to front
notice how you can't click record button now
Bug 3
open app at portrait orientation
press record, then stop
accept video, and notice video cannot be played in a video player
Bug 4
open android Photos app
notice how videos are not shown in gallery
restart phone and reopen Photos app to see them
Plugin
https://github.com/apache/cordova-plugin-media-capture
Demo to replicate bugs
https://github.com/kmturley/cordova-media-capture-example
Fixed by updating to Android 6.0.1
I have a very strange issue with android's VideoView class.
My app streams a video file from my server. Sometimes the app tries to fetch the video file before it is actually there (still processing), and I get error ( 1 , -1004) from the videoView's mediaPlayer. Than I try to stream the same url after the video is already in that path, but the videoView will keep sending the same error again and again for a few minutes.
Other clients (android/ios/vlc) will succeed playing that same video file, while the app that tried to play it while it wasn't in there will continue to fail for a few minutes.
The VideoView will succeed playing all video's 99% of time - the ony issue I have with it is this one.
I tried creating a new videoView instance to play that url, but it gives the same error -1004 (MEDIA_ERROR_IO).
I tried quitting the app / restarting the device - but that same url will continue to fail for a few minutes.
I tried copying the url from the failing device, to the VLC app in that device, and will succeed playing it.
The issue is not device/version specific - It happens to all the devices I tested on, and all android versions I tried:
Samsung galaxy s3 Jelly bean.
LG nexus 4 - kitkat.
Samsung galaxy nexus ICS.
Samsung Galaxy s2 gingerbread.
Samsung nexus s - ICS.
It's as if MediaPlayer is remembering that bad link, and will continue to send the same error for a while without checking it again.
Does the videoView cache links in any way?
What could be the issue??
i'm having trouble trying to find a video player to play a stream for my app on a galaxy nexus.
it works on every other phone apart from nexus.
if i dont give the app the tag to tell it that it's a video in the url it gives me an options screen to choose what to complete the action with, in this list it doesn't show a video player. (if i state that it is a video i get a class not found exception)
anyone know what the issue is? as i said it's working on other phones apart from nexus, even works on galaxy s3
thanks
I got the MediaPlayer error code as (1,-110) on BeagleBoard Hardware running ICS.The code runs fine on android tablets with ICS but I get a dialog box as "Sorry,this video cannot be played" error on BeagleBoard only.Any suggestions.
This is a time out error from the MediaPlayer:
http://developer.android.com/reference/android/media/MediaPlayer.html#MEDIA_ERROR_TIMED_OUT
Also, it may happen with an issue with Samsung firmware on Android 4.1.2, I've seen it in Galaxy S2 mini and Galaxy S3. Take a look here:
https://stackoverflow.com/a/18378273/3032209
You could solve it if you play the file it with another library, which will have the adequate codecs, like aacdecoder-android
I know my answer is too late to your question and I think you were able to fix this problem by now, but if not and for those people who are struggling with the Media Player Error (1, -110) (like I did the whole day today, Android HTC Desire X Jelly Bean 4.1.1), maybe this is the solution for you:
Just reboot your android (or close all the apps, which are using the Media Player).
In my case it was not a programming error, I just had to many apps open using the Media Player Instance, which led to that time out and I could not use it anymore.
i am creating application playing two videos,Its working fine on eclair,But showing error on froyo.
On emulator 2.2 its also working.