|
@@ -237,22 +237,20 @@ class INVideoExportController: BFBaseViewController {
|
|
let export = BFRecordExport()
|
|
let export = BFRecordExport()
|
|
|
|
|
|
export.progress = { [weak self] progress in
|
|
export.progress = { [weak self] progress in
|
|
- DispatchQueue.main.async { [weak self] in
|
|
|
|
- if let wself = self {
|
|
|
|
-// let width = export.data?.first?.width ?? 0
|
|
|
|
- wself.progressL.text = String(format: "%d%%", Int(progress * 100))
|
|
|
|
- wself.progressView.snp.updateConstraints { make in
|
|
|
|
- make.width.equalTo(wself.playerLayer.bounds.width * CGFloat(progress))
|
|
|
|
- }
|
|
|
|
|
|
+ DispatchQueue.main.async {[weak self] in
|
|
|
|
+ guard let wself = self else { return }
|
|
|
|
+
|
|
|
|
+ wself.progressL.text = String(format: "%d%%", Int(progress * 100))
|
|
|
|
+ wself.progressView.snp.updateConstraints { make in
|
|
|
|
+ make.width.equalTo(wself.playerLayer.bounds.width * CGFloat(progress))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
export.exportCompletion = { [weak self] error, url in
|
|
export.exportCompletion = { [weak self] error, url in
|
|
DispatchQueue.main.async { [weak self] in
|
|
DispatchQueue.main.async { [weak self] in
|
|
- guard let wself = self else {
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
|
|
+ guard let wself = self else { return }
|
|
|
|
+
|
|
UIApplication.shared.isIdleTimerDisabled = false
|
|
UIApplication.shared.isIdleTimerDisabled = false
|
|
|
|
|
|
wself.resetViewStatus()
|
|
wself.resetViewStatus()
|
|
@@ -653,13 +651,11 @@ class INVideoExportController: BFBaseViewController {
|
|
PHPhotoLibrary.shared().performChanges {
|
|
PHPhotoLibrary.shared().performChanges {
|
|
PHAssetChangeRequest.creationRequestForAssetFromVideo(atFileURL: url)
|
|
PHAssetChangeRequest.creationRequestForAssetFromVideo(atFileURL: url)
|
|
} completionHandler: { [weak self] isFinished, _ in
|
|
} completionHandler: { [weak self] isFinished, _ in
|
|
- guard let wself = self else {
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
|
|
+ guard let wself = self else { return }
|
|
|
|
+
|
|
if isFinished {
|
|
if isFinished {
|
|
- DispatchQueue.main.async {
|
|
|
|
- cShowHUB(superView: nil, msg: "compose_tips_successfully".BFLocale, style: 1)
|
|
|
|
- }
|
|
|
|
|
|
+ cShowHUB(superView: nil, msg: "compose_tips_successfully".BFLocale, style: 1)
|
|
|
|
+
|
|
if wself.saveAllBtn.isSelected {
|
|
if wself.saveAllBtn.isSelected {
|
|
wself.hasSaveAll = true
|
|
wself.hasSaveAll = true
|
|
} else if wself.saveOnlyBtn.isSelected {
|
|
} else if wself.saveOnlyBtn.isSelected {
|