howardchung / watchparty

Watch anything together in-sync with your friends

Home Page:https://www.watchparty.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Youtube not working

lay3r opened this issue · comments

Do you have a sample Youtube link that's not working? I just tested one and it seemed fine

Do you have a sample Youtube link that's not working? I just tested one and it seemed fine

https://youtu.be/TJ2ifmkGGus?feature=shared

I think you have to use regex to parse youtube video id
for example:
/^(?:https?:\/\/)?(?:www\.|m\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=|attribution_link\?a=.+?watch.+?v(?:%|=)))((\w|-){11})(?:\S+)?$/

It works if the ?feature=shared bit is removed--looks like the current code doesn't like URL parameters