Post

Replies

Boosts

Views

Activity

Comment on How to save video asynchronously?
classe SayTest: NSObject { // … init(texts: Stringh) { // … DispatchQueue.global().async { do { try self.nextText(texts) msgErro("Video created.") } catch { // … } } } func nextTexto(_ textos: [String]) throws { // … let assetWriter = try AVAssetWriter(outputURL: url, fileType: .mp4) // … assetWriter.finishWriting { switch assetWriter.status { case .completed: msgRelatos("Operation completed.") UISaveVideoAtPathToSavedPhotosAlbum(url.path, nil, nil, nil) case .failed: // … } } } }
Jan ’24