I'm using UIVideoEditorController, but the success delegate method called twice for me. However, all pointers of all passed objects tell it sends exactly the same data.
let editor = UIVideoEditorController()
editor.videoMaximumDuration = 10.0
editor.videoQuality = .typeIFrame1280x720
editor.delegate = self
editor.videoPath = // some path goes here
self.present(editor, animated: true, completion: nil)
And then the following method prints "here" 2 times.
func videoEditorController(_ editor: UIVideoEditorController, didSaveEditedVideoToPath editedVideoPath: String) {
print("here")
self.dismiss(animated: true, completion: nil)
}
func videoEditorController(_ editor: UIVideoEditorController, didSaveEditedVideoToPath editedVideoPath: String) {
editor.delegate = nil
editor.dismiss(animated: true)
}
yes, I know, this bad way but workin :)
var isSaved:Bool = false
func videoEditorController(_ editor: UIVideoEditorController, didSaveEditedVideoToPath editedVideoPath: String) {
if(!isSaved) {
print("here")
self.isSaved = true
}
self.dismiss(animated: true, completion: nil)
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With