1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-13 22:00:31 +05:30
yattee/Shared/Player/PlayerQueueRow.swift

34 lines
773 B
Swift
Raw Normal View History

import Foundation
import SwiftUI
struct PlayerQueueRow: View {
let item: PlayerQueueItem
var history = false
@Binding var fullScreen: Bool
@EnvironmentObject<PlayerModel> private var player
var body: some View {
Group {
Button {
player.addCurrentItemToHistory()
if history {
2021-10-14 03:35:19 +05:30
player.playHistory(item)
} else {
player.advanceToItem(item)
}
if fullScreen {
withAnimation {
fullScreen = false
}
}
} label: {
VideoBanner(video: item.video)
}
.buttonStyle(.plain)
}
}
}