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

Scorpion
  • 6,831
  • 16
  • 75
  • 123
  • 1
    Check my answer [Here][1] and [Here][2]also [Here is my question] which will help you regarding this.[3]. [1]: http://stackoverflow.com/questions/6937615/how-to-play-youtube-video-on-videoview/11185129#11185129 [2]: http://stackoverflow.com/questions/8034874/how-to-play-video-from-my-youtube-account-in-android/11184741#11184741 [3]: http://stackoverflow.com/questions/11117720/play-video-file-from-youtube-in-android – Hardik Joshi Oct 08 '12 at 06:18

0 Answers0