Stretch the wavesurfer waveform to the full height (#1962)

* Stretch the wavesurfer waveform to the full height

* Add waveform stretch setting
This commit is contained in:
Mitch Ray
2026-04-28 13:28:03 +10:00
committed by GitHub
parent 053b78a3fd
commit fcc69980e4
4 changed files with 31 additions and 1 deletions
@@ -58,7 +58,7 @@ export const PlayerbarWaveform = () => {
height: 18,
interact: false,
media: audioElementRef.current,
normalize: false,
normalize: playerbarSlider?.stretched ?? false,
progressColor: primaryColor,
waveColor,
});
@@ -477,6 +477,32 @@ export const ControlSettings = memo(() => {
postProcess: 'sentenceCase',
}),
},
{
control: (
<Switch
defaultChecked={playerbarSlider?.stretched ?? false}
onChange={(e) =>
setSettings({
general: {
...settings,
playerbarSlider: {
...playerbarSlider,
stretched: e.currentTarget.checked,
},
},
})
}
/>
),
description: t('setting.playerbarWaveformStretch', {
context: 'description',
postProcess: 'sentenceCase',
}),
isHidden: false,
title: t('setting.playerbarWaveformStretch', {
postProcess: 'sentenceCase',
}),
},
{
control: (
<NumberInput