|
@@ -1445,6 +1445,27 @@ extension BFRecordScreenController: PQSpeechTranscriberUtilDelegate {
|
|
self.itemModels[self.currItemModelIndex].titleStickers.append(newSubtitle)
|
|
self.itemModels[self.currItemModelIndex].titleStickers.append(newSubtitle)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ func reloadMaterial(recordItem : BFRecordItemModel) {
|
|
|
|
+
|
|
|
|
+ if let path = recordItem.localPath, let lastCell: BFImageCoverViewCell = collectionView.cellForItem(at: IndexPath(item: currItemModelIndex, section: 0)) as? BFImageCoverViewCell {
|
|
|
|
+
|
|
|
|
+ setAudioPlay(item: recordItem.playItem)
|
|
|
|
+ setVideoPlay(item: recordItem.playItem, imageView: lastCell.playView)
|
|
|
|
+
|
|
|
|
+ let degress = degressFromVideoFile(url: URL(fileURLWithPath: path))
|
|
|
|
+ switch (degress) {
|
|
|
|
+ case 90:
|
|
|
|
+ lastCell.playView.setInputRotation(GPUImageRotationMode.init(rawValue: 2), at: 0)
|
|
|
|
+ case 180:
|
|
|
|
+ lastCell.playView.setInputRotation(GPUImageRotationMode.init(rawValue: 7), at: 0)
|
|
|
|
+ case 270:
|
|
|
|
+ lastCell.playView.setInputRotation(GPUImageRotationMode.init(rawValue: 1), at: 0)
|
|
|
|
+ default:
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
// MARK: - UICollectionViewDelegate
|
|
// MARK: - UICollectionViewDelegate
|
|
@@ -1470,10 +1491,12 @@ extension BFRecordScreenController: UICollectionViewDelegate, UICollectionViewDa
|
|
self?.progressThumV.isHidden = false
|
|
self?.progressThumV.isHidden = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- recordItem.fetchPlayItem = { [weak self, weak cell] _ in
|
|
|
|
|
|
+ recordItem.fetchPlayItem = { [weak self, weak recordItem] _ in
|
|
|
|
+ guard let item = recordItem else {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
if indexPath.item == self?.currItemModelIndex {
|
|
if indexPath.item == self?.currItemModelIndex {
|
|
- self?.setAudioPlay(item: recordItem.playItem)
|
|
|
|
- self?.setVideoPlay(item: recordItem.playItem, imageView: cell?.playView)
|
|
|
|
|
|
+ self?.reloadMaterial(recordItem: item)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
cell.btnClickHandle = { [weak self] sender, _ in
|
|
cell.btnClickHandle = { [weak self] sender, _ in
|
|
@@ -1506,9 +1529,8 @@ extension BFRecordScreenController: UICollectionViewDelegate, UICollectionViewDa
|
|
assetPlayer?.seek(to: CMTime.zero)
|
|
assetPlayer?.seek(to: CMTime.zero)
|
|
recordPlayer?.seek(to: CMTime.zero)
|
|
recordPlayer?.seek(to: CMTime.zero)
|
|
if recordItem.mediaType == .VIDEO {
|
|
if recordItem.mediaType == .VIDEO {
|
|
- let currCell: BFImageCoverViewCell? = collectionView.cellForItem(at: IndexPath(item: page, section: 0)) as? BFImageCoverViewCell
|
|
|
|
- setVideoPlay(item: recordItem.playItem, imageView: currCell?.playView)
|
|
|
|
- setAudioPlay(item: recordItem.playItem)
|
|
|
|
|
|
+ self.reloadMaterial(recordItem: recordItem)
|
|
|
|
+
|
|
assetPlayer?.seek(to: .zero, toleranceBefore: CMTime(value: 1, timescale: 1_000_000), toleranceAfter: CMTime(value: 1, timescale: 1_000_000))
|
|
assetPlayer?.seek(to: .zero, toleranceBefore: CMTime(value: 1, timescale: 1_000_000), toleranceAfter: CMTime(value: 1, timescale: 1_000_000))
|
|
}
|
|
}
|
|
if changeItemHandle != nil {
|
|
if changeItemHandle != nil {
|
|
@@ -1523,6 +1545,7 @@ extension BFRecordScreenController: UICollectionViewDelegate, UICollectionViewDa
|
|
|
|
|
|
// 更新当前page
|
|
// 更新当前page
|
|
currItemModelIndex = page
|
|
currItemModelIndex = page
|
|
|
|
+// drawOrUpdateRecordProgessLable()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|