瀏覽代碼

fix:预览滑动音乐条播放完,再次播放时开头音乐与滑动后播放的音乐不一致

huzhiqiang 3 年之前
父節點
當前提交
a6a2733cae
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      BFFramework/Classes/PQGPUImage/akfilters/PQMovieInput.swift

+ 2 - 0
BFFramework/Classes/PQGPUImage/akfilters/PQMovieInput.swift

@@ -747,6 +747,8 @@ extension PQMovieInput {
         self.avPlayer?.pause()
         self.indexRage = 0
         let playerItem = self.avPlayer?.currentItem
+        let rangeee = CMTimeRangeMake(start: playeTimeRange.start, duration: self.musicPlayRanges?.first?.duration ?? CMTime(value: 1200, timescale: 40))
+        playerItem?.reversePlaybackEndTime = rangeee.start
         playerItem?.seek(to: playerItem?.reversePlaybackEndTime ?? CMTime(value: 0, timescale: 40))
     }