Calling YouTube app using ACTION_VIEW intent Failing most of the time - Android Software Development

I've written a small app to parse some rss feeds from YouTube and launch videos selected by the user. To play the video, I'm using an intent:
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(videoAddress);
in order to call the YouTube app, if installed on the device.
The problem I'm having is that, of the population of videos I am using in my app, about 90% of them display a 'Cannot play video' error message: "Sorry, this video cannot be played.". A few of them work just fine from my app. The videos that do not work will play fine in the YouTube app if searched for and launched entirely from within the YouTube app.
Has anybody seen this behavior, or does anybody have any ideas for things to try? Obviously the YouTube app launches videos in a slightly different way internally than it does from an Intent request, but I haven't a clue how to get to the bottom of it.

Hi,
I am also facing the same problem ... " Not able to play the videos in YouTube"
When i analysed the log, i could note that youtube is not calling the my movieplayer(this is app written to support all kind of playback). Instead it is directly calling the "MediaPlayer" service and PVPlayer service.
I would be thankful if i someone explains as how the youtube launches the video
Thank you

Related

YouTube PROBLEM

When i open HTC YouTube app it doesn't load the thumbnails of the videos, only the gray tv icons! Does anyone else have same issue?
How can i fix this?
Thanks!
yes i have the same problem! i've searched for some answers and no luck. the google youtube works fine but it's not the same quality.
Me too! The same problem with HTC's Youtube client.
I noticed that under the history tab, some old videos i had viewed about a week ago had their thumbnails displayed whereas the more recent videos had none (an active internet connection is required to load these 'history thumbnails').
Also, from a "fresh" list of videos,if you click on the description button (!), a thumbnail sometimes loads on the description screen.
This leads me to conclude it's not the software, but somehow Youtube has stopped sending/changed the preview pictures that accompany the video description.
Is this just a temporary glitch, or does Google want us all to switch to its own viewer?
guys
go for the offical youtube app from google
its work for me and its faster than the htc youtube
demo video
http://www.youtube.com/watch?v=o0ljWtG1xOM
download last version
http://m.google.com/youtube/download/binaries/L1/2.0.9/youtube.CAB
yeah o dont reallu like the google youtube version its faster but less quality. anyway i was having the same problem now is working fine. maybe it was a problem on the youtube server or maybe upgrading my sprint rom to the latest htc version fixed it.

Youtube

My HTC Magic suddenly can´t play videos from youtube. I get the message "Sorry can´t play this video".
I have done a hard reset. This did not solve the problem. Any idea what could be wrong ?
Some new & old videos from youtube needs to be rendered and converted to playable formats compatible with the android system. This can take hours just as a newly video has been uploaded on their data base or might take months, depends on Google.
Example:
Little Johnny uploads a video on youtube. He tries to watch the newly uploaded video on his android device.
He can't, "Sorry, can't play this video". He keeps trying and trying, still the same result.
Behind the scenes a Google employee/super computer grabs Little Johnny's video and converts it to a playable format compatible with android devices.
The next day Little Johnny tries to watch the video again on his android device and was jubilant to find out that the video started to play.
Answer: Time heals all wounds; just wait it out.
I am not sure that is how is works. Youtube works periodically with the same video. Sometimes it will play the video sometimes it will not. I suspect it might have something do with wheather Youtube is able to launch the videoplayer.
... I am not sure though and it is very annoying

[Q] Youtube buffering forever

I was trying to watch a youtube video. In the youtube app, it just shows "buffering... " and does not play. Using the browser, only the circular loading screen showed. Note that everything else loads like the comments, views etc.
However, i can view embedded youtube videos. Now im confused. I think it has to do with the youtube mobile player since the regular player for pc was able to play the embedded video.
Do you know any fix? Thanks.

[Q] Flash player running in the background

This issue is related to the application "Feedly".
I watched a video with the browser of Feedly. I stopped watching it in the middle by pressing the system "back" key, but the video was still playing in the background (I could hear the sound), even if I exited/restarted Feedly. Amazingly, even if I turned off the screen, the video kept playing. It seemed that there is no way to stop the sound of that video, so finally I restarted the phone.
Anyone encountered the same issue?
The webpage/feed I was browsing:
http://www.universetoday.com/103719/how-can-we-stop-an-asteroid/
You can reproduce the problem by add the rss feed to your Feedly reader and play the video of that webpage with the internal browser of Feedly.
With the Chrome browser, after exiting the browser the video won't play in the background.
Android version: 4.2.2
------------------------
What amazes me is that, in the past I had been looking for a way to play some video on Youtube in the background and didn't found a good solution. Someone said that that is not possible. But now I find that this is indeed possible.
Feedly is most likely the issue, try contacting the developer via email in the Play Store about this.
You can force stop the app in the settings or by pressing the recent key, press and hold Feedly, press "App info" and then press "Force Stop".
Sent from my Nexus 4 using xda app-developers app

YouTube links from external sites not working

Over the past week I have noticed that if I click a link for a YouTube video from some place like facebook, instagram, reddit app, that the video fails to load. I'm instead taken to the YouTube home screen and get an android system message on the bottom of my screen that says "Can't load link".
I'm 100% stock with the latest security patch, and in the U.S. Initially I thought it was a Facebook problem, but it appears to be any link to a YouTube video that causes it. Embeded YouTube videos play fine.
These linked videos play fine on other devices.
blackwrx02 said:
Over the past week I have noticed that if I click a link for a YouTube video from some place like facebook, instagram, reddit app, that the video fails to load. I'm instead taken to the YouTube home screen and get an android system message on the bottom of my screen that says "Can't load link".
I'm 100% stock with the latest security patch, and in the U.S. Initially I thought it was a Facebook problem, but it appears to be any link to a YouTube video that causes it. Embeded YouTube videos play fine.
These linked videos play fine on other devices.
Click to expand...
Click to collapse
First thing i would do is, deinstall the YouTube App and reinstall it.

Categories

Resources