mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-25 23:35:43 +00:00
fix: address CodeRabbit review feedback (round 2)
- Reorder recorder.stop() before cleanupCapturedMedia to avoid dropping final chunk (recordingStopHelpers) - Guard speed region divisor against 0/NaN/Infinity (audioEncoder shared)
This commit is contained in:
@@ -88,8 +88,8 @@ export async function stopBrowserRecordingSession(options: StopRecordingOptions)
|
||||
}
|
||||
|
||||
options.refs.pendingWebcamPathPromise.current = stopWebcamRecorder(options.refs);
|
||||
await options.cleanupCapturedMedia();
|
||||
recorder.stop();
|
||||
await options.cleanupCapturedMedia();
|
||||
options.setRecording(false);
|
||||
window.electronAPI?.setRecordingState(false);
|
||||
return true;
|
||||
|
||||
@@ -123,10 +123,12 @@ export function buildTimelineSlices(
|
||||
(s) => midpoint >= s.startMs && midpoint < s.endMs,
|
||||
);
|
||||
|
||||
const rawSpeed = speedRegion?.speed ?? 1;
|
||||
const speed = Number.isFinite(rawSpeed) && rawSpeed > 0 ? rawSpeed : 1;
|
||||
slices.push({
|
||||
sourceStartMs: start,
|
||||
sourceEndMs: end,
|
||||
speed: speedRegion?.speed ?? 1,
|
||||
speed,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user