getCurrentTime() for YouTube Video
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 YouTube Video Time , e.g.: ytplayer = document.getElementById("movie_player"); ytplayer.getCurrentTime(); However I do get following error: "Uncaught TypeError: Cannot read property 'getCurrentTime' of null"; What I am doing wrong? I tried different values for the ElementId - movie_player, player.... Any help is appreciated. Thanks in advance. Cheers. edit: Here is my manifest: { "manifest_version": 2, "name": "",