Use Swift 5.7 if-let style

This commit is contained in:
Arkadiusz Fal
2022-09-28 16:27:01 +02:00
parent 8f96a7c5e0
commit a086a0f440
50 changed files with 114 additions and 114 deletions

View File

@@ -79,7 +79,7 @@ extension PlayerBackend {
}
func seek(relative time: CMTime, seekType: SeekType, completionHandler: ((Bool) -> Void)? = nil) {
if let currentTime = currentTime, let duration = playerItemDuration {
if let currentTime, let duration = playerItemDuration {
let seekTime = min(max(0, currentTime.seconds + time.seconds), duration.seconds)
model.seek.registerSeek(at: .secondsInDefaultTimescale(seekTime), type: seekType, restore: currentTime)
seek(to: seekTime, seekType: seekType, completionHandler: completionHandler)