I've tried various other settings for content mode, but none seem to fix the first recording.
Workaround
As a workaround, I currently create a fake recording before triggering the real recording:
// The aspect ratio gets messed up on the first recording, so trigger
// a fake recording to fix it
Timer.scheduledTimer(withTimeInterval: 1, repeats: false, block: { _ in
recorder.record(forDuration: 0.5) { _ in
recorder.enableAudio = true
}
})
Ah looks like swift package manager was picking up a build from back in February by default. After updating to the latest swift_5 branch, I haven't seen this again
On an iPhone 12 in portrait mode, I've found that my app's first video recording will be the wrong aspect ratio.
Here's a still from the first video in the app:
The video is 1440 × 1920
And here's the second video recorded in the app:
This video is 664 × 1440 (which is the correct size)
As far as I can tell, the view is identical in both cases
Here's my
RecordAR
configuration:I've tried various other settings for content mode, but none seem to fix the first recording.
Workaround
As a workaround, I currently create a fake recording before triggering the real recording:
Not sure if there's a better way to do this