|
@@ -181,7 +181,7 @@ class MVHomeController: MVBaseController {
|
|
|
}
|
|
|
|
|
|
// 播放器进度和状态回调
|
|
|
- PQSingletoVideoPlayer.shared.progressBloc = { [weak self] loadProgress, playProgress, duration in
|
|
|
+ PQSingletoVideoPlayer.shared.progressBloc = { [weak self] _, playProgress, duration in
|
|
|
|
|
|
BFLog(message: "duration \(duration) playProgress\(playProgress) \(duration) 进度\(playProgress / duration)")
|
|
|
let cell: MVBannerCell? = self?.viewListView.collectionView.cellForItem(at: self?.lastBnnerSelectIndex ?? IndexPath()) as? MVBannerCell
|
|
@@ -192,17 +192,15 @@ class MVHomeController: MVBaseController {
|
|
|
// 播放完成 自动播放下一个
|
|
|
if status == .PQVIDEO_PLAY_STATUS_END {
|
|
|
PQSingletoVideoPlayer.shared.playVideoData!.playProgress = 0
|
|
|
- if((self?.lastBnnerSelectIndex.row ?? 0) < (self?.mAllVideos.count ?? 0)){
|
|
|
- self?.lastBnnerSelectIndex = IndexPath.init(row: (self?.lastBnnerSelectIndex.row ?? 0) + 1, section: 0)
|
|
|
+ if (self?.lastBnnerSelectIndex.row ?? 0) < (self?.mAllVideos.count ?? 0) {
|
|
|
+ self?.lastBnnerSelectIndex = IndexPath(row: (self?.lastBnnerSelectIndex.row ?? 0) + 1, section: 0)
|
|
|
self?.playVideo(page: (self?.lastBnnerSelectIndex ?? IndexPath(row: 0, section: 0)).row)
|
|
|
-
|
|
|
-
|
|
|
- //视频列表跳转
|
|
|
+
|
|
|
+ // 视频列表跳转
|
|
|
self?.viewListView.currentIndex = (self?.lastBnnerSelectIndex ?? IndexPath(row: 0, section: 0)).row
|
|
|
self?.viewListView.scrollToItem(at: (self?.lastBnnerSelectIndex ?? IndexPath(row: 0, section: 0)).row, animated: false)
|
|
|
|
|
|
-
|
|
|
- }else{BFLog(message: "已经是最后一个视频。")}
|
|
|
+ } else { BFLog(message: "已经是最后一个视频。") }
|
|
|
}
|
|
|
}
|
|
|
// 添加协议
|
|
@@ -407,7 +405,7 @@ extension MVHomeController {
|
|
|
|
|
|
self.categoryCollectionView.reloadData()
|
|
|
self.categoryCollectionView.scrollToItem(at: IndexPath(row: hotVideoIndex ?? 0, section: 0), at: .centeredHorizontally, animated: true)
|
|
|
-
|
|
|
+
|
|
|
self.lastBnnerSelectIndex = IndexPath(row: page, section: 0)
|
|
|
|
|
|
} else {
|