Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/webamp-docs/docs/12_changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ If you want access to the changes in this section before they are officially rel
- The Milkdrop window now has a stable id, `#milkdrop-window`, like `#main-window`, `#equalizer-window` and `#playlist-window`.
- Added a new Webamp instance method: [`webamp.onMediaError(cb)`](./06_API/03_instance-methods.md#onmediaerrorcb-error--code-number---void---void), which is called when a track fails to load or play.
- Added a new Webamp instance method: [`webamp.setTracks(tracks)`](./06_API/03_instance-methods.md#settrackstracks-track-void), which replaces the playlist without starting playback.
- The equalizer's +12 dB, 0 dB and -12 dB buttons can now be used with the keyboard and have accessible names.

### Bug Fixes

Expand Down
19 changes: 16 additions & 3 deletions packages/webamp/js/components/EqualizerWindow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import EqualizerShade from "./EqualizerShade";

import { Band as BandType } from "../../types";
import FocusTarget from "../FocusTarget";
import WinampButton from "../WinampButton";
import { useTypedSelector, useActionCreator } from "../../hooks";
import EqTitleButtons from "./EqTitleButtons";

Expand Down Expand Up @@ -88,9 +89,21 @@ const EqualizerWindow = () => {
<EqGraph />
<PresetsContextMenu />
<Band id="preamp" band="preamp" onChange={setPreampValue} />
<div id="plus12db" onClick={setEqToMax} />
<div id="zerodb" onClick={setEqToMid} />
<div id="minus12db" onClick={setEqToMin} />
<WinampButton
id="plus12db"
aria-label="Set all bands to +12 dB"
onClick={setEqToMax}
/>
<WinampButton
id="zerodb"
aria-label="Set all bands to 0 dB"
onClick={setEqToMid}
/>
<WinampButton
id="minus12db"
aria-label="Set all bands to -12 dB"
onClick={setEqToMin}
/>
<div onPointerDown={onPointerDownHz}>
{BANDS.map((hertz) => (
<Band
Expand Down
Loading