allow edit jump forward and backward during playback
This commit is contained in:
parent
d5e225dce1
commit
c4466c2cb9
|
@ -176,6 +176,44 @@ struct VLCPlayerCompactOverlayView: View, VideoPlayerOverlay {
|
|||
Text("Playback Speed")
|
||||
}
|
||||
}
|
||||
|
||||
Menu {
|
||||
ForEach(VideoPlayerJumpLength.allCases, id: \.self) { forwardLength in
|
||||
Button {
|
||||
jumpForwardLength = forwardLength
|
||||
} label: {
|
||||
if forwardLength == jumpForwardLength {
|
||||
Label(forwardLength.shortLabel, systemImage: "checkmark")
|
||||
} else {
|
||||
Text(forwardLength.shortLabel)
|
||||
}
|
||||
}
|
||||
}
|
||||
} label: {
|
||||
HStack {
|
||||
Image(systemName: "goforward")
|
||||
Text("Jump Forward Length")
|
||||
}
|
||||
}
|
||||
|
||||
Menu {
|
||||
ForEach(VideoPlayerJumpLength.allCases, id: \.self) { backwardLength in
|
||||
Button {
|
||||
jumpBackwardLength = backwardLength
|
||||
} label: {
|
||||
if backwardLength == jumpBackwardLength {
|
||||
Label(backwardLength.shortLabel, systemImage: "checkmark")
|
||||
} else {
|
||||
Text(backwardLength.shortLabel)
|
||||
}
|
||||
}
|
||||
}
|
||||
} label: {
|
||||
HStack {
|
||||
Image(systemName: "gobackward")
|
||||
Text("Jump Backward Length")
|
||||
}
|
||||
}
|
||||
|
||||
} label: {
|
||||
Image(systemName: "ellipsis.circle")
|
||||
|
|
|
@ -20,6 +20,10 @@ enum VideoPlayerJumpLength: Int32, CaseIterable, Defaults.Serializable {
|
|||
return "\(self.rawValue) seconds"
|
||||
}
|
||||
|
||||
var shortLabel: String {
|
||||
return "\(self.rawValue)s"
|
||||
}
|
||||
|
||||
var forwardImageLabel: String {
|
||||
switch self {
|
||||
case .thirty:
|
||||
|
|
Loading…
Reference in New Issue