From 7047686ff9400e53ed52218c19866ae3fefa4813 Mon Sep 17 00:00:00 2001 From: Marc Rousavy Date: Mon, 27 Nov 2023 14:43:48 +0100 Subject: [PATCH] fix: Fix Recordings with `audio={false}` timeouting (#2221) --- package/ios/Core/RecordingSession.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/ios/Core/RecordingSession.swift b/package/ios/Core/RecordingSession.swift index 801f329..caf3419 100644 --- a/package/ios/Core/RecordingSession.swift +++ b/package/ios/Core/RecordingSession.swift @@ -152,6 +152,11 @@ class RecordingSession { assetWriter.startSession(atSourceTime: currentTime) startTimestamp = currentTime ReactLogger.log(level: .info, message: "Started RecordingSession at time: \(currentTime.seconds)") + + if audioWriter == nil { + // Audio was enabled, mark the Audio track as finished so we won't wait for it. + hasWrittenLastAudioFrame = true + } } /**