Преглед изворни кода

从合成界面返回后 重新初始化播放器

jsonwang пре 3 година
родитељ
комит
6e0b7e0a64

+ 10 - 0
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointEditerController.swift

@@ -119,6 +119,8 @@ class PQStuckPointEditerController: PQBaseViewController {
     var stuckPointsTemp: Array = Array<Float>.init()
     var stuckPointsTempInt64: Array = Array<Int64>.init()
 
+    //是否点击了下一步去合成
+    var isClickNextBtn:Bool = false
 
     // 下一步
     lazy var nextBtn: UIButton = {
@@ -733,6 +735,12 @@ class PQStuckPointEditerController: PQBaseViewController {
 
         PQNotification.addObserver(self, selector: #selector(enterBackground), name: UIApplication.didEnterBackgroundNotification, object: nil)
         PQNotification.addObserver(self, selector: #selector(willEnterForeground), name: UIApplication.willEnterForegroundNotification, object: nil)
+        
+        //从分享返回后从重初始化播放器
+        if(isClickNextBtn){
+            isClickNextBtn = false
+            settingPlayerView()
+        }
     }
     
     override func viewWillDisappear(_ animated: Bool) {
@@ -921,6 +929,8 @@ class PQStuckPointEditerController: PQBaseViewController {
 
     @objc func nextBtnClick(sender _: UIButton) {
         BFLog(message: "去发布")
+     
+        isClickNextBtn = true
         playerView.pause()
         // 使用深 copy
         let json = projectModel.toJSONString(prettyPrint: false)