I'm making an application on ElectronJS, the idea is to have a video paused, and that by dragging the mouse on it, this progress ... The same can be done by capturing the ondrag event, and increasing the currentTime of the video. The problem is that it does not advance until I release the drag, and what I need is for it to advance second by second as I drag the click. What would be the ideal way?
var video = document.getElementById('video');
video.addEventListener('drag', function(event){
video.currentTime += 1/12; // A razon de 2 FPS
})
The event is executed, but the box is not updated until the click is dragged. I also try doing a play + pause inside the drag, but it does not work either ...