I'm using Android Youtube API v3. My application plays youtube video. I want to get videoID from youtube url.
I see there are a lot of sample that uses pattern to parse the url to get the video ID.
But I'm afraid of this way will fail when youtube change their url in the future.
There are some formats of youtube video url:
http://www.youtube.com/watch?v=0zM4nApSvMg&feature=feedrec_grec_index
http://www.youtube.com/user/SomeUser#p/a/u/1/QDK8U-VIH_o
http://www.youtube.com/v/0zM4nApSvMg?fs=1&hl=en_US&rel=0
http://www.youtube.com/watch?v=0zM4nApSvMg#t=0m10s
http://www.youtube.com/embed/0zM4nApSvMg?rel=0
http://www.youtube.com/watch?v=0zM4nApSvMg
http://youtu.be/0zM4nApSvMg
Are there any API to get video ID from the url?
Thanks in advance.