فهرست منبع

最后一个播放完判断修改

jsonwang 3 سال پیش
والد
کامیت
584bd800d0
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      MusicVideoPlus/MusicVideoPlus/Classes/Modules/Home/Controllers/MVHomeController.swift

+ 1 - 1
MusicVideoPlus/MusicVideoPlus/Classes/Modules/Home/Controllers/MVHomeController.swift

@@ -192,7 +192,7 @@ class MVHomeController: MVBaseController {
             // 播放完成 自动播放下一个
             if status == .PQVIDEO_PLAY_STATUS_END {
                 PQSingletoVideoPlayer.shared.playVideoData!.playProgress = 0
-                if (self?.lastBnnerSelectIndex.row ?? 0) < (self?.mAllVideos.count ?? 0) {
+                if (self?.lastBnnerSelectIndex.row ?? 0) < (self?.mAllVideos.count ?? 0) - 1 {
                     self?.lastBnnerSelectIndex = IndexPath(row: (self?.lastBnnerSelectIndex.row ?? 0) + 1, section: 0)
                     self?.playVideo(page: (self?.lastBnnerSelectIndex ?? IndexPath(row: 0, section: 0)).row)