howardchung / watchparty

Watch anything together in-sync with your friends
https://www.watchparty.me
MIT License
741 stars 136 forks source link

Youtube not working #828

Closed lay3r closed 1 year ago

howardchung commented 1 year ago

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

lay3r commented 1 year ago

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

lay3r commented 1 year ago

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+)?$/

howardchung commented 1 year ago

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