tvOS buttons hint

This commit is contained in:
Arkadiusz Fal
2022-08-15 00:17:00 +02:00
parent dcfd24e376
commit c5738ee14a
2 changed files with 29 additions and 6 deletions

View File

@@ -1,8 +1,14 @@
import SwiftUI
struct StreamControl: View {
@Binding var presentingButtonHintAlert: Bool
@EnvironmentObject<PlayerModel> private var player
init(presentingButtonHintAlert: Binding<Bool> = .constant(false)) {
_presentingButtonHintAlert = presentingButtonHintAlert
}
var body: some View {
Group {
#if os(macOS)
@@ -47,7 +53,9 @@ struct StreamControl: View {
.fixedSize(horizontal: true, vertical: true)
.disabled(player.isLoadingAvailableStreams)
#else
Button {} label: {
Button {
presentingButtonHintAlert = true
} label: {
Text(player.streamSelection?.shortQuality ?? "loading")
.frame(maxWidth: 320)
}