Skip to content

fix: use playable YouTube embeds in video lightbox#1049

Open
stablegenius49 wants to merge 1 commit intoItzCrazyKns:masterfrom
stablegenius49:pr-factory/issue-799-youtube-embed-host
Open

fix: use playable YouTube embeds in video lightbox#1049
stablegenius49 wants to merge 1 commit intoItzCrazyKns:masterfrom
stablegenius49:pr-factory/issue-799-youtube-embed-host

Conversation

@stablegenius49
Copy link

@stablegenius49 stablegenius49 commented Mar 11, 2026

Summary

  • normalize youtube-nocookie.com video embeds to www.youtube.com before rendering the lightbox iframe
  • keep enablejsapi=1 attached via URLSearchParams, with a fallback for malformed URLs

Testing

  • ./node_modules/.bin/eslint src/components/SearchVideos.tsx
  • ./node_modules/.bin/tsc --noEmit

Closes #799.


Summary by cubic

Ensure lightbox YouTube embeds are playable by normalizing youtube-nocookie.com URLs to www.youtube.com and always adding enablejsapi=1. Fixes #799 where some videos failed to load in the lightbox.

  • Bug Fixes
    • Normalize youtube-nocookie.com to www.youtube.com before rendering the iframe.
    • Always set enablejsapi=1 via URLSearchParams, with a fallback for malformed URLs.

Written for commit 8e19f2f. Summary will update on new commits.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

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.

Embedded videos fail to load because iframe uses youtube-nocookie.com

1 participant