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:
Arkadiusz Fal
2022-05-29 17:50:54 +02:00
parent d07b82a21b
commit c5af865ffe
4 changed files with 38 additions and 10 deletions

View File

@@ -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")