android videoview - managing bad urls error? - android

Im using some time expiring url to watch a video from internet and so, when the expiration time come out, the video is not working anymore. In this case, im getting an error dialog box from the videoplayer saying the video is unreadable. that is quite fine, but i would like to display my own dialog box text. how can i do ? is there any way i can know my video didnt work ? Any ideas ?

I found the answer my self reading a bit more the SDK. There is setOnErrorListener(android.media.MediaPlayer.OnErrorListener).
that you can create. :)

Related

Add download icon over video thumbnail in webview

Hello stackoverflow masters,
I was just wondering how this app embed the download icon over each video detected on any of the website. I tried to insert the download icon manually once page has been loaded but it is not working. This is really a challenging and they have done this so but obvious this is possible.
So anyone who knows or have some experience about it, please give some hints or ideas over it ? I hope someone who is master of that can know that.

Why is MediaRecorder.prepare() throwing an IOException?

I am just trying to make a simple video recording app. I have spent days trying to figure this error out and I have had no luck. I am so close to just deleting my whole computer, this error is driving me mad! I followed developer.android.com and YouTube tutorials. I can't see why my code doesn't work as I copied everything they did.
http://pastebin.com/q84v81hG
I put all the code in a paste bin because the code messes up when I put it here.
Thanks for any help!
BTW I am aware I haven't added a button that stops recording, I am just trying to get it recording in the first place before I add that.

Youtube Player on Android - endless loading

YoutubePlayer shows endless loading when try to play a song with YoutubePlayerAPI in particular with YouTubePlayerSupportFragment for Android. It happens randomly. Sometimes the loading fails with INTERNAL_ERROR. Please see attached images
Strange - because native Youtube app is able to load and play video properly and without any delay.
Please advise what might be the reason of such issues and how to fix them. Thanks in advance
EDIT: I do receive onVideoStarted callback, but still video doesn't play
See this answer and try to do the same YouTubePlayerFragment backstack. I think your problem has same cause as mine. Also check logcat output for errors (it could be obfuscated, and out of application scope, so check 'No filters' in logcat)
I don't know if this really answers the questions, but I was having a similar issue with infinite loading.
Basically I would play a video using a player fragment, exit the video, and then the next video I would try to play would display an infinite loading indicator.
This issue was only happening on certain devices.
Since I was using the latest version of the youtube api, I updated the youtube app on the problematic devices and that seemed to resolve the issue.
I know that "update the youtube app" isn't a great answer, but it did resolve odd issues I was experiencing.
Hope this helps.

Unfortunately app has stopped measures

This might be a weird question to ask.
But i want to make my application better.
I think i can find a solution here.
I am developing android apps..
It almost complete. What i am trying to figure it out is, how android error works.
I mean, i make an error so i will know when my apps crash, it will direct to some activity.
Like i delete an imagebutton in xml so my app will crash and unfortunately app has stopped will show up.
How do i direct to an activity after i click ok on that dialog ?
Is it possible to achieve something like that ?
Instead of crashing it would be better to implement try and catch where needed.
http://docs.oracle.com/javase/tutorial/essential/exceptions/try.html
This allows the app to softly deal with an error and continue. You could then redirect, but it would be better to just let it continue so the user wouldn't have to be interrupted.

Playing embedded YouTube Videos

I have a WebView app that includes embedded YouTube videos on a page. But when I go to that page, it gives me an error with a whole bunch of text. I have searched the internet for the past week but with no luck. Can somebody please help me?
P.S. I am new to Android, so snippets would REALLY help :)
Here's the error:
vp.events.addOnDOMLoadHandler(function()
{vp.website.createVideoPlayer('mediaPlayer_cff30e24_42e1_4eb6
'http://youtube.com/v/XXXX', 569, 485, false);});
You need Flash Player in order to view this.
well from CommonsWare
You cannot show them embedded except perhaps on devices that have Flash.
here is the link: https://stackoverflow.com/a/2292459/1084764
however you can override the urlLoading on your webviewclient
I suggest you reading the whole post : play youtube video in WebView
Check if the Adobe Flash Player on your phone is indeed working properly.

Categories

Resources