Resolve YouTube Error 153 and add graceful degradation in JourneyModal#1687
Resolve YouTube Error 153 and add graceful degradation in JourneyModal#1687PARTH-TUSSLE wants to merge 3 commits into
Conversation
Signed-off-by: Parth Gartan <parthgartan26feb@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request adds a fallback link below the embedded YouTube video iframe in the JourneyModal component to allow users to watch the video directly on YouTube if they encounter issues, and updates the iframe with a strict referrer policy. The review feedback recommends extracting the hardcoded YouTube video ID into a constant to prevent duplication and exposing the fallback link text as a configurable prop to support internationalization and localization.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| <iframe | ||
| style={{ | ||
| aspectRatio: '16/9', | ||
| width: '100%' | ||
| }} | ||
| src="https://www.youtube.com/embed/Do7htKrRzDA?si=5iMQ5a1JUf3qpIiH" | ||
| title="YouTube video player" | ||
| allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" | ||
| allowFullScreen={true} | ||
| referrerPolicy="strict-origin-when-cross-origin" | ||
| ></iframe> | ||
| <FallbackLink> | ||
| <a | ||
| href="https://www.youtube.com/watch?v=Do7htKrRzDA" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| > | ||
| ▶ Having trouble viewing? Watch on YouTube | ||
| </a> | ||
| </FallbackLink> |
There was a problem hiding this comment.
Use the newly defined 'YOUTUBE_VIDEO_ID' constant and the 'fallbackText' prop here to avoid duplicating the hardcoded video ID and to support localization.
| <iframe | |
| style={{ | |
| aspectRatio: '16/9', | |
| width: '100%' | |
| }} | |
| src="https://www.youtube.com/embed/Do7htKrRzDA?si=5iMQ5a1JUf3qpIiH" | |
| title="YouTube video player" | |
| allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" | |
| allowFullScreen={true} | |
| referrerPolicy="strict-origin-when-cross-origin" | |
| ></iframe> | |
| <FallbackLink> | |
| <a | |
| href="https://www.youtube.com/watch?v=Do7htKrRzDA" | |
| target="_blank" | |
| rel="noopener noreferrer" | |
| > | |
| ▶ Having trouble viewing? Watch on YouTube | |
| </a> | |
| </FallbackLink> | |
| <iframe | |
| style={{ | |
| aspectRatio: '16/9', | |
| width: '100%' | |
| }} | |
| src={"https://www.youtube.com/embed/" + YOUTUBE_VIDEO_ID + "?si=5iMQ5a1JUf3qpIiH"} | |
| title="YouTube video player" | |
| allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" | |
| allowFullScreen={true} | |
| referrerPolicy="strict-origin-when-cross-origin" | |
| ></iframe> | |
| <FallbackLink> | |
| <a | |
| href={"https://www.youtube.com/watch?v=" + YOUTUBE_VIDEO_ID} | |
| target="_blank" | |
| rel="noopener noreferrer" | |
| > | |
| {fallbackText} | |
| </a> | |
| </FallbackLink> |
There was a problem hiding this comment.
Incorporated! I've updated the JSX block to dynamically get the new YOUTUBE_VIDEO_ID constant into both the iframe src and the fallback link's href. I also replaced the hardcoded string inside the anchor tag with the new {fallbackText} prop as suggested.
There was a problem hiding this comment.
I've previously given feedback that this isn't desired.
Nor is the hardcoding of a specific video id into a "reusable" component in our design system.
Signed-off-by: Parth Gartan <parthgartan26feb@gmail.com>
leecalcote
left a comment
There was a problem hiding this comment.
Where is the link to your other PR and the feedback already received?
@leecalcote I've updated the PR description with the open PR in meshery regarding this issue. And I actually closed the other PR ( the one which I was working on earlier ) because it had many commits now cause I was working on it for 2 weeks, and to start fresh from synced masters, I created new branches and PRs . Should I link the closed PR as well, in case someone wants to see the earlier reviews? |
|
This widget shouldn't be included in Sistent in the first place. |
@leecalcote Agreed, sistent should only have reusable componenets. I was only making these changes here to fix the YouTube Error 153 on strict browsers bug , where the code currently lives. Along with this Getting started widget, there are several other specific widgets in Sistent right now (e.g., RecentDesignWidget, WorkspaceActivityWidget, TeamSearchField etc.). Should we now migrate the GettingStartedWidget (and potentially the other Dashboard widgets) directly into the meshery repository? Let me know how to proceed. |
Signed-off-by: Parth Gartan <parthgartan26feb@gmail.com>
📝 WalkthroughWalkthrough
ChangesJourney video embedding
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Notes for Reviewers
Description
This PR resolves "Error 153: Video player configuration error" that occurs in the Getting Started widget's YouTube iframe when running on
localhost(insecure HTTP) due to the browser's default cross-origin referrer policy.Changes Made
referrerPolicy="strict-origin-when-cross-origin"to the existing YouTube iframe inJourneyModal.tsx.Related issue -> meshery/meshery#20118
Related PR -> meshery/meshery#20520
Signed commits
Summary by CodeRabbit