javascript - Pass the youtube video ID to another JS file -


i had check whether url valid youtube video url , youtube video id it, far using simple javascript split function in order achieve this, want pass id javascript file, there youtube palyer , want play video on page.

i have been viewing other stackoverflow threads

i need passes videoid's file executed:

http(s)://www.youtu.be/videoid

http(s)://www.youtube.com/watch?v=videoid (and optionally other short url's script automatically detects whether contains youtube video)

any ideas can handled browser quick/efficient appreciated!


Comments

Popular posts from this blog

iis - ASP.Net Core CreatedAtAction in HttpPost action returns 201 but entire request ends with 500 -

gcc - Neither ld wrap nor LD_PRELOAD working to intercept system call -

ssh - Vagrant Windows - ssh_exchange_identification: read: Connection reset by peer -