Skip to content

feat: add Volume Boost player button (addresses #4146)#4178

Open
flujopy2025-beep wants to merge 1 commit into
code-charity:masterfrom
flujopy2025-beep:feature/volume-boost
Open

feat: add Volume Boost player button (addresses #4146)#4178
flujopy2025-beep wants to merge 1 commit into
code-charity:masterfrom
flujopy2025-beep:feature/volume-boost

Conversation

@flujopy2025-beep

Copy link
Copy Markdown

Summary

Adds a Volume Boost button to the player controls that amplifies audio beyond 100% using the Web Audio API (GainNode).

Changes

  • New player button: click cycles through 1x -> 2x -> 3x -> 1x amplification
  • Button opacity indicates active state (dim = 1x, bright = boosted)
  • Gain resets to 1x when feature is disabled in settings
  • Toggle available under Player section in extension menu
  • Uses standard Web Audio API: AudioContext + GainNode (no dependencies)

How it works

  1. User enables 'Volume Boost' in Player settings
  2. A speaker icon button appears in the player controls
  3. Clicking it cycles the audio gain: 1x (normal) -> 2x -> 3x -> back to 1x
  4. Useful for quiet videos, podcasts, or when device volume is maxed out

Testing

  • Tested on YouTube watch pages with various volume levels
  • AudioContext is created lazily on first click (avoids autoplay policy issues)
  • Works alongside existing volume slider (boost multiplies the slider value)

References

Addresses the 'Volume Boost' item from issue #4146 (Player buttons to be added).
Also related to #1382 and the Volume Boost section in the issue's specification.

Adds a Volume Boost button to the player controls that amplifies audio
beyond 100% using the Web Audio API GainNode.

- Click cycles through 1x → 2x → 3x → 1x
- Button opacity indicates active state
- Resets gain to 1x when disabled in settings
- Toggle available under Player section in extension menu

Addresses the 'Volume Boost' item from issue code-charity#4146 (Player buttons to be added).
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.

2 participants