gajus / youtube-player

YouTube iframe API abstraction.
Other
369 stars 79 forks source link

ReactJS - Origin defaultPlayerVars #83

Open artsmorgan opened 4 years ago

artsmorgan commented 4 years ago

Hello,

I'm using this module in a react app, for youtube policy i need to specify the origin as it is, but some parse is not allowing me to show it correctly

src="https://www.youtube.com/embed/W5ACjyQuEf0?autoplay=0&playsinline=1&allowsInlineMediaPlayback=true&rel=0&showinfo=0&iv_load_policy=3&fs=0&modestbranding=1&controls=1&enablejsapi=1&origin=**https%3A%2F%2F**www.timeline.ly&widgetid=1"

i tried changing this param in different ways:

const options = { videoId: this.id, origin: 'someurl', playerVars: { ...defaultPlayerVars, controls: this.controls ? 1 : 0, origin: 'someurl' } };

the weird issue is that i'm able to change videoId (and it renders the id in the iframe, same for controls, but when is about "origin" i'm not allowed.

Any idea?