Skip to content

feat(player): configurable play/pause fade duration#1020

Open
JenteJan wants to merge 1 commit into
DonutWare:developfrom
JenteJan:feat/configurable-pause-fade-duration
Open

feat(player): configurable play/pause fade duration#1020
JenteJan wants to merge 1 commit into
DonutWare:developfrom
JenteJan:feat/configurable-pause-fade-duration

Conversation

@JenteJan

@JenteJan JenteJan commented Jun 8, 2026

Copy link
Copy Markdown

Pull Request Description

Adds a "Play/pause fade duration" setting (0–1000 ms) under the existing Play/pause volume fade toggle in Settings → Player.

The play/pause volume fade is currently hardcoded to 175 ms. On pause this delays the actual mpv pause until the fade finishes, which makes toggling playback feel less responsive than native players. Since the fade is a deliberate feature (nice for music), this exposes its length rather than removing it:

  • Default stays 175 ms — no change out of the box.
  • 0 ms (or any value below one fade step) skips the fade entirely → play/pause hits mpv immediately for an instant response.
  • The existing toggle still fully disables the fade.

The fade-enabled code path is byte-for-byte unchanged; this only makes the duration configurable.

Issue Being Fixed

No existing issue — small, self-contained setting. Happy to open a discussion/issue first if you'd prefer per CONTRIBUTING.md.

Screenshots / Recordings

A new slider appears beneath the Play/pause volume fade toggle in Settings → Player (label: "Play/pause fade duration", shows <value> ms). Screenshot to be added.

Tested On

  • Android
  • Android TV
  • iOS
  • Linux
  • Windows
  • macOS
  • Web

Checklist

  • No new packages added.
  • Changes are scoped to this one setting.

Notes:

  • Generated freezed/json files were updated by hand to mirror the existing crossfadeDurationMs field — running build_runner here prunes unrelated stale generated files, so a targeted hand-edit keeps the diff clean. Analyzer-clean.
  • l10n: only the English source string was added (other locales via Weblate).

The play/pause volume fade was hardcoded to 175ms, which delays the
actual mpv pause until the fade completes and makes toggling playback
feel sluggish compared to native players like mpc/mpv.

Expose the fade length as a 'Play/pause fade duration' setting (0-1000ms)
shown beneath the existing fade toggle. A value of 0 (or any duration
shorter than one fade step) now skips the fade entirely and hits mpv
immediately for an instant, snappy response. Default stays at 175ms to
preserve current behaviour.
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