Pārlūkot izejas kodu

进度从0开始显示

jsonwang 3 gadi atpakaļ
vecāks
revīzija
38c59e5dff

+ 3 - 2
BFFramework/Classes/Stuckpoint/ViewModel/PQGPUImagePlayerView.swift

@@ -413,9 +413,10 @@ public class PQGPUImagePlayerView: UIView {
                 strongSelf.animationLayer?.timeOffset = strongSelf.playbackTime
                 if strongSelf.showProgressLab {
                     if duration < 1 {
-                        strongSelf.progressLab.text =  "\(currTime.formatDurationToHMS()) / 00:01"
+                       
+                        strongSelf.progressLab.text =  "\((currTime - Double(CMTimeGetSeconds(movie.startTime ?? .zero))).formatDurationToHMS()) / 00:01"
                     } else {
-                        strongSelf.progressLab.text = "\(currTime.formatDurationToHMS()) / \(duration.formatDurationToHMS())"
+                        strongSelf.progressLab.text = "\((currTime - Double(CMTimeGetSeconds(movie.startTime ?? .zero))).formatDurationToHMS()) / \( (duration - Double(CMTimeGetSeconds(movie.startTime ?? .zero))).formatDurationToHMS())"
                     }
                 }
             }