fix: Set initial timestamp on first frame (#1114)

This commit is contained in:
Thomas Coldwell 2022-07-04 13:09:39 +01:00 committed by GitHub
parent 147b9111d4
commit 54703f386c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,6 +155,7 @@ class RecordingSession {
}
// Start the writing session before we write the first video frame
if !hasStartedWritingSession {
initialTimestamp = timestamp
assetWriter.startSession(atSourceTime: timestamp)
ReactLogger.log(level: .info, message: "Started RecordingSession at \(timestamp.seconds) seconds.")
hasStartedWritingSession = true