Playback state improvements

This commit is contained in:
Arkadiusz Fal
2021-08-23 23:31:51 +02:00
parent f80b61f9c7
commit 151121aa31
11 changed files with 55 additions and 27 deletions

View File

@@ -3,6 +3,7 @@ import SwiftUI
struct TVNavigationView: View {
@EnvironmentObject<NavigationState> private var navigationState
@EnvironmentObject<PlaybackState> private var playbackState
@State private var showingOptions = false
@@ -47,6 +48,7 @@ struct TVNavigationView: View {
.fullScreenCover(isPresented: $navigationState.showingVideo) {
if let video = navigationState.video {
VideoPlayerView(video)
.environmentObject(playbackState)
}
}
.onPlayPauseCommand { showingOptions.toggle() }