player: use CSS :has() for volume slider hover (pure CSS solution)

This commit is contained in:
2026-04-18 06:35:26 +02:00
parent 61ab440145
commit aa14114963
3 changed files with 8 additions and 5 deletions

View File

@@ -502,13 +502,12 @@ const initPlayer = (): void => {
})
muteBtn?.addEventListener('mouseenter', () => {
volumeWrap?.classList.add('show-volume')
muteBtn.classList.add('show-volume')
isHoveringVolume = true
showControls()
})
muteBtn?.addEventListener('mouseleave', () => {
volumeWrap?.classList.remove('show-volume')
isHoveringVolume = false
showControls()
})