Is there a way to get the frame number of a YouTube video using javascript when we play/pause it?
I have been referring https://developers.google.com/youtube/iframe_api_reference and the APIs provided in it, but seems like there is no way to obtain the frame number of the video, even though we can get the current time in seconds usingplayer.getCurrentTime():Number
I have tried using https://www.npmjs.com/package/youtube-video-to-frames library, but this downloads the video and converts it into frames.
I know we can play the video frame by frame using the keyboard shortcuts ',' and '.' and we can get the frame number by using the 'stats for nerds option', but I am trying to get it programmatically directly from YouTube video player without downloading the video.
I am writing an application which needs to display the current frame of YouTube video in a section of a web app. My goal is to get the frame number, display it to the user when playing the video on embedded in the page and take the user to a particular frame in the video on user input.