|
@@ -460,20 +460,14 @@ class PQStuckPointEditerController: PQBaseViewController {
|
|
return synchroMarskView
|
|
return synchroMarskView
|
|
}()
|
|
}()
|
|
|
|
|
|
- override func viewWillAppear(_ animated: Bool) {
|
|
|
|
- super.viewDidAppear(animated)
|
|
|
|
- lineView?.isHidden = true
|
|
|
|
- UIApplication.shared.isIdleTimerDisabled = true
|
|
|
|
- musicNameLab.move()
|
|
|
|
-
|
|
|
|
- PQNotification.addObserver(self, selector: #selector(enterBackground), name: UIApplication.didEnterBackgroundNotification, object: nil)
|
|
|
|
- PQNotification.addObserver(self, selector: #selector(willEnterForeground), name: UIApplication.willEnterForegroundNotification, object: nil)
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
@objc func willEnterForeground() {
|
|
@objc func willEnterForeground() {
|
|
BFLog(message: "进入到前台")
|
|
BFLog(message: "进入到前台")
|
|
if(self.navigationController?.topViewController == self){
|
|
if(self.navigationController?.topViewController == self){
|
|
- settingPlayerView()
|
|
|
|
|
|
+ if projectModel.sData!.sections.count > 0 {
|
|
|
|
+ settingPlayerView()
|
|
|
|
+ }else {
|
|
|
|
+ prepareMeta()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -660,6 +654,16 @@ class PQStuckPointEditerController: PQBaseViewController {
|
|
settingPlayerView()
|
|
settingPlayerView()
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ override func viewWillAppear(_ animated: Bool) {
|
|
|
|
+ super.viewDidAppear(animated)
|
|
|
|
+ lineView?.isHidden = true
|
|
|
|
+ UIApplication.shared.isIdleTimerDisabled = true
|
|
|
|
+ musicNameLab.move()
|
|
|
|
+
|
|
|
|
+ PQNotification.addObserver(self, selector: #selector(enterBackground), name: UIApplication.didEnterBackgroundNotification, object: nil)
|
|
|
|
+ PQNotification.addObserver(self, selector: #selector(willEnterForeground), name: UIApplication.willEnterForegroundNotification, object: nil)
|
|
|
|
+ }
|
|
|
|
+
|
|
override func viewWillDisappear(_ animated: Bool) {
|
|
override func viewWillDisappear(_ animated: Bool) {
|
|
super.viewWillDisappear(animated)
|
|
super.viewWillDisappear(animated)
|
|
UIApplication.shared.isIdleTimerDisabled = false
|
|
UIApplication.shared.isIdleTimerDisabled = false
|
|
@@ -667,6 +671,7 @@ class PQStuckPointEditerController: PQBaseViewController {
|
|
playerView.pause()
|
|
playerView.pause()
|
|
|
|
|
|
musicEditBGView.pausePlayer()
|
|
musicEditBGView.pausePlayer()
|
|
|
|
+ PQNotification.removeObserver(self)
|
|
}
|
|
}
|
|
|
|
|
|
override func viewDidLoad() {
|
|
override func viewDidLoad() {
|
|
@@ -677,6 +682,14 @@ class PQStuckPointEditerController: PQBaseViewController {
|
|
|
|
|
|
// 添加子视图
|
|
// 添加子视图
|
|
addSubViews()
|
|
addSubViews()
|
|
|
|
+
|
|
|
|
+ prepareMeta()
|
|
|
|
+
|
|
|
|
+ // 曝光上报:预览页面曝光上报
|
|
|
|
+ PQEventTrackViewModel.baseReportUpload(businessType: .bt_windowView, objectType: .ot_view_previewSyncedUp, pageSource: .sp_stuck_previewSyncedUp, extParams: nil, remindmsg: "卡点视频数据上报-(曝光上报:预览页面曝光上报)")
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ func prepareMeta(){
|
|
// 导出相册视频
|
|
// 导出相册视频
|
|
exportPhotoData()
|
|
exportPhotoData()
|
|
// 同步音乐数据
|
|
// 同步音乐数据
|
|
@@ -684,8 +697,6 @@ class PQStuckPointEditerController: PQBaseViewController {
|
|
|
|
|
|
// 插入选择的音乐信息
|
|
// 插入选择的音乐信息
|
|
musicEditBGView.firstInsertVoiceModel = stuckPointMusicData!
|
|
musicEditBGView.firstInsertVoiceModel = stuckPointMusicData!
|
|
- // 曝光上报:预览页面曝光上报
|
|
|
|
- PQEventTrackViewModel.baseReportUpload(businessType: .bt_windowView, objectType: .ot_view_previewSyncedUp, pageSource: .sp_stuck_previewSyncedUp, extParams: nil, remindmsg: "卡点视频数据上报-(曝光上报:预览页面曝光上报)")
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/// 添加子视图
|
|
/// 添加子视图
|
|
@@ -736,15 +747,11 @@ class PQStuckPointEditerController: PQBaseViewController {
|
|
make.height.equalTo(290)
|
|
make.height.equalTo(290)
|
|
}
|
|
}
|
|
musicEditBGView.snp.makeConstraints { make in
|
|
musicEditBGView.snp.makeConstraints { make in
|
|
- make.left.right.equalTo(view)
|
|
|
|
|
|
+ make.left.right.equalToSuperview()
|
|
make.bottom.equalTo(pointEditerBtn.snp_top).offset(-7)
|
|
make.bottom.equalTo(pointEditerBtn.snp_top).offset(-7)
|
|
make.height.equalTo(290)
|
|
make.height.equalTo(290)
|
|
}
|
|
}
|
|
- stuckPointCuttingView.snp.makeConstraints { make in
|
|
|
|
- make.left.right.equalTo(view)
|
|
|
|
- make.bottom.equalTo(pointEditerBtn.snp_top).offset(-12)
|
|
|
|
- make.height.equalTo(290)
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
optionlineView.snp.makeConstraints { make in
|
|
optionlineView.snp.makeConstraints { make in
|
|
make.left.right.equalToSuperview()
|
|
make.left.right.equalToSuperview()
|
|
make.bottom.equalTo(pointEditBGView.snp_bottom).offset(-1)
|
|
make.bottom.equalTo(pointEditBGView.snp_bottom).offset(-1)
|
|
@@ -921,8 +928,6 @@ class PQStuckPointEditerController: PQBaseViewController {
|
|
showRect.origin.y = (playerShowHeight - showRect.size.height) / 2.0 + (navHeadImageView?.frame.maxY ?? 0)
|
|
showRect.origin.y = (playerShowHeight - showRect.size.height) / 2.0 + (navHeadImageView?.frame.maxY ?? 0)
|
|
playerView.resetCanvasFrame(frame: showRect)
|
|
playerView.resetCanvasFrame(frame: showRect)
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
var firstModel: PQEditVisionTrackMaterialsModel?
|
|
var firstModel: PQEditVisionTrackMaterialsModel?
|
|
for part in projectModel.sData!.sections {
|
|
for part in projectModel.sData!.sections {
|
|
if part.sectionTimeline?.visionTrack?.getEnableVisionTrackMaterials().count ?? 0 > 0 {
|
|
if part.sectionTimeline?.visionTrack?.getEnableVisionTrackMaterials().count ?? 0 > 0 {
|
|
@@ -1026,9 +1031,7 @@ class PQStuckPointEditerController: PQBaseViewController {
|
|
|
|
|
|
self?.stuckPointCuttingView.updateProgress(progress: CGFloat(progress))
|
|
self?.stuckPointCuttingView.updateProgress(progress: CGFloat(progress))
|
|
|
|
|
|
- if self?.synchroMarskView.superview != nil {
|
|
|
|
- self?.synchroMarskView.removeMarskView()
|
|
|
|
- }
|
|
|
|
|
|
+ self?.synchroMarskView.removeMarskView()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1647,9 +1650,7 @@ extension PQStuckPointEditerController {
|
|
// 处理所有数据完成
|
|
// 处理所有数据完成
|
|
self?.dealWithDataSuccess()
|
|
self?.dealWithDataSuccess()
|
|
}
|
|
}
|
|
- if self?.synchroMarskView.superview != nil {
|
|
|
|
- self?.synchroMarskView.removeMarskView()
|
|
|
|
- }
|
|
|
|
|
|
+ self?.synchroMarskView.removeMarskView()
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
self?.isSynchroMusicInfoSuccess = true
|
|
self?.isSynchroMusicInfoSuccess = true
|
|
@@ -1659,9 +1660,7 @@ extension PQStuckPointEditerController {
|
|
// 添加子视图
|
|
// 添加子视图
|
|
self?.addSubViews()
|
|
self?.addSubViews()
|
|
} else {
|
|
} else {
|
|
- if self?.synchroMarskView.superview != nil {
|
|
|
|
- self?.synchroMarskView.removeMarskView()
|
|
|
|
- }
|
|
|
|
|
|
+ self?.synchroMarskView.removeMarskView()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else if stuckPointMusicData?.localPath == nil || (stuckPointMusicData?.localPath?.count ?? 0) > 0 {
|
|
} else if stuckPointMusicData?.localPath == nil || (stuckPointMusicData?.localPath?.count ?? 0) > 0 {
|
|
@@ -1677,9 +1676,7 @@ extension PQStuckPointEditerController {
|
|
// 处理所有数据完成
|
|
// 处理所有数据完成
|
|
self?.dealWithDataSuccess()
|
|
self?.dealWithDataSuccess()
|
|
} else {
|
|
} else {
|
|
- if self?.synchroMarskView.superview != nil {
|
|
|
|
- self?.synchroMarskView.removeMarskView()
|
|
|
|
- }
|
|
|
|
|
|
+ self?.synchroMarskView.removeMarskView()
|
|
// PQUploadRemindView.showUploadRemindView(title: nil, attributedTitle: NSAttributedString(string: "加载音乐失败,请重新选择音乐"), summary: "", confirmTitle: nil) { [weak self] _, _ in
|
|
// PQUploadRemindView.showUploadRemindView(title: nil, attributedTitle: NSAttributedString(string: "加载音乐失败,请重新选择音乐"), summary: "", confirmTitle: nil) { [weak self] _, _ in
|
|
// self?.navigationController?.popViewController(animated: true)
|
|
// self?.navigationController?.popViewController(animated: true)
|
|
// }
|
|
// }
|
|
@@ -1748,6 +1745,11 @@ extension PQStuckPointEditerController {
|
|
|
|
|
|
dispatchGroup.leave()
|
|
dispatchGroup.leave()
|
|
}
|
|
}
|
|
|
|
+ }else {
|
|
|
|
+ // 结束loading动画
|
|
|
|
+ DispatchQueue.main.async {
|
|
|
|
+ self.synchroMarskView.removeMarskView()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|