Extend the supported parameters.
iranreyes opened this issue · comments
Right now the only params that you are accepting are autoplay
, controls
and loop
. Should be good to support all the parameters. This is very easy to do, I don't have time to do a PR but instead of pass the params with the option object, just pass it inside another attribute like:
Current Version
youtubeVideo('XZmGGAbHqa0', {
elementId: 'youtube-video',
width: '100%',
height: '100%',
autoplay: false,
controls: false
}, function(error, playback){
this.youtube = playback;
}.bind(this));
},
New Version
youtubeVideo('XZmGGAbHqa0', {
elementId: 'youtube-video',
width: '100%',
height: '100%',
options: {
autoplay: false,
modestbranding: true,
autohide:true,
showinfo:false,
controls: false
},
}, function(error, playback){
this.youtube = playback;
}.bind(this));
},
and just extend the playerVars object of the API with the new options object...
Thanks, your module is very useful