allow edit jump forward and backward during playback
This commit is contained in:
parent
d5e225dce1
commit
c4466c2cb9
|
@ -177,6 +177,44 @@ struct VLCPlayerCompactOverlayView: View, VideoPlayerOverlay {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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: {
|
} label: {
|
||||||
Image(systemName: "ellipsis.circle")
|
Image(systemName: "ellipsis.circle")
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,10 @@ enum VideoPlayerJumpLength: Int32, CaseIterable, Defaults.Serializable {
|
||||||
return "\(self.rawValue) seconds"
|
return "\(self.rawValue) seconds"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var shortLabel: String {
|
||||||
|
return "\(self.rawValue)s"
|
||||||
|
}
|
||||||
|
|
||||||
var forwardImageLabel: String {
|
var forwardImageLabel: String {
|
||||||
switch self {
|
switch self {
|
||||||
case .thirty:
|
case .thirty:
|
||||||
|
|
Loading…
Reference in New Issue