YouTube embed missing referrerpolicy
Author: SlgoetzCreated Sep 30, 2025Updated Apr 1, 2026
it seems that without referrerpolicy: 'strict-origin-when-cross-origin', there is a Error 153.
"react-player": "^3.3.3"
<ReactPlayer
style={videoPlayerStyle}
src={videoUrl}
width="100%"
height="100%"
controls={true}
playing={false} // Don't autoplay
config={{
youtube: {
origin: window.location.origin,
enablejsapi: 0,
},
}}
/><iframe src="https://www.youtube.com/embed/fOAIrUZbOwo?preload=metadata&enablejsapi=0&showinfo=0&rel=0&iv_load_policy=3&modestbranding=1&origin=http%3A%2F%2Flocalhost%3A3333" frameborder="0" width="100%" height="100%" allow="accelerometer; fullscreen; autoplay; encrypted-media; gyroscope; picture-in-picture" data-config="{"origin":"http://localhost:3333","enablejsapi":0}" id="widget2"></iframe>Source: cookpete/react-player