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

[Bug]: YouTube Extension accepting music.youtube.com/playlist links, but failing on them #6087

Open
1 task done
bjhess opened this issue Feb 6, 2025 · 2 comments
Open
1 task done
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug

Comments

@bjhess
Copy link

bjhess commented Feb 6, 2025

Affected Packages

@tiptap/extension-youtube

Version(s)

2.11.2

Bug Description

We are on version 2.11.2, but I see the same basic issue on the extension's page in the Tiptap docs. Here's what happens when pasting the YouTube Music playlist URL https://music.youtube.com/playlist?list=PLrggHaKS2xueclxIYbhkSiPai3da7cdWB&si=Xgxani5KWk3ieFnc into the editor on the docs site:

CleanShot.2025-02-05.at.23.11.17.mp4

YouTube Music links to albums (e.g. https://music.youtube.com/playlist?list=OLAK5uy_mrF_EHJJul_9cUfE-snfFgdEY_nggl9c0&feature=shared) also fail in a similar way. Albums appear to be implemented as playlists by YouTube music.

Browser Used

Chrome

Code Example URL

No response

Expected Behavior

I would be fine if such links did not get caught by the YouTube extension and thus did not resolve at all.

Unless there is a way to provide a "video player" like what happens when YouTube Music links directly to songs (e.g. https://music.youtube.com/watch?v=FPrHuDvXEBw) are embedded.

This could potentially be found by going from the YouTube Music link:

https://music.youtube.com/playlist?list=OLAK5uy_mrF_EHJJul_9cUfE-snfFgdEY_nggl9c0

To the embed code similar to what is found at the YouTube link (e.g. replace the music subdomain with www):

https://www.youtube.com/playlist?list=OLAK5uy_mrF_EHJJul_9cUfE-snfFgdEY_nggl9c0

In this example, the embed code is:

<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?si=GoeLuM76GMGRt4LG&amp;list=OLAK5uy_mrF_EHJJul_9cUfE-snfFgdEY_nggl9c0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

Additional Context (Optional)

No response

Dependency Updates

  • Yes, I've updated all my dependencies.
@bjhess bjhess added Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug labels Feb 6, 2025
@bdbch
Copy link
Member

bdbch commented Feb 10, 2025

I'm not sure if playlists can be embedded, seems to be a generic issue with the regex. Thanks for the report.

@aniasusual
Copy link

Hi, I would like to work on this issue. Also if I can contribute can I know what is the final expected behaviour?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug
Projects
None yet
Development

No branches or pull requests

3 participants