我正在尝试将视频保存到我的照片库中。但有时我会遇到一个错误:操作无法完成。(PHPhotosErrorDomain错误-1。)
这是我的代码:
PHPhotoLibrary.shared().performChanges({
PHAssetChangeRequest.creationRequestForAssetFromVideo(atFileURL: exporter!.outputURL!)
}) { saved, error in
if saved {
print("video saved to camera roll")
} else {
print(error?.localizedDescription)
}
}发布于 2020-06-03 14:33:45
我可以通过在我的AVAssetWriter视频输出设置中删除AVVideoCompressionPropertiesKey中的AVVideoQualityKey来解决这个问题。
https://stackoverflow.com/questions/60250295
复制相似问题