Get Youtube Video ID From Link With JavaScript
Is there any way to get video id from youtube link.
I have a way in php script, but I need it in javascript.
Here is my php script
function get_youtube($url){
parse_str( parse_url( $url, PHP_URL_QUERY ), $my_array_of_vars );
return $my_array_of_vars['v'];
}
For example I have a youtube video link
http://www.youtube.com/watch?v=fWNaR-rxAic&list=RD029I9Ar6upx34
then I get content of V variable = fWNaR-rxAic
No comments:
Post a Comment