浏览代码

处理恢复播放问题

jsonwang 3 年之前
父节点
当前提交
4b2db41142
共有 1 个文件被更改,包括 9 次插入7 次删除
  1. 9 7
      MusicVideoPlus/Classes/Modules/Home/Controllers/MVHomeController.swift

+ 9 - 7
MusicVideoPlus/Classes/Modules/Home/Controllers/MVHomeController.swift

@@ -354,8 +354,9 @@ class MVHomeController: MVBaseController {
             isJumpToLogin = true
             addNotification(self, selector: #selector(loginSuccesss), name: cLoginSuccesssNotiKey, object: nil)
             let vc = MVLoginController()
-            vc.modalPresentationStyle = .fullScreen
-            present(vc, animated: true, completion: nil)
+            let navigationController: UINavigationController = UINavigationController(rootViewController: vc)
+            navigationController.modalPresentationStyle = .fullScreen
+            present(navigationController, animated: true, completion: nil)
             return
         }
 
@@ -405,7 +406,7 @@ class MVHomeController: MVBaseController {
 
         case 3:
             let nav = UINavigationController(rootViewController: PQStuckPointMaterialController())
-            nav.modalPresentationStyle = .overFullScreen
+            nav.modalPresentationStyle = .fullScreen
             present(nav, animated: true, completion: nil)
             // 关闭视频播放
             controlPlayrPasueOrResume(isPause: true)
@@ -430,7 +431,7 @@ class MVHomeController: MVBaseController {
 
     // 卡点模块消失
     @objc func stuckPointDismiss() {
-        DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 1) { [weak self] in
+        DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.01) { [weak self] in
             self?.controlPlayrPasueOrResume(isPause: false)
         }
     }
@@ -485,8 +486,9 @@ extension MVHomeController {
                    
 
                     PQSingletoVideoPlayer.shared.configPlyer(videoData: videoInfo, controllerView: cell!.converView)
-                       
-                    PQSingletoVideoPlayer.shared.startPlayr()
+                
+                    
+                    self.controlPlayrPasueOrResume(isPause: false)
            
 
                 } else {
@@ -510,7 +512,7 @@ extension MVHomeController {
                 rootViewController = (rootViewController as? UINavigationController)?.visibleViewController
             }
             BFLog(message: "rootViewController is \(rootViewController)")
-            if rootViewController is MVHomeController && cell != nil && cell?.videoData != nil{
+            if  cell != nil && cell?.videoData != nil{
                 cell?.pauseView.isHidden = true
                 PQSingletoVideoPlayer.shared.configPlyer(videoData: (cell?.videoData)!, controllerView: cell!.converView)
                 PQSingletoVideoPlayer.shared.startPlayr()