| 
														
															@@ -507,6 +507,9 @@ public class BFRecordScreenController: BFBaseViewController { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                             BFLog(1, message: "卡在录音尾巴上了1") 
														 | 
														
														 | 
														
															                             BFLog(1, message: "卡在录音尾巴上了1") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                             newSubtitle.timelineIn = newSubtitle.timelineIn - CMTime(seconds: 0.1, preferredTimescale: 1000) 
														 | 
														
														 | 
														
															                             newSubtitle.timelineIn = newSubtitle.timelineIn - CMTime(seconds: 0.1, preferredTimescale: 1000) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                         } 
														 | 
														
														 | 
														
															                         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    }else { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                        BFLog(1, message: "没有对应音频播放记录,出现错误!!!!!!") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                        return 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     } 
														 | 
														
														 | 
														
															                     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 } 
														 | 
														
														 | 
														
															                 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 var showText = ((payload?["result"]) as? String) ?? "" 
														 | 
														
														 | 
														
															                 var showText = ((payload?["result"]) as? String) ?? "" 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -719,7 +722,7 @@ public class BFRecordScreenController: BFBaseViewController { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         var findShowSubtitle: PQEditSubTitleModel? 
														 | 
														
														 | 
														
															         var findShowSubtitle: PQEditSubTitleModel? 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         for (index, subtitle) in itemModels[currItemModelIndex].titleStickers.enumerated() { 
														 | 
														
														 | 
														
															         for (index, subtitle) in itemModels[currItemModelIndex].titleStickers.enumerated() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            if CMTimeCompare(subtitle.timelineIn, time) <= 0, CMTimeCompare(subtitle.timelineOut, time) >= 0 { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if CMTimeCompare(subtitle.timelineIn, time) <= 0, CMTimeCompare(subtitle.timelineOut, time) > 0, subtitle.audioFilePath.count > 0 { //  audioFilePath.count 这个条件是确保这个字幕有对应录音 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 findShowSubtitle = subtitle 
														 | 
														
														 | 
														
															                 findShowSubtitle = subtitle 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 BFLog(1, message: "找到要显示的字幕 in \((findShowSubtitle?.timelineIn ?? .zero).seconds) out \((findShowSubtitle?.timelineOut ?? .zero).seconds) text:\(findShowSubtitle?.text ?? "") currTime is \(CMTimeGetSeconds(time))") 
														 | 
														
														 | 
														
															                 BFLog(1, message: "找到要显示的字幕 in \((findShowSubtitle?.timelineIn ?? .zero).seconds) out \((findShowSubtitle?.timelineOut ?? .zero).seconds) text:\(findShowSubtitle?.text ?? "") currTime is \(CMTimeGetSeconds(time))") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 showSubtitleIndex = index 
														 | 
														
														 | 
														
															                 showSubtitleIndex = index 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -1041,6 +1044,11 @@ public class BFRecordScreenController: BFBaseViewController { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         beginOnStartBtn = false 
														 | 
														
														 | 
														
															         beginOnStartBtn = false 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        recordBtn.isEnabled = false 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) {[weak self] in 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            self?.recordBtn.isEnabled = true 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+         
														 | 
													
												
											
												
													
														| 
														 | 
														
															         isRecording = false 
														 | 
														
														 | 
														
															         isRecording = false 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 //        progressThumV.progressView.isUserInteractionEnabled = true 
														 | 
														
														 | 
														
															 //        progressThumV.progressView.isUserInteractionEnabled = true 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 //        collectionView.isScrollEnabled = true 
														 | 
														
														 | 
														
															 //        collectionView.isScrollEnabled = true 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -1066,6 +1074,7 @@ public class BFRecordScreenController: BFBaseViewController { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if !avatarView.isHidden { 
														 | 
														
														 | 
														
															         if !avatarView.isHidden { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             avatarView.endRecord() 
														 | 
														
														 | 
														
															             avatarView.endRecord() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+         
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     @objc func cancleRecord() { 
														 | 
														
														 | 
														
															     @objc func cancleRecord() { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -1967,6 +1976,10 @@ extension BFRecordScreenController: UICollectionViewDelegate, UICollectionViewDa 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public func collectionView(_: UICollectionView, didSelectItemAt _: IndexPath) {} 
														 | 
														
														 | 
														
															     public func collectionView(_: UICollectionView, didSelectItemAt _: IndexPath) {} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    public func scrollViewWillBeginDragging(_ scrollView: UIScrollView) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        BFLog(1, message: "开始滚动") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        recordBtn.isEnabled = false 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) { 
														 | 
														
														 | 
														
															     public func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         endScrollItem(scrollView) 
														 | 
														
														 | 
														
															         endScrollItem(scrollView) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -1980,6 +1993,7 @@ extension BFRecordScreenController: UICollectionViewDelegate, UICollectionViewDa 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     func endScrollItem(_ scrollView: UIScrollView) { 
														 | 
														
														 | 
														
															     func endScrollItem(_ scrollView: UIScrollView) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 //    public func scrollViewDidScroll(_ scrollView: UIScrollView) { 
														 | 
														
														 | 
														
															 //    public func scrollViewDidScroll(_ scrollView: UIScrollView) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         BFLog(1, message: "滚动结束") 
														 | 
														
														 | 
														
															         BFLog(1, message: "滚动结束") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+         
														 | 
													
												
											
												
													
														| 
														 | 
														
															         let page = Int((scrollView.contentOffset.x + scrollView.frame.width / 2) / scrollView.frame.width) 
														 | 
														
														 | 
														
															         let page = Int((scrollView.contentOffset.x + scrollView.frame.width / 2) / scrollView.frame.width) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if page != currItemModelIndex { 
														 | 
														
														 | 
														
															         if page != currItemModelIndex { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             // 切换素材时先把录制状态切为不可用,延迟可点,避免在缩略图未加载出来时即可录制 
														 | 
														
														 | 
														
															             // 切换素材时先把录制状态切为不可用,延迟可点,避免在缩略图未加载出来时即可录制 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -2044,6 +2058,7 @@ extension BFRecordScreenController: UICollectionViewDelegate, UICollectionViewDa 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             cell?.contentView.addSubview(subtitleLabel) 
														 | 
														
														 | 
														
															             cell?.contentView.addSubview(subtitleLabel) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             updateSubtitle(time: currentAssetProgress) 
														 | 
														
														 | 
														
															             updateSubtitle(time: currentAssetProgress) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        recordBtn.isEnabled = true 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public func updateContentOffset(index: Int) { 
														 | 
														
														 | 
														
															     public func updateContentOffset(index: Int) { 
														 |