Minor changes

This commit is contained in:
Arkadiusz Fal 2022-04-02 14:34:06 +02:00
parent e39f4373bb
commit 836057578f
2 changed files with 4 additions and 3 deletions

View File

@ -3,6 +3,6 @@ import AppKit
extension NSTextField { extension NSTextField {
override open var focusRingType: NSFocusRingType { override open var focusRingType: NSFocusRingType {
get { .none } get { .none }
set {} // swiftlint:disable:this unused_setter_value set {}
} }
} }

View File

@ -103,12 +103,13 @@ struct PlaybackBar: View {
return "loading..." return "loading..."
} }
guard let video = player.currentVideo else { guard let video = player.currentVideo,
let time = player.time else {
return "" return ""
} }
let videoLengthAtRate = video.length / Double(player.currentRate) let videoLengthAtRate = video.length / Double(player.currentRate)
let remainingSeconds = videoLengthAtRate - player.time!.seconds let remainingSeconds = videoLengthAtRate - time.seconds
if remainingSeconds < 60 { if remainingSeconds < 60 {
return "less than a minute" return "less than a minute"