Minor tvOS layout fixes

This commit is contained in:
Arkadiusz Fal
2022-06-26 14:55:23 +02:00
parent 993e602ca3
commit d330771fef
5 changed files with 27 additions and 20 deletions

View File

@@ -141,22 +141,22 @@ struct VideoPlayerView: View {
playerView
.ignoresSafeArea(.all, edges: .all)
.onMoveCommand { direction in
if direction == .up || direction == .down {
playerControls.show()
}
playerControls.resetTimer()
guard !playerControls.presentingControls else {
return
}
if direction == .left {
playerControls.resetTimer()
player.backend.seek(relative: .secondsInDefaultTimescale(-10))
}
if direction == .right {
playerControls.resetTimer()
player.backend.seek(relative: .secondsInDefaultTimescale(10))
}
if direction == .up {
playerControls.show()
playerControls.resetTimer()
}
if direction == .down {
playerControls.show()
playerControls.resetTimer()
}
}
#else
GeometryReader { geometry in