I have a problem with a range input. I use it as a time tracker for an audio tag, and it doesn't reacts as I want.
The value is correctly updated with the onTimeUpdate listener, but the slider thumb doesn't moves.
function onTimeUpdate() {
var seeker = document.querySelector('#duration');
var currentTime = Math.floor(player.currentTime);
seeker.setAttribute("value", currentTime);
}
Is it a normal behaviour ? I can't find anything about it. Thank you in advance.
EDIT : "setAttribute" just sets the value of the range input. element.value sets the value AND the position of the cursor to a new value. Thanks to Passerby for the answer !