I have created a button that pauses and plays a youtube video on click. I am trying to check if the video is already paused if so play, if its playing then pause. isPaused is not a function. What is the function I am looking for?
document.getElementById("playButton").addEventListener('click', function (event) { if(!!player.isPaused()){ player.playVideo(); } else { player.pauseVideo(); }});