It's urgent. How to control the video playback of vedio tags to stop after 1 minute?

how do I control the video playback of the vedio tag to stop after 1 minute? The playback absolutely stops after 1 minute, and the user can no longer play.
seek advice from the great gods;

add, I can only think of setInterval, but since the video is not played as soon as the page is opened, I don"t know how to implement it

Mar.19,2021

listen to the playback event: http://www.w3school.com.cn/ht.

get the playback duration: http://www.w3school.com.cn/ta.
is judged in the monitoring event. You can try


listen to start playback event onplaying , setTimeout 1 minute and then call onpause to pause playback. After
, there are many ways to operate, such as judging by variables, directly hiding the play button, and so on.


rough version

let video = document.querySelector('video')
let timer = setInterval(() =>{
    console.log(video.currentTime);
    var t = Math.floor(video.currentTime);
    if (t === 60) {
        clearInterval(timer);
        video.pause();
        video.removeAttribute('controls')
    }
}, 1000)

and video~ is not vedio

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b322fc-2bde6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b322fc-2bde6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?