Display more details in player view

This commit is contained in:
Arkadiusz Fal
2021-08-22 21:13:33 +02:00
parent ea634390a6
commit f80b61f9c7
22 changed files with 716 additions and 36 deletions

View File

@@ -131,7 +131,7 @@ struct VideoView: View {
if video.views != 0 {
Image(systemName: "eye")
Text(video.viewsCount)
Text(video.viewsCount!)
}
}
.foregroundColor(.secondary)
@@ -139,7 +139,7 @@ struct VideoView: View {
var thumbnail: some View {
ZStack(alignment: .leading) {
thumbnailImage(quality: .maxres)
thumbnailImage(quality: .maxresdefault)
VStack {
HStack(alignment: .top) {
@@ -181,12 +181,13 @@ struct VideoView: View {
ProgressView()
.aspectRatio(contentMode: .fill)
}
.mask(RoundedRectangle(cornerRadius: 12))
} else {
Image(systemName: "exclamationmark.square")
}
}
.frame(minWidth: 320, maxWidth: .infinity, minHeight: 180, maxHeight: .infinity)
.frame(minWidth: 300, maxWidth: .infinity, minHeight: 180, maxHeight: .infinity)
.background(.gray)
.mask(RoundedRectangle(cornerRadius: 12))
#if os(tvOS)
.frame(minHeight: layout == .cells ? 320 : 200)
#endif