ソースを参照

录制,播放到头不自动转下一个素材

harry 3 年 前
コミット
8b07f04fba

+ 12 - 10
BFRecordScreenKit/Classes/RecordScreen/Controller/BFRecordScreenController.swift

@@ -1380,16 +1380,18 @@ public class BFRecordScreenController: BFBaseViewController {
         
         NotificationCenter.default.addObserver(forName: .AVPlayerItemDidPlayToEndTime, object: assetPlayer?.currentItem, queue: .main) { [weak self] notify in
             BFLog(1, message: "AVPlayerItemDidPlayToEndTime = \(notify)")
-            if (self?.currItemModelIndex ?? 0) < ((self?.itemModels.count ?? 0) - 1) {
-                self?.collectionView.setContentOffset(CGPoint(x: CGFloat((self?.currItemModelIndex ?? 0) + 1) * (self?.collectionView.frame.width ?? 0), y: 0), animated: true)
-            } else {
-                self?.isNormalPlaying = false
-                //            self?.assetPlayer?.seek(to: CMTime.zero)
-                //            self?.progressThumV.progress = 0
-                self?.isEndPlay = true
-                //            self?.currentPlayRecordIndex = -1
-                self?.recordBtn.isHidden = true
-            }
+//            if (self?.currItemModelIndex ?? 0) < ((self?.itemModels.count ?? 0) - 1) {
+//                self?.collectionView.setContentOffset(CGPoint(x: CGFloat((self?.currItemModelIndex ?? 0) + 1) * (self?.collectionView.frame.width ?? 0), y: 0), animated: true)
+//            } else {
+//            }
+            self?.isNormalPlaying = false
+            //            self?.assetPlayer?.seek(to: CMTime.zero)
+            //            self?.progressThumV.progress = 0
+            self?.isEndPlay = true
+            //            self?.currentPlayRecordIndex = -1
+            self?.recordBtn.isHidden = true
+            
+            
             if self?.isRecording ?? false {
                 self?.endRecord()
                 cShowHUB(superView: nil, msg: "此视频已录制到头了哦!")