Hi All,
I am writing an application to play the youtube videos using streaming.

First method:
I am getting the RTSP URL to the video using GData APIs.
Here is the code to play the RTSP url.

VideoView mVideoView = new VideoView(this);
setContentView(mVideoView);
mVideoView.setVideoURI(Uri.parse("rtsp://rtsp2.youtube.com/CiILENy73wIaGQkDwpjrUxOWQBMYESARFEgGUgZ2aWRlb3MM/0/0/0/video.3gp"));
mVideoView.start();

But it throws error on both G1 device and emulator (Emulator has some
firewall problem as per mailing list)
Here is the error message

ERROR/PlayerDriver(35): Command PLAYER_INIT completed with an error or
info PVMFFailure

Second method:
A hack way to get the path of 3gp file from
http://www.youtube.com/get_video?v=<VideoID>&t=<>&<>..
After getting the file path and I can call setVideoURI and it plays
fine. But it is a hack way to achieve the requirement.
I have checked the Youtube App also, it also does the hack way to play
the youtube url.(Checked with logcat)

I have tried changing from VideoView to MediaPlayer but no change in the error.

Is there a "Clean" way to do this?

Please let me know your thoughts.

With Regards
Vinayakumara T V

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"android-framework" group.
To post to this group, send email to android-framework@googlegroups.com
To unsubscribe from this group, send email to 
android-framework+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/android-framework?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to