mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Add buttons to next video and restart video (fix #106)
Previous video requires rebuilding queue a little, maybe in the future
This commit is contained in:
@@ -141,16 +141,8 @@ struct VideoContextMenuView: View {
|
||||
Button {
|
||||
player.controls.startPiP(startImmediately: false)
|
||||
|
||||
var time: CMTime?
|
||||
if saveHistory,
|
||||
let stoppedAt = watch?.stoppedAt,
|
||||
!watch!.finished
|
||||
{
|
||||
time = .secondsInDefaultTimescale(stoppedAt)
|
||||
}
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
|
||||
player.play(video, at: time, showingPlayer: false)
|
||||
player.play(video, at: watch?.timeToRestart, showingPlayer: false)
|
||||
}
|
||||
} label: {
|
||||
Label("Play in PiP", systemImage: "pip")
|
||||
|
Reference in New Issue
Block a user