mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-08 13:00:13 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user