feat: add audio volume

This commit is contained in:
4rjunc
2026-03-15 17:48:44 +05:30
parent 89038ae7a2
commit 98ff361fa1
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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,
};
})
: [];