1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-14 14:20:32 +05:30

Fix queue row opening

This commit is contained in:
Arkadiusz Fal 2022-11-11 18:50:20 +01:00
parent 730ba1ea2e
commit 9be29f581b

View File

@ -34,8 +34,8 @@ struct PlayerQueueRow: View {
player.avPlayerBackend.startPictureInPictureOnPlay = player.playingInPictureInPicture
player.videoBeingOpened = item.video
player.show()
let playItem = {
if history {
player.playHistory(item, at: watchStoppedAt)
} else {
@ -55,6 +55,19 @@ struct PlayerQueueRow: View {
if autoplay {
player.resetAutoplay()
}
}
#if os(iOS)
if player.presentingPlayer {
playItem()
} else {
player.onPresentPlayer.append(playItem)
}
#else
playItem()
#endif
player.show()
} label: {
VideoBanner(video: item.video, playbackTime: watchStoppedAt, videoDuration: watch?.videoDuration)
}