Revert "Drop iOS 14 and macOS 11 support"

This reverts commit dcef7f47ff.
This commit is contained in:
Arkadiusz Fal
2023-10-15 13:35:23 +02:00
parent 053b4a22b8
commit 94915b0496
45 changed files with 695 additions and 88 deletions

View File

@@ -7,8 +7,19 @@ struct ControlBackgroundModifier: ViewModifier {
func body(content: Content) -> some View {
if enabled {
content
if #available(iOS 15, macOS 12, *) {
content
.background(.thinMaterial)
} else {
content
#if os(macOS)
.background(VisualEffectBlur(material: .hudWindow))
#elseif os(iOS)
.background(VisualEffectBlur(blurStyle: .systemThinMaterial).edgesIgnoringSafeArea(edgesIgnoringSafeArea))
#else
.background(.thinMaterial)
#endif
}
} else {
content
}

View File

@@ -255,6 +255,8 @@ struct PlayerControls: View {
{
ThumbnailView(url: url)
.frame(maxWidth: .infinity, maxHeight: .infinity)
.transition(.opacity)
.animation(.default)
} else if player.videoForDisplay == nil {
Color.black
}