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

YouTube Live links fail to embed #5607

Open
danielrcollins1 opened this issue Oct 4, 2024 · 3 comments
Open

YouTube Live links fail to embed #5607

danielrcollins1 opened this issue Oct 4, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@danielrcollins1
Copy link

Steps to Reproduce

  1. Go to YouTube Studio > Content > Live
  2. For any live event, click Options > Get shareable link
  3. In the BlueSky app, click New Post > paste link
  4. Note that info card fails to load (gets grayed-out generic YouTube card)

Attachments

No response

What platform(s) does this occur on?

Web (Desktop)

Device Info

Windows 11 Home w/Chrome or Firefox

What version of the app are you using?

Build version: 1.91.1; Bundle info: 49ab486 (prod); Bundle date: 24092017; Platform: web

Additional Information

For YouTube uploaded (prerecorded) videos, getting a shared link generates one of the following form, which works fine as an embedded Bluesky video, e.g.: https://youtu.be/N4AyF0An-w8

But YouTube Live videos generate a different link format which fails when embedding in Bluesky, e.g.: https://youtube.com/live/SKtXJUhrbhc

If we take the automatically generated live URL from YouTube and manually edit it to look like the uploaded URL format, then this actually works embedded in Bluesky (again, for both upcoming & old live events, with out without query string), e.g.: https://youtu.be/SKtXJUhrbhc

However, this is inconvenient and not obvious to non-technical users. Bluesky should accept the URL format directly provided by YouTube Studio Live.

@danielrcollins1 danielrcollins1 added the bug Something isn't working label Oct 4, 2024
@haileyok haileyok self-assigned this Oct 7, 2024
@danielrcollins1
Copy link
Author

Related: YouTube "clips" link format doesn't embed, either (and in this case I can't find a manual workaround), e.g.:
https://www.youtube.com/clip/Ugkxv4jmsaDAOLeKXfJYLBFklwkXGBSG12s6

@tkusano
Copy link
Contributor

tkusano commented Oct 25, 2024

I think this is probably because https://cardyb.bsky.app/v1/extract doesn't handle YouTube Live URLs well.

For example, here are two types of URLs for a live video:

Live URL

https://www.youtube.com/live/9TY-M0RoQy8?si=SkbsYDCyF9nHKjDB

(from the share buttonn)

$ curl -s 'https://cardyb.bsky.app/v1/extract?url=https://www.youtube.com/live/9TY-M0RoQy8%3Fsi=SkbsYDCyF9nHKjDB' | jq .
{
  "error": "",
  "likely_type": "html",
  "url": "https://www.youtube.com/live/9TY-M0RoQy8",
  "title": "YouTube",
  "description": "Share your videos with friends, family, and the world",
  "image": ""
}

Traditional URL

https://www.youtube.com/watch?v=9TY-M0RoQy8

(from the browser address bar)

$ curl -s 'https://cardyb.bsky.app/v1/extract?url=https://www.youtube.com/watch%3Fv=9TY-M0RoQy8' | jq .
{
  "error": "",
  "likely_type": "video",
  "url": "https://www.youtube.com/watch?v=9TY-M0RoQy8",
  "title": "第10回TOKYO6公式生放送",
  "description": "YouTube video by TOKYO6 ENTERTAINMENT",
  "image": "https://cardyb.bsky.app/v1/image?url=https%3A%2F%2Fi.ytimg.com%2Fvi%2F9TY-M0RoQy8%2Fhqdefault.jpg"
}

@scottdotweb
Copy link

Just a quick note that the &si= part of that example live URL is a tracking parameter which can be ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants