PiP improvements

This commit is contained in:
Arkadiusz Fal
2022-08-19 00:40:46 +02:00
parent bec4ee0625
commit cd7f0c7360
16 changed files with 120 additions and 162 deletions

View File

@@ -132,21 +132,29 @@ struct ContentView: View {
@ViewBuilder var videoPlayer: some View {
if player.presentingPlayer {
VideoPlayerView()
.environmentObject(accounts)
.environmentObject(comments)
.environmentObject(instances)
.environmentObject(navigation)
.environmentObject(player)
.environmentObject(playerControls)
.environmentObject(playlists)
.environmentObject(recents)
.environmentObject(subscriptions)
.environmentObject(thumbnailsModel)
.environment(\.navigationStyle, navigationStyle)
playerView
.transition(.move(edge: .bottom))
} else if player.activeBackend == .appleAVPlayer {
#if os(iOS)
playerView.offset(y: UIScreen.main.bounds.height)
#endif
}
}
var playerView: some View {
VideoPlayerView()
.environmentObject(accounts)
.environmentObject(comments)
.environmentObject(instances)
.environmentObject(navigation)
.environmentObject(player)
.environmentObject(playerControls)
.environmentObject(playlists)
.environmentObject(recents)
.environmentObject(subscriptions)
.environmentObject(thumbnailsModel)
.environment(\.navigationStyle, navigationStyle)
}
}
struct ContentView_Previews: PreviewProvider {