Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept youtube.com/playlist?list= URLs #541

Merged
merged 1 commit into from
Jan 2, 2019
Merged

Accept youtube.com/playlist?list= URLs #541

merged 1 commit into from
Jan 2, 2019

Conversation

volodymyr-kushnir
Copy link
Contributor

This will allow react-player to play URLs like https://www.youtube.com/playlist?list=PLDEcUiPhzbjI217qs5KgMvbvx6-fgY_Al. I'm not sure on the policy here ― should it play only those links that are "supposed" to be played (those that are "shareable" and have v= parameter) vs should it play anything that was dropped on it if it can (even if the user copied "wrong" playlist URL)?

@cookpete
Copy link
Owner

cookpete commented Jan 2, 2019

I'm not sure on the policy here ― should it play only those links that are "supposed" to be played (those that are "shareable" and have v= parameter) vs should it play anything that was dropped on it if it can (even if the user copied "wrong" playlist URL)?

The only reason for the current regex pattern is to extract the video ID here when firing up a player. However, now we have playlist parsing, the id can be undefined and it will still work.

I'm not overly happy with how complex this has become, but your change is harmless enough and enables proper playlist support. I'll have a look at tidying things up later on.

@cookpete cookpete merged commit 4ea2253 into cookpete:master Jan 2, 2019
cookpete added a commit that referenced this pull request Jan 24, 2019
albanqoku added a commit to albanqoku/react-player that referenced this pull request Feb 24, 2021
Webmaster1116 added a commit to Webmaster1116/video-player that referenced this pull request May 20, 2021
webmiraclepro added a commit to webmiraclepro/video-player that referenced this pull request Sep 9, 2022
philip-luther added a commit to philip-luther/react-player that referenced this pull request Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants