video html5: Is it possible to display thumbnail from video on a specific time?

前端 未结 5 1434
我寻月下人不归
我寻月下人不归 2020-12-06 02:32

I use this to have a video player on browser

5条回答
  •  悲哀的现实
    2020-12-06 02:51

    I did it this way:

    It jumps to 0 if the currentTime is 15, but will go over the 15s mark when played

    html:

    
    

    javascript:

    function goToStart(){
        if (document.getElementById('video1').currentTime == 15){
        document.getElementById('video1').currentTime = 0;
        }
    }
    

提交回复
热议问题