Browse Source

播放结束波形纹重置

huzhiqiang 3 years ago
parent
commit
e334dfdf76

+ 6 - 1
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointEditerController.swift

@@ -1030,7 +1030,12 @@ class PQStuckPointEditerController: PQBaseViewController {
                 BFLog(message: " playerView.play tiskskskskme  \(end4 - end3)")
 
                 // 6,进度回调
-                self.playerView.progress = { [weak self] currentTime, tatolTime, _ in
+                self.playerView.progress = { [weak self] currentTime, tatolTime, percent in
+                    if percent == 1 {
+                        self?.stuckPointCuttingView.resetDefaultsColor(clearData: false)
+
+                        return
+                    }
                     if(CMTimeGetSeconds(self?.playeTimeRange.duration ?? .zero) <= 0.0){
                         BFLog(message: "时长错误!!!!")
                         return

+ 1 - 1
BFFramework/Classes/Stuckpoint/ViewModel/PQGPUImagePlayerView.swift

@@ -454,7 +454,7 @@ public class PQGPUImagePlayerView: UIView {
                 strongSelf.status = .stop
                 strongSelf.finishedClosure?()
                 strongSelf.showPlayBtn(isHidden: false)
-
+                strongSelf.progress!(0,0,1)
             }
         }
         speaker = SpeakerOutput()

+ 8 - 1
BFFramework/Classes/Utils/PQCommonMethodUtil.swift

@@ -614,7 +614,14 @@ public func sendLocalNotification(title: String, body: String) {
 /// 打开应用设置
 public func openAppSetting() {
     if UIApplication.shared.canOpenURL(URL(string: UIApplication.openSettingsURLString)!) {
-        UIApplication.shared.openURL(URL(string: UIApplication.openSettingsURLString)!)
+        guard let settingsUrl = URL(string: UIApplication.openSettingsURLString) else {
+            return
+        }
+        if UIApplication.shared.canOpenURL(settingsUrl) {
+            UIApplication.shared.open(settingsUrl, completionHandler: { (success) in
+                BFLog(message: "Settings opened: \(success)") // Prints true
+            })
+        }
     }
 }