mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-24 14:55:37 +00:00
feat: add audio volume
This commit is contained in:
@@ -1304,7 +1304,7 @@ export default function VideoEditor() {
|
||||
if (audio.src !== expectedSrc) {
|
||||
audio.src = expectedSrc;
|
||||
}
|
||||
audio.volume = region.volume;
|
||||
audio.volume = Math.max(0, Math.min(1, region.volume));
|
||||
}
|
||||
|
||||
return () => {
|
||||
|
||||
@@ -305,7 +305,7 @@ export function normalizeProjectEditor(editor: Partial<ProjectEditorState>): Pro
|
||||
startMs,
|
||||
endMs,
|
||||
audioPath: typeof region.audioPath === "string" ? region.audioPath : "",
|
||||
volume: isFiniteNumber(region.volume) ? clamp(region.volume, 0, 2) : 1,
|
||||
volume: isFiniteNumber(region.volume) ? clamp(region.volume, 0, 1) : 1,
|
||||
};
|
||||
})
|
||||
: [];
|
||||
|
||||
Reference in New Issue
Block a user