v2 #1

Open
kamil wants to merge 231 commits from v2 into main
Showing only changes of commit 603cd2bb02 - Show all commits

View File

@@ -63,7 +63,7 @@ struct MiniPlayerView: View {
.foregroundStyle(.red)
.frame(width: 36, height: 36)
default:
Color.clear.frame(width: 36, height: 36)
EmptyView()
}
}
@@ -81,6 +81,18 @@ struct MiniPlayerView: View {
}
.background(.ultraThinMaterial)
.shadow(color: .black.opacity(0.15), radius: 6, y: -2)
.gesture(
DragGesture(minimumDistance: 20, coordinateSpace: .local)
.onEnded { value in
if value.translation.height < -20 {
// Swipe up expand full player
showFullPlayer = true
} else if value.translation.height > 20 {
// Swipe down dismiss
audioPlayer.stop()
}
}
)
}
private var progress: CGFloat {