|
@@ -475,6 +475,8 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
}
|
|
|
sself.itemModels[sself.currItemModelIndex].materialDuraion = Double(String(format: "%.3f", duration)) ?? 0
|
|
|
self?.isEndPlay = true
|
|
|
+ // 录制结束显示播放按钮
|
|
|
+ (sself.collectionView.cellForItem(at: IndexPath(item: sself.currItemModelIndex, section: 0)) as? BFImageCoverViewCell)?.playBtn.isSelected = sself.itemModels[sself.currItemModelIndex].voiceStickers.count <= 0
|
|
|
}
|
|
|
DispatchQueue.main.async { [weak self] in
|
|
|
// 录音完,重绘撤销按钮,更新录音按钮,
|
|
@@ -884,7 +886,6 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
if !avatarView.isHidden {
|
|
|
avatarView.beginRecord()
|
|
|
}
|
|
|
-
|
|
|
if itemModels[currItemModelIndex].mediaType == .VIDEO {
|
|
|
if !movieIsProcessing {
|
|
|
movie?.startProcessing()
|
|
@@ -892,10 +893,9 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
}
|
|
|
assetPlayer?.volume = 0
|
|
|
assetPlayer?.play()
|
|
|
-
|
|
|
- // 暂停状态
|
|
|
- (collectionView.cellForItem(at: IndexPath(item: currItemModelIndex, section: 0)) as? BFImageCoverViewCell)?.playBtn.isSelected = true
|
|
|
}
|
|
|
+ // 录制中不显示播放按钮
|
|
|
+ (collectionView.cellForItem(at: IndexPath(item: currItemModelIndex, section: 0)) as? BFImageCoverViewCell)?.playBtn.isSelected = true
|
|
|
}
|
|
|
|
|
|
@objc func endRecord() {
|
|
@@ -1293,7 +1293,7 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
assetPlayer?.seek(to: currentAssetProgress, toleranceBefore: CMTime(value: 1, timescale: 1_000_000), toleranceAfter: CMTime(value: 1, timescale: 1_000_000), completionHandler: { _ in
|
|
|
})
|
|
|
// 暂停状态
|
|
|
- (collectionView.cellForItem(at: IndexPath(item: currItemModelIndex, section: 0)) as? BFImageCoverViewCell)?.playBtn.isSelected = false
|
|
|
+ (collectionView.cellForItem(at: IndexPath(item: currItemModelIndex, section: 0)) as? BFImageCoverViewCell)?.playBtn.isSelected = (itemModels[currItemModelIndex].mediaType == .IMAGE && itemModels[currItemModelIndex].voiceStickers.count <= 0)
|
|
|
}
|
|
|
|
|
|
func fetchVideo() {
|
|
@@ -1581,10 +1581,6 @@ extension BFRecordScreenController: UICollectionViewDelegate, UICollectionViewDa
|
|
|
if page != currItemModelIndex {
|
|
|
// 暂停
|
|
|
pause()
|
|
|
- // 暂停状态
|
|
|
- let lastCell: BFImageCoverViewCell? = collectionView.cellForItem(at: IndexPath(item: currItemModelIndex, section: 0)) as? BFImageCoverViewCell
|
|
|
- lastCell?.playBtn.isSelected = false
|
|
|
-
|
|
|
events.append(WithDrawModel(type: 0, timestamp: currentAssetProgress.seconds))
|
|
|
// 重设撤销栈
|
|
|
itemModels[currItemModelIndex].events = events
|
|
@@ -1601,8 +1597,6 @@ extension BFRecordScreenController: UICollectionViewDelegate, UICollectionViewDa
|
|
|
// 更新缩略图
|
|
|
progressThumV.isHidden = false
|
|
|
progreddL.text = "00:00"
|
|
|
-
|
|
|
-
|
|
|
// 重置指针
|
|
|
currentAssetProgress = CMTime(seconds: 0, preferredTimescale: 1000)
|
|
|
searchStopAtRecordRange()
|
|
@@ -1612,8 +1606,6 @@ extension BFRecordScreenController: UICollectionViewDelegate, UICollectionViewDa
|
|
|
|
|
|
searchStopAtRecordRange()
|
|
|
changeWithDrawBtnLayout(false)
|
|
|
-
|
|
|
- // 重置到首位
|
|
|
pauseTime = 0
|
|
|
if recordItem.mediaType == .VIDEO {
|
|
|
reloadMaterial()
|