vue-lite-youtube-embed
vue-lite-youtube-embed copied to clipboard
Incorrect "Referrer-Policy" header results in playback error 153
If the Referrer-Policy header in use on the page does not allow for referer information to be sent to another origin (eg: same-origin) then once the player loads it may result in "Error 153" being displayed.
This change appeared in the player API changelog dated 9th July 2025 (https://developers.google.com/youtube/iframe_api_reference#july-9,-2025).
Here are the docs involving the requirements for sending referer information: https://developers.google.com/youtube/terms/required-minimum-functionality#embedded-player-api-client-identity
Local testing has confirmed that either changing the Referrer-Policy header sent by the server to one that will send referer info to other origins, or adding referrerpolicy="strict-origin-when-cross-origin" to the generated IFrame will resolve the issue.
I feel that requiring all users using this component to change their sites Referrer-Policy though to make their embeds work is not ideal though, so I propose that a new prop is added to the component that will allow for setting the referrerpolicy attribute on the generated IFrame to a sensible default value of strict-origin-when-cross-origin (or something else if required).
I'll put together a PR for this shortly, and hopefully others think this is a sensible move 😁