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

Remove custom PiP placeholder

This commit is contained in:
Arkadiusz Fal 2022-08-13 16:14:38 +02:00
parent e8dbf46e14
commit 2c81808125

View File

@ -199,10 +199,6 @@ struct VideoPlayerView: View {
}
#else
GeometryReader { geometry in
Group {
if player.playingInPictureInPicture {
pictureInPicturePlaceholder
} else {
PlayerBackendView()
#if !os(tvOS)
.modifier(
@ -214,8 +210,6 @@ struct VideoPlayerView: View {
)
.overlay(playerPlaceholder)
#endif
}
}
.frame(maxWidth: fullScreenLayout ? .infinity : nil, maxHeight: fullScreenLayout ? .infinity : nil)
.onHover { hovering in
hoveringPlayer = hovering
@ -261,7 +255,6 @@ struct VideoPlayerView: View {
}
#endif
}
.background(((colorScheme == .dark || fullScreenLayout) ? Color.black : Color.white).edgesIgnoringSafeArea(.all))
#if os(macOS)
.frame(minWidth: 650)
@ -333,35 +326,6 @@ struct VideoPlayerView: View {
}
}
var pictureInPicturePlaceholder: some View {
HStack {
Spacer()
VStack {
Spacer()
VStack(spacing: 10) {
#if !os(tvOS)
Image(systemName: "pip")
.font(.system(size: 120))
#endif
Text("Playing in Picture in Picture")
}
Spacer()
}
.foregroundColor(.gray)
Spacer()
}
.contextMenu {
Button {
player.closePiP()
} label: {
Label("Exit Picture in Picture", systemImage: "pip.exit")
}
}
.contentShape(Rectangle())
.frame(width: player.playerSize.width, height: player.playerSize.height)
}
#if os(iOS)
var playerDragGesture: some Gesture {
DragGesture(minimumDistance: 0, coordinateSpace: .global)