Skip to content

Add global volume control slider#20

Open
Curucail wants to merge 1 commit intoaudiolabs:masterfrom
Curucail:global_volume_slider
Open

Add global volume control slider#20
Curucail wants to merge 1 commit intoaudiolabs:masterfrom
Curucail:global_volume_slider

Conversation

@Curucail
Copy link

@Curucail Curucail commented Feb 14, 2026

This pull request introduces a master volume control feature to the TrackSwitch player #17 .

New volume control feature:

  • Added a volume slider and icon to the main player UI, allowing users to adjust the master volume (js/trackswitch.js, css/trackswitch.css). [1] [2]
  • Implemented a new gain node (gainNodeVolume) in the Web Audio API signal chain to control output volume, connecting it between the master gain node and the audio context destination (js/trackswitch.js). [1] [2]

Event handling and UI updates:

  • Added event handlers to update the audio volume in real time as the slider moves, and to prevent volume slider interactions from interfering with other player controls (js/trackswitch.js).
  • Updated the volume icon dynamically to reflect the current volume level (muted, low, or high) for better user feedback (js/trackswitch.js).

Responsive and style adjustments:

  • Added and adjusted CSS for the volume control and icon, including responsive tweaks for different screen sizes (css/trackswitch.css). [1] [2]

Screenshot:
image

@Curucail Curucail changed the title Add volume control slider Add global volume control slider Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant