Merge pull request #1 from dazlygonsalves/main

style(volume-ui): adjust volume thumb position to align with volume fill using CSS var
This commit is contained in:
Eduard Prigoana 2025-10-22 14:38:39 +03:00 committed by GitHub
commit 3332c979ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 436 additions and 571 deletions

View file

@ -1034,7 +1034,10 @@ document.addEventListener('DOMContentLoaded', async () => {
const updateVolumeUI = () => {
const { volume, muted } = audioPlayer;
volumeBtn.innerHTML = (muted || volume === 0) ? SVG_MUTE : SVG_VOLUME;
volumeFill.style.width = `${muted ? 0 : volume * 100}%`;
const effectiveVolume = muted ? 0 : volume * 100;
volumeFill.style.setProperty('--volume-level', `${effectiveVolume}%`);
};
volumeBtn.addEventListener('click', () => {
@ -1157,4 +1160,4 @@ document.addEventListener('DOMContentLoaded', async () => {
e.preventDefault();
deferredPrompt = e;
});
});
});

1000
styles.css

File diff suppressed because it is too large Load diff