JSFiddle - React, Tailwind, and code Playground
HTML
<video id="myvid" style="width:600px;max-width:100%;" autoplay="true">
<source src="https://clips.vorwaerts-gmbh.de/VfE_html5.mp4" type="video/mp4">
Your browser does not support HTML5 video.
</video>
<button id="btn">
Go to the 24-second mark
</button>
JavaScript
document.getElementById('btn').onclick = function ffTo24 ( )
{
var vid = document.getElementById('myvid'),
ticks = 50, // number of frames during fast-forward
frms = 10, // number of milliseconds between frames in fast-forward/rewind
endtime = 24.0; // time to fast-forward/remind to (in seconds)
// fast-forward/rewind video to end time
var tdelta = (endtime - vid.currentTime)/ticks;
var startTime = vid.currentTime;
for ( var i = 0; i < ticks; ++i )
{
(function(j){
setTimeout(function() {
vid.currentTime = startTime+tdelta * j;
}, j * frms);
})(i);
}
}