Fix updating now playing info with mpv on tvOS

Other minor tvOS fixes
This commit is contained in:
Arkadiusz Fal
2022-08-29 00:29:29 +02:00
parent 945dbfe00b
commit d5f8ad4eec
2 changed files with 51 additions and 41 deletions

View File

@@ -34,6 +34,8 @@ struct PlayerBackendView: View {
.padding(.top, controlsTopPadding)
.padding(.bottom, controlsBottomPadding)
#endif
#else
hiddenControlsButton
#endif
}
#if os(iOS)
@@ -70,6 +72,22 @@ struct PlayerBackendView: View {
}
}
#endif
#if os(tvOS)
private var hiddenControlsButton: some View {
VStack {
Button {
player.controls.show()
} label: {
EmptyView()
}
.offset(y: -100)
.buttonStyle(.plain)
.background(Color.clear)
.foregroundColor(.clear)
}
}
#endif
}
struct PlayerBackendView_Previews: PreviewProvider {