playerVars
timohofmeijer opened this issue · 2 comments
timohofmeijer commented
Hi, do you plan on making the playerVars
settable? So it is possible to hide YT controls for example.
Edit:
I just successfully passed a playerVars
object to the component declaration like so:
// in parent component
playerVars: {
autoplay: 0,
controls: 0,
enablejsapi: 1,
rel: 0, // disable related videos
showinfo: 0,
autohide: 1,
fs: 0, // disable fullscreen button
playsinline: 1,
// disablekb: 1,
// iv_load_policy: 3,
modestbranding: 1
}
// in template
{{ember-youtube ytid="oIzNGxOFIKI" playerVars=playerVars}}
Which works just fine, but something like this would of course be nicer:
{{ember-youtube ytId="oIzNGxOFIKI" ytControls=false}}
😍
oskarrough commented
If we expose all the playerVars as single properties we'd have to maintain them, map and merge them.
You're welcome to try but I like your solution just fine, to be honest :) It's clear, keeps the youtube and ember-youtube vars seperated and doesn't add any overhead.
oskarrough commented
Options that would be mapped to playerVars have been removed (fs
and autoplay
) and are now set through a playerVars
object on the component.