Closed FrostBite70 closed 1 month ago
not sure what you're trying to do.. but.. getPlayerState()
doesn't take any arguments. just call it like player.getPlayerState()
.. and it'll return one of the numbers in the docs.
there are separate methods like .playVideo()
and .pauseVideo()
etc if you want to do that ..
but that's clearly up to you.
good luck
I am new in studying and learning javascript, can you add a bit of changes to the code for the onstatechange, I checked and tried to modify the code, trying to add it but I fail. The code I tried to make with getPlayerState() only triggers the chosen video id to play but not to get the values stated in: https://developers.google.com/youtube/iframe_api_reference#getPlayerState