playerVars not working with loadVideoById method
lbineau opened this issue · 4 comments
lbineau commented
player.loadVideoById({
'videoId': 'theVideoId',
'playerVars': { 'autoplay': 0, 'controls': 0 }
})
playerVars doesn't seems to be added to iframe url (described here https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player)
Am I missing something?
lbineau commented
It seems that it is options for YouTubePlayer instance
let player = YouTubePlayer('domId', {
'videoId': 'theVideoId',
'playerVars': { 'autoplay': 0, 'controls': 0 }
})
But loadVideoById play the video automatically is it a normal behavior?
player.loadVideoById('anotherId')
joshSummerhays commented
my playerVars also stopped working
gajus commented
It is a very simple project and if you find and issue, it will be the easiest for you to replicate the issue and contribute a fix.
drewbaker commented
I'm pretty sure the loadVideoById
in the underlying API method doesn't allow for playerVars
.
https://developers.google.com/youtube/iframe_api_reference#loadVideoById