I\'m writing a Chrome Extension in Javascript and I want to get the current time for the playing video on youtube.com. I tried using the answer from question Getting Current You
Use the following code works for chrome extension:
video = document.getElementsByClassName('video-stream')[0]; console.log(video); console.log(video.currentTime);