Details panels in controls

This commit is contained in:
Arkadiusz Fal
2022-07-10 19:51:46 +02:00
parent db46289813
commit f0b8e7f655
15 changed files with 203 additions and 123 deletions

View File

@@ -26,34 +26,32 @@ struct PlayerQueueRow: View {
}
var body: some View {
Group {
Button {
player.prepareCurrentItemForHistory()
Button {
player.prepareCurrentItemForHistory()
player.avPlayerBackend.startPictureInPictureOnPlay = player.playingInPictureInPicture
player.avPlayerBackend.startPictureInPictureOnPlay = player.playingInPictureInPicture
player.videoBeingOpened = item.video
player.videoBeingOpened = item.video
if history {
player.playHistory(item, at: watchStoppedAt)
} else {
player.advanceToItem(item, at: watchStoppedAt)
}
if fullScreen {
withAnimation {
fullScreen = false
}
}
if closePiPOnNavigation, player.playingInPictureInPicture {
player.closePiP()
}
} label: {
VideoBanner(video: item.video, playbackTime: watchStoppedAt, videoDuration: watch?.videoDuration)
if history {
player.playHistory(item, at: watchStoppedAt)
} else {
player.advanceToItem(item, at: watchStoppedAt)
}
.buttonStyle(.plain)
if fullScreen {
withAnimation {
fullScreen = false
}
}
if closePiPOnNavigation, player.playingInPictureInPicture {
player.closePiP()
}
} label: {
VideoBanner(video: item.video, playbackTime: watchStoppedAt, videoDuration: watch?.videoDuration)
}
.buttonStyle(.plain)
}
private var watch: Watch? {