style: auto-fix linting issues
This commit is contained in:
parent
993698b666
commit
9fc20c973b
1 changed files with 8 additions and 7 deletions
11
js/events.js
11
js/events.js
|
|
@ -317,10 +317,10 @@ function initializeSmoothSliders(audioPlayer, player) {
|
|||
|
||||
const updateSeekUI = (position) => {
|
||||
if (!isNaN(audioPlayer.duration)) {
|
||||
progressFill.style.width = `${position * 100}%`;
|
||||
if (currentTimeEl) {
|
||||
currentTimeEl.textContent = formatTime(position * audioPlayer.duration);
|
||||
}
|
||||
progressFill.style.width = `${position * 100}%`;
|
||||
if (currentTimeEl) {
|
||||
currentTimeEl.textContent = formatTime(position * audioPlayer.duration);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -428,7 +428,8 @@ function initializeSmoothSliders(audioPlayer, player) {
|
|||
});
|
||||
|
||||
progressBar.addEventListener('click', (e) => {
|
||||
if (!isSeeking) { // Only handle click if not result of a drag release
|
||||
if (!isSeeking) {
|
||||
// Only handle click if not result of a drag release
|
||||
seek(progressBar, e, (position) => {
|
||||
if (!isNaN(audioPlayer.duration) && audioPlayer.duration > 0 && audioPlayer.duration !== Infinity) {
|
||||
audioPlayer.currentTime = position * audioPlayer.duration;
|
||||
|
|
|
|||
Loading…
Reference in a new issue