Skip to content

Commit

Permalink
display time info under mouse when ruler is activated in the player i…
Browse files Browse the repository at this point in the history
…nterface
  • Loading branch information
quimmrc committed Dec 16, 2024
1 parent 534d66e commit e1bafdf
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions freesound/static/bw-frontend/src/components/player/player-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,13 @@ const createProgressIndicator = (parentNode, audioElement, playerImgNode, player
}
const rulerIndicator = playerImgNode.parentNode.getElementsByClassName('bw-player__ruler-indicator')[0];
rulerIndicator.innerText = readout;
} else {
// Update playhead
const progressPercentage = evt.offsetX / progressIndicatorContainer.clientWidth
setProgressIndicator(progressPercentage * 100, parentNode)

// Update selected time indicator (only in big players)
updateProgressBarIndicator(parentNode, audioElement, progressPercentage)
}
// Update playhead
const progressPercentage = evt.offsetX / progressIndicatorContainer.clientWidth
setProgressIndicator(progressPercentage * 100, parentNode)

// Update selected time indicator (only in big players)
updateProgressBarIndicator(parentNode, audioElement, progressPercentage)
}),
50
)
Expand Down

0 comments on commit e1bafdf

Please sign in to comment.