From 09a372bc45fde16fd42257ab6f78b8deeecf720b Mon Sep 17 00:00:00 2001
From: 杨锴 <841720330@qq.com>
Date: 星期三, 16 四月 2025 16:38:05 +0800
Subject: [PATCH] fix bug

---
 XQMuse/Root/CLPlayer/CLPlayerView.swift |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/XQMuse/Root/CLPlayer/CLPlayerView.swift b/XQMuse/Root/CLPlayer/CLPlayerView.swift
index 39797f5..827076e 100644
--- a/XQMuse/Root/CLPlayer/CLPlayerView.swift
+++ b/XQMuse/Root/CLPlayer/CLPlayerView.swift
@@ -8,6 +8,7 @@
 import AVFoundation
 import SnapKit
 import UIKit
+import JQTools
 
 extension CLPlayerView {
     enum CLWaitReadyToPlayState {
@@ -235,15 +236,17 @@
         if config.rotateStyle == .small, isFullScreen { return }
         if config.rotateStyle == .fullScreen, !isFullScreen { return }
 
-        switch UIDevice.current.orientation {
-        case .portrait:
-            dismiss()
-        case .landscapeLeft:
-            presentWithOrientation(.left)
-        case .landscapeRight:
-            presentWithOrientation(.right)
-        default:
-            break
+        if let vc = JQ_currentViewController() as? CourseVC,vc.pageViewController.currentPage == 1{
+            switch UIDevice.current.orientation {
+                case .portrait:
+                    dismiss()
+                case .landscapeLeft:
+                    presentWithOrientation(.left)
+                case .landscapeRight:
+                    presentWithOrientation(.right)
+                default:
+                    break
+            }
         }
     }
 

--
Gitblit v1.7.1