react-youtube
react-youtube copied to clipboard
origin property in playerVars not working
Hi, Thank you for the great library.
I am trying to pass origin
in the playerVars
but it is not showing up in the iframe.
const opts = {
height: '281',
width: '500',
playerVars: {
autoplay: 0,
rel: 0,
origin: 'https://example.com'
}
};
The origin in the src
is still localhost
https://www.youtube.com/embed/8cyMWK4ZjT8?autoplay=0&rel=0&origin=http%3A%2F%2Flocalhost%3A8075&enablejsapi=1&widgetid=1
We are not touching the contents of the playerVars so I'm not sure whats going on there... Maybe someone can jump in and look at whats going on?
@khawerrind yes, sometimes works and sometimes not. But I can't understand the reason, I'll try see that later today.
@khawerrind You already tried to config the origin with value: window.location.href
?
Its working for me