It would be much more simpler if you have implemented both ways, one with full URL, that will parse out video ID, and one for ID alone...it would be autorecognized, and using proper method.. :/

tried, working nice..