Skip to content

Conversation

@jero237
Copy link

@jero237 jero237 commented Dec 21, 2025

The "Error 153" (Video Player Configuration Error) from YouTube typically occurs in Electron or embedded environments due to restrictions on the Referrer Policy. When the restricted video is embedded in an application (running on file:// or electron:// protocols), the browser may send a non-standard referrer that YouTube blocks.

I have fixed this by replacing the react-youtube component with a standard iframe which gives us granular control to set the referrerPolicy attribute.

Changes made in
src/renderer/src/components/GameDetailsDialog.tsx:

Removed the react-youtube component and its import.
Added a native <iframe>element with:
referrerPolicy="strict-origin-when-cross-origin" (The critical fix).
frameBorder="0" and standard allow attributes (autoplay, encrypted-media, etc.).
The correct source URL: https://www.youtube.com/embed/${videoId}?autoplay=0.
This ensures the embedded player sends the correct headers to YouTube, resolving the playback restriction.

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.

1 participant