Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Voume should change on scrolling the mouse wheel up an down #356

Open
zeecoding opened this issue Dec 10, 2024 · 1 comment
Open

Voume should change on scrolling the mouse wheel up an down #356

zeecoding opened this issue Dec 10, 2024 · 1 comment
Labels
enhancement New feature or request !stale Prevent bot from marking as stale

Comments

@zeecoding
Copy link

i have added the code that listen on mouse wheel to change the volume
volume.addEventListener('wheel', (e) => {
e.preventDefault();

  // Determine the scroll direction and adjust the volume
  if (e.deltaY < 0) {
    // Scroll up, increase volume
    volume.value = Math.min(100, parseInt(volume.value) + 1);
  } else {
    // Scroll down, decrease volume
    volume.value = Math.max(0, parseInt(volume.value) - 1);
  }

  // Update the volume display and save the new value
  volume_value.innerHTML = volume.value;
  store.set(MV_VOL_LSID, volume.value);
});
@zeecoding zeecoding changed the title Voume should change on scrooling the mouse wheel u an d down Voume should change on scrolling the mouse wheel up an down Dec 10, 2024
@NotLazy NotLazy added enhancement New feature or request !stale Prevent bot from marking as stale labels Dec 17, 2024
@NotLazy
Copy link
Collaborator

NotLazy commented Dec 17, 2024

This is a great idea and I will look at adding this soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request !stale Prevent bot from marking as stale
Projects
None yet
Development

No branches or pull requests

2 participants