vue-lite-youtube-embed
vue-lite-youtube-embed copied to clipboard
Added "referrerPolicy" prop to allow user to set the "referrerpolicy" attribute on the generated iframe
Since 9th July 2025, the API now requires referer information to be sent when embedding a video (https://developers.google.com/youtube/iframe_api_reference#july-9,-2025), otherwise the end user will get "Error 153" when attempting to play the video.
On some websites where a more restrictive Referrer-Policy header is in use, not changing this header will cause playback issues when embedding videos using this component.
It feels like the best solution is to add the referrerpolicy attr to the generated iframe with a sensible default value, and then let users customise this if they so wish.
This PR adds the referrerPolicy prop with strict-origin-when-cross-origin as the default (which I have tested works when applied to the iframe, when same-origin is used by the server), as well as adds the new prop to the docs.
#22