How to play youtube videos within custom android activity

by sanjay » Tue, 04 Jan 2011 13:49:29 GMT


Sponsored Links
 Hi,

I am able to play youtube videos by

startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://
www.youtube.com/watch?v=cxLG2wtE7TM")));

But this leave my application and starts the player activity where I
have no control, How can I play youtube videos within my activity, as
I have to provide the user some option menu?

Let me know how can I achieve this.

Thanks
Sanjay Ujjainkar

-- 



Re: How to play youtube videos within custom android activity

by Kumar Bibek » Tue, 04 Jan 2011 15:42:14 GMT


 You need to understand first that youtube videos are generally in flv
format, and the SDK doesn't provide default decoders or apis to handle
such media. If you have to create your own player, then you have the
tough task of converting the flv files to other supported media and
then continue.




-- 


Sponsored Links


Re: How to play youtube videos within custom android activity

by Jonathan Foley » Tue, 04 Jan 2011 17:09:17 GMT


 Huh? All the mobile youtube apps that aren't flash native are pulling
down h264 video.

So the trick is not converting them, but rather figuring out what the
links are to those h264 videos. It may be special keys are required,
but there are some HTML5 demo sites floating around that have
javascript that pulls down those h264 videos, so people have figured
out how to get them. You can't request them via the YouTube API, which
is pretty strange, but all the youtube download scripts pull them
down.

Jonathan






-- 



Re: How to play youtube videos within custom android activity

by Sohil » Tue, 04 Jan 2011 20:48:24 GMT


 Hi,

Try using <video> element of HTML5, though its experimental. but it will 
help for your problem
put the webview component and load the static file with dynamic url to 
webview.
It wont work for all the video that would be the limitation.
Its supported in android 2.0+ .

<video id="video" autobuffer height="240" width="360">
<source src="BigBuck.m4v">
<source src="BigBuck.webm" type="video/webm">
<source src="BigBuck.theora.ogv" type="video/ogg">
</video>




-- 



Re: How to play youtube videos within custom android activity

by Sudheer » Wed, 05 Jan 2011 03:47:02 GMT


 You can create a custom Activity with a Webview on it. You can load
the youtube on the webview. My 2 cents.

Cheers
Sudheer




-- 



Re: Re: How to play youtube videos within custom android activity

by Kumar Bibek » Wed, 05 Jan 2011 03:49:44 GMT


 Yeah, but it wont play on all phones though, which don't have flash.

Kumar Bibek
 http://techdroid.kbeanie.com 
 http://www.kbeanie.com 








-- 



Re: Re: How to play youtube videos within custom android activity

by satishsalimath salimath » Fri, 07 Jan 2011 13:34:15 GMT


 download youtube downlloader right click on video copy url and paste it in
downloader and viw it on real one player
With Regards
Satish.S






-- 



Other Threads

1. possible network issue on Android 2.0

Some  Droid phones drop internet connection
When customer sent log i see several onCellLocationChanged
He tells me he never moved more than few feet during that time and it
only happens on 3G not over wifi
Is it possible Droid dropping persistent network connection because
the phone changes cell towers?
Why would the phone change cell towers from same location
There is no problem with any G1 or Hero phones only Droid
Thanks

-- 

2. Android Telephony

Hi

I want to find the network signal strength for my app.
But I cant find the api for it.

Do anybody know how to find the signal strength of the phone?

Thanks
--~--~---------~--~----~------------~-------~--~----~

3. Infinite Reboot Cycle Caused by Choosing a Remote Location Picture as a Background

4. AudioTrack usage with streaming data in native code

5. Send numbers during call

6. Not able to write to /storage

7. onNewIntent() is never called when use Icons