mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-27 16:25:35 +00:00
fix: address CodeRabbit review — fallback, i18n, return type cleanup
- Change ?? 99 fallback to ?? 100 in finalizing progress label - Add editor.export.processingAudioEdits i18n key to all 5 locales - Tighten sourceTimeToOutputTime return type to number (was number|null) - Remove now-unused totalOutputDurationMs param from scheduleRegionForChunk - Remove ?? fallbacks at call sites (function always returns a number)
This commit is contained in:
@@ -4234,7 +4234,7 @@ export default function VideoEditor() {
|
||||
})
|
||||
: isExportFinalizing
|
||||
? t("editor.exportStatus.finalizingPercent", "Finalizing {{percent}}%", {
|
||||
percent: Math.round(exportFinalizingProgress ?? 99),
|
||||
percent: Math.round(exportFinalizingProgress ?? 100),
|
||||
})
|
||||
: t("editor.exportStatus.completePercent", "{{percent}}% complete", {
|
||||
percent: Math.round(exportProgress.percentage),
|
||||
|
||||
@@ -122,6 +122,9 @@
|
||||
"complete": "Export complete",
|
||||
"savedSuccessfully": "Your file was saved successfully."
|
||||
},
|
||||
"export": {
|
||||
"processingAudioEdits": "Processing audio with speed/overlay edits"
|
||||
},
|
||||
"toolbar": {
|
||||
"addLayer": "Add Layer",
|
||||
"splitClip": "Split Clip (C)"
|
||||
|
||||
@@ -122,6 +122,9 @@
|
||||
"complete": "Exportación completada",
|
||||
"savedSuccessfully": "Tu archivo se guardó correctamente."
|
||||
},
|
||||
"export": {
|
||||
"processingAudioEdits": "Procesando audio con ediciones de velocidad/superposición"
|
||||
},
|
||||
"toolbar": {
|
||||
"addLayer": "Agregar capa",
|
||||
"splitClip": "Dividir clip (C)"
|
||||
|
||||
@@ -123,6 +123,9 @@
|
||||
"complete": "내보내기 완료",
|
||||
"savedSuccessfully": "파일이 성공적으로 저장되었습니다."
|
||||
},
|
||||
"export": {
|
||||
"processingAudioEdits": "속도/오버레이 편집으로 오디오 처리 중"
|
||||
},
|
||||
"toolbar": {
|
||||
"addLayer": "레이어 추가",
|
||||
"splitClip": "클립 분할 (C)"
|
||||
|
||||
@@ -123,6 +123,9 @@
|
||||
"complete": "Export voltooid",
|
||||
"savedSuccessfully": "Je bestand is succesvol opgeslagen."
|
||||
},
|
||||
"export": {
|
||||
"processingAudioEdits": "Audio verwerken met snelheids-/overlay-bewerkingen"
|
||||
},
|
||||
"toolbar": {
|
||||
"addLayer": "Laag toevoegen",
|
||||
"splitClip": "Clip splitsen (C)"
|
||||
|
||||
@@ -122,6 +122,9 @@
|
||||
"complete": "导出完成",
|
||||
"savedSuccessfully": "文件已成功保存。"
|
||||
},
|
||||
"export": {
|
||||
"processingAudioEdits": "正在处理带有速度/叠加编辑的音频"
|
||||
},
|
||||
"toolbar": {
|
||||
"addLayer": "添加图层",
|
||||
"splitClip": "拆分片段 (C)"
|
||||
|
||||
@@ -611,9 +611,7 @@ export class AudioProcessor {
|
||||
// Extend for audio regions that might exceed the video timeline
|
||||
for (const { region } of regionEntries) {
|
||||
const regionEndOutput = this.sourceTimeToOutputTime(region.endMs, slices);
|
||||
if (regionEndOutput !== null) {
|
||||
outputDurationMs = Math.max(outputDurationMs, regionEndOutput);
|
||||
}
|
||||
outputDurationMs = Math.max(outputDurationMs, regionEndOutput);
|
||||
}
|
||||
|
||||
const numChannels = Math.min(primaryBuffer?.numberOfChannels ?? 2, 2);
|
||||
@@ -744,7 +742,7 @@ export class AudioProcessor {
|
||||
chunkIndex: number,
|
||||
) => Promise<void>,
|
||||
): Promise<void> {
|
||||
const { slices, outputDurationMs, numChannels } = prepared;
|
||||
const { slices, numChannels } = prepared;
|
||||
let outputOffsetSec = 0;
|
||||
const chunkCount = Math.ceil(totalOutputSec / OFFLINE_CHUNK_DURATION_SEC);
|
||||
|
||||
@@ -792,7 +790,6 @@ export class AudioProcessor {
|
||||
buffer,
|
||||
region,
|
||||
slices,
|
||||
outputDurationMs,
|
||||
outputOffsetSec,
|
||||
chunkSec,
|
||||
);
|
||||
@@ -814,13 +811,11 @@ export class AudioProcessor {
|
||||
buffer: AudioBuffer,
|
||||
region: AudioRegion,
|
||||
slices: TimelineSlice[],
|
||||
totalOutputDurationMs: number,
|
||||
chunkOutputStartSec: number,
|
||||
chunkDurationSec: number,
|
||||
): void {
|
||||
const outputStartMs = this.sourceTimeToOutputTime(region.startMs, slices) ?? 0;
|
||||
const outputEndMs =
|
||||
this.sourceTimeToOutputTime(region.endMs, slices) ?? totalOutputDurationMs;
|
||||
const outputStartMs = this.sourceTimeToOutputTime(region.startMs, slices);
|
||||
const outputEndMs = this.sourceTimeToOutputTime(region.endMs, slices);
|
||||
|
||||
let localStartSec = outputStartMs / 1000 - chunkOutputStartSec;
|
||||
let localEndSec = outputEndMs / 1000 - chunkOutputStartSec;
|
||||
@@ -1240,7 +1235,7 @@ export class AudioProcessor {
|
||||
private sourceTimeToOutputTime(
|
||||
sourceMs: number,
|
||||
slices: TimelineSlice[],
|
||||
): number | null {
|
||||
): number {
|
||||
let outputMs = 0;
|
||||
|
||||
for (const slice of slices) {
|
||||
|
||||
Reference in New Issue
Block a user