I am trying to write a script which click on the play / pause button every 3 secs. The video is in the google drive and I'd like to make a Tampermonkey script.
// ==UserScript==
// @name Drive video
// @description 
// @author 
// @version 1.0
// @match *drive.google.com*
// @match https://drive.google.com*
// ==/UserScript==
var playButton = document.getElementsByClassName("ytp-play-button.ytp-button");
// To videos variables
    function playOrPause() {
        playButton.click();
    }
setInterval(playOrPause(), 3000);
 
    