Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3831

player.getCurrentTime is not a function

$
0
0
        var interval = setInterval(function() {            if(document.readyState === 'complete') {                document.querySelector('video').volume = 1;                let player= document.getElementById("movie_player");                let time = player.getCurrentTime() || 0 ;                if( time >= 198){                    localStorage.setItem('ata','Küçük bir paskalya yumurtası, 11.02.2023');                     window.history.back();                    clearInterval(interval);                }            }            }, 100);

It throws constantly player.getCurrentTime is not a function in Youtube, even though i can access it through console, I check for completion of the page too why doesn't it work?


Viewing all articles
Browse latest Browse all 3831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>