-1

Possible Duplicate:
How to play YouTube video in my Android application?

How can i play a youtube video in my android Application. There are so many person gives there view but its not working. Can anyone provide me any solution.

I am facing getting exception:

07-20 14:32:50.898: E/MediaPlayer(4130): error (1, -2147483648)

07-20 14:32:50.914: E/MediaPlayerDemo(4130): error: Prepare failed.: status=0x1 07-20 14:32:50.914: E/MediaPlayerDemo(4130): java.io.IOException: Prepare failed.: status=0x1 07-20 14:32:50.914: E/MediaPlayerDemo(4130): at android.media.MediaPlayer.prepare(Native Method) 07-20 14:32:50.914: E/MediaPlayerDemo(4130): at com.youtube.MainMenu.playVideo(MainMenu.java:133) 07-20 14:32:50.914: E/MediaPlayerDemo(4130): at com.youtube.MainMenu.surfaceCreated(MainMenu.java:188)

Community
  • 1
  • 1

1 Answers1

0

Refer this link

https://stackoverflow.com/a/1309821/1441666

And also

    video.setVideoURI(Uri.parse("rtsp://v6.cache7.c.youtube.com/CiILENy73wIaGQk-fYZWNAPDsxMYDSANFEgGUgZ2aWRlb3MM/0/0/0/video.3gp"));
    mMediaController = new MediaController(this);
    mMediaController.setMediaPlayer(video);
    video.start();
Community
  • 1
  • 1
Nirali
  • 13,571
  • 6
  • 40
  • 53