Skip to content

🎥 Make videos programmatically with React

remove comment

Igor Samokhovetsd8585dffc51b
diff --git a/packages/media/src/audio-extraction/extract-audio.ts b/packages/media/src/audio-extraction/extract-audio.ts
index a16c55d096..187ad22250 100644
--- a/packages/media/src/audio-extraction/extract-audio.ts
+++ b/packages/media/src/audio-extraction/extract-audio.ts
@@ -95,7 +95,6 @@ const extractAudioInternal = async ({
audioManager.logOpenFrames();
- // Tolerance for timing discrepancies when the first sample starts slightly after the requested time due to floating-point precision or media file timing variations
const trimStartToleranceInSeconds = 0.002;
const audioDataArray: PcmS16AudioData[] = [];
diff --git a/packages/media/src/video-extraction/keyframe-bank.ts b/packages/media/src/video-extraction/keyframe-bank.ts
index 04182f3668..2af9c2c4a4 100644
--- a/packages/media/src/video-extraction/keyframe-bank.ts
+++ b/packages/media/src/video-extraction/keyframe-bank.ts
@@ -144,8 +144,8 @@ export const makeKeyframeBank = ({
const maxClampToleranceInSeconds = 0.1;
// If the requested timestamp is before the start of this bank, clamp it to the start if within tolerance. This handles videos that don't start at timestamp 0.
-
// For example, requesting frame at 0sec when video starts at 0.04sec should return the frame at 0.04sec.
+
let adjustedTimestamp = timestampInSeconds;
if (timestampInSeconds < startTimestampInSeconds) {