Adds VU meter to the audio player bar

Adds a segmented spectrum VU meter to the condensed player bar, fed by an analyser tapped after ReplayGain and before the volume, so the meter does not depend on the output volume.

Adds per-user VU meter settings (orientation, segment count and gap, thresholds, peak marker, hold and falloff rates) across the domain, persistence, API contracts, validation and the settings page, with a migration and localized resources.

Sizes the meter cells in whole pixels and keeps the frame clock steady on browsers that round timers.

Updates the theming guide, API documentation, request samples and the user manual.
This commit is contained in:
BinaryAlley committed 2026-10-21 20:30:51 +03:00
1 parent 9889c86c76
commit 2e9f7d8496
66 files changed
+7844 -81

No files matched your search

@@ -34,6 +34,15 @@ public class UserSettingsFixture
/// <param name="isGaplessPlaybackEnabled">Whether the player transitions between consecutive tracks without a gap.</param>
/// <param name="replayGainMode">The way ReplayGain normalization is applied to the tracks the user plays.</param>
/// <param name="streamingQuality">The quality cap applied to the audio the server normalizes for the user.</param>
/// <param name="vuMeterOrientation">The direction in which each channel of the VU meter of the audio player grows.</param>
/// <param name="vuMeterSegmentCount">The number of segments each channel of the VU meter is divided into.</param>
/// <param name="vuMeterSegmentGap">The gap, in pixels, between the segments and the channels of the VU meter.</param>
/// <param name="vuMeterMediumThreshold">The level above which a segment of the VU meter is drawn with its medium state.</param>
/// <param name="vuMeterHighThreshold">The level above which a segment of the VU meter is drawn with its high state.</param>
/// <param name="vuMeterShowPeak">Whether the VU meter holds the peak level of each channel after it falls.</param>
/// <param name="vuMeterPeakHoldDurationInMilliseconds">The time a peak of the VU meter is held before it starts falling.</param>
/// <param name="vuMeterReleasePerSecond">The number of level units the display of the VU meter falls per second when the input level drops.</param>
/// <param name="vuMeterPeakReleasePerSecond">The number of level units the peak of the VU meter falls per second after its hold time elapsed.</param>
/// <param name="volume">The last volume the player reported for the user.</param>
/// <param name="isMuted">The last mute state the player reported for the user.</param>
/// <returns>The created <see cref="UserSettings"/>.</returns>
@@ -52,6 +61,15 @@ public class UserSettingsFixture
bool isGaplessPlaybackEnabled = true,
ReplayGainMode replayGainMode = ReplayGainMode.Off,
PlaybackStreamingQuality streamingQuality = PlaybackStreamingQuality.Auto,
VuMeterOrientation vuMeterOrientation = VuMeterOrientation.Vertical,
int vuMeterSegmentCount = 12,
int vuMeterSegmentGap = 1,
double vuMeterMediumThreshold = 0.6,
double vuMeterHighThreshold = 0.8,
bool vuMeterShowPeak = true,
int vuMeterPeakHoldDurationInMilliseconds = 650,
double vuMeterReleasePerSecond = 3.0,
double vuMeterPeakReleasePerSecond = 0.65,
double volume = 1.0,
bool isMuted = false)
{
@@ -70,6 +88,15 @@ public class UserSettingsFixture
isGaplessPlaybackEnabled,
replayGainMode,
streamingQuality,
vuMeterOrientation,
vuMeterSegmentCount,
vuMeterSegmentGap,
vuMeterMediumThreshold,
vuMeterHighThreshold,
vuMeterShowPeak,
vuMeterPeakHoldDurationInMilliseconds,
vuMeterReleasePerSecond,
vuMeterPeakReleasePerSecond,
volume,
isMuted);
return settings.Value;