3

I am having one application in which I would like to play Youtube Videos. I do some googling and I found lots of tutorial on how to play youtube videos in Android. But most of all gives me the solution which uses WebView.

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

This wil play the video in WebView. But I don't want to user WebView, Can't we use MediaPlayer functionality to do this task? Also I would like to Buffer/Cache the video to make it user friendly.

1) So my question is how to play youtube video through MediaPlayer in Android?

2) Same time how to buffer/cache the video in Background/Service/AsyncTask?

Please if anyone have any idea guide me.

Thanks

4

0 回答 0