|
@@ -16,6 +16,9 @@ class PublishVideoRecorderController: BaseViewController {
|
|
|
typealias DismissClosure = () -> Void
|
|
|
var dismissClosure: DismissClosure?
|
|
|
|
|
|
+ typealias EditClosure = () -> Void
|
|
|
+ var editClosure: EditClosure?
|
|
|
+
|
|
|
typealias HideSegmentClosure = (_ isHidden: Bool) -> Void
|
|
|
var hideSegmentClosure: HideSegmentClosure?
|
|
|
|
|
@@ -145,8 +148,7 @@ class PublishVideoRecorderController: BaseViewController {
|
|
|
//生成这次的存储路径
|
|
|
let taskPath: String = recordDir.appending(AliyunPathManager.randomString())
|
|
|
//视频存储路径
|
|
|
- let videoSavePath: String = taskPath.appending(AliyunPathManager.randomString()).appending("mp4")
|
|
|
-
|
|
|
+ let videoSavePath: String = taskPath.appending(AliyunPathManager.randomString()).appending(".mp4")
|
|
|
|
|
|
let recorder = AliyunIRecorder.init(delegate: self, videoSize: CGSize(width: 720, height: 1280))
|
|
|
|
|
@@ -324,10 +326,8 @@ extension PublishVideoRecorderController {
|
|
|
}
|
|
|
|
|
|
func recordButtonFinishVideo() {
|
|
|
- print("----partCount == \(clipManager?.partCount ?? 0)")
|
|
|
if clipManager?.partCount ?? 0 >= 1 {
|
|
|
recorder.finishRecording()
|
|
|
- print("----调用结束录制")
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -403,6 +403,9 @@ extension PublishVideoRecorderController: AliyunIRecorderDelegate {
|
|
|
UISaveVideoAtPathToSavedPhotosAlbum(outputPath, self, nil, nil)
|
|
|
|
|
|
|
|
|
+ if let editClosure = self.editClosure {
|
|
|
+ editClosure()
|
|
|
+ }
|
|
|
|
|
|
// [[AlivcShortVideoRoute shared]registerEditVideoPath:outputPath];
|
|
|
// [[AlivcShortVideoRoute shared]registerEditMediasPath:nil];
|
|
@@ -411,9 +414,6 @@ extension PublishVideoRecorderController: AliyunIRecorderDelegate {
|
|
|
// }else{
|
|
|
// [[AlivcShortVideoRoute shared] registerHasRecordMusic:NO];
|
|
|
// }
|
|
|
-// UIViewController *editVC = [[AlivcShortVideoRoute shared]alivcViewControllerWithType:AlivcViewControlEdit];
|
|
|
-
|
|
|
-// [self.navigationController pushViewController:editVC animated:YES];
|
|
|
}
|
|
|
|
|
|
// 收到录制达到最大时长回调,调用完成录制
|