Closed janselv closed 8 years ago
solved? pls give some details
@janselr curious what you ended up using?
@victorcampeanu right now I don't change the captureSessionPreset
I just use SCRecorder's
capturePhoto
method.
@victorcampeanu the question I tried to answer was how can I use the same recorder to take both photos & videos without the pain of the time took to reconfigure the recorder due on preset switching?. It turns out that leaving the preset to AVCaptureSessionPresetHigh
worked for me in both scenarios. the final settings on the recorder that I'm using is this.
recorder = SCRecorder()
recorder.captureSessionPreset = AVCaptureSessionPresetHigh
recorder.flashMode = .Auto
recorder.initializeSessionLazily = false
recorder.delegate = self
recorder.autoSetVideoOrientation = true
recorder.videoConfiguration.size = ...
recorder.maxRecordDuration = ...
Relative to the coordination of the action to take on the button, I set a tap and long press gestures on it and responded to each one when performed, either calling capturePhoto
or record
.
I want to record/take photos using the same button like Snapchat does, photos on button tap, videos on holding, the problem is that trying to set the captureSessionPreset to photo before taking the photo takes to long and when button is tapped there is a delay to the photo be taken. after the photo is taken I restore to video capture preset since I want both video and photos be handled by the same button. What am I doing wrong ? There is a better way to do it ?