So I've been trying to debug this a little bit and here's what I have
come up with so far:
It appears that the url generated and stored in the lUriStr has a
malformed Youtube URL. I tried copying and pasting this URL into my
browser and it failed to resolve the youtube video. Instead I
replaced the following line:
lUriStr = "
http://www.youtube.com/get_video?
video_id="+pYouTubeVideoId+"&t="+URLEncoder.encode(lTokenStr)
+"&fmt="+pYouTubeFmtQuality;
with:
lUriStr = "
http://www.youtube.com/watch?v="+pYouTubeVideoId
+"&t="+URLEncoder.encode(lTokenStr)+"&fmt="+pYouTubeFmtQuality;
Notice the difference in the url from "get_video?video_id=" to "watch?
v=".
After making this change I received the following error:
01-30 00:47:02.407: ERROR/PlayerDriver(19701): Command PLAYER_INIT
completed with an error or info PVMFErrCorrupt
01-30 00:47:02.407: ERROR/MediaPlayer(4470): error (1, -10)
This seems to get further in the YouTube streaming process.
Unfortunately I do not know enough about playing streamed media from
an Android device nor the YouTube APIs. Keyes, I understand that you
are busy but with using this little tidbit help in debugging this
issue? Thanks again for providing this source.