[xExtension-YouTube] Add referrer policy to iframe in extension.php#382
Conversation
Fixes Error 153 / Video player configuration error
|
Ping @Inverle |
|
With CSS you can do things like set an aspect ratio (but I'm not quite sure what the point of the code is as written). |
|
Indeed that seems to be the cause (referrerpolicy) But a video can still manage to load without a referrer after a few iframe reloads, which is strange. |
Yes the |
|
Thanks guys! |
|
I'm still running into this even after updating my extension to the latest code. I've checked the rendered html and it has the Is there anything else that could be causing this to happen? or I can provide to help with debugging? |
|
I believe this only affects newly fetched entries, you can try deleting and updating from the feed settings to confirm. Example working iframe render from my feed:
Switching between youtube.com and youtube-nocookie.com in dev tools confirms both domains should work |
Look at the Network tab in DevTools (F12) and see in the youtube iframe request if your browser is sending a
No, the |
## Summary - add an opt-in responsive sizing setting for the YouTube and PeerTube players - preserve the existing `youtube-plugin-video` class and fixed-size behavior by default - move player sizing out of the inline `style` attribute so it works with FreshRSS CSP - keep the `referrerpolicy` introduced in #382 This takes over the work from #291 and applies its review feedback to the current implementation. ## Behavior When automatic sizing is enabled, the player uses the existing `youtube-plugin-video` class together with `yt-player-autosize`, which applies a full-width 16:9 aspect ratio. When it is disabled or unset, the configured `width` and `height` attributes are preserved. ## Validation - `npm run eslint` - `npx stylelint "**/*.css"` - `npm run markdownlint` - reviewed the generated iframe branches for YouTube, youtube-nocookie, PeerTube, and original-content handling PHPStan and PHPCS were not run locally because PHP and `make` are unavailable on PATH and Docker Desktop could not start. They are expected to run in GitHub Actions.

Hi,
I've been seeing Error 153 / Video player configuration error just like reported here:
https://forum.obsidian.md/t/youtube-video-embed-does-not-work-video-player-configuration-error/103181
Added referrer policy as taken from youtube embed iframe via share button on youtube.com, seems to be working nicely.
Additionally, it seems to work just fine with width/height set directly on the iframe element, no need to duplicate with inline style - this is not in the PR, but observed and tested.