Add playing indicator

This commit is contained in:
Arkadiusz Fal
2022-12-16 23:13:16 +01:00
parent 5054f828de
commit adc32d5ae1
4 changed files with 75 additions and 13 deletions

View File

@@ -250,12 +250,18 @@ struct VideoBanner: View {
}
@ViewBuilder private var timeView: some View {
if let timeLabel {
Text(timeLabel)
.font(.caption2.weight(.semibold).monospacedDigit())
.allowsTightening(true)
.padding(2)
.modifier(ControlBackgroundModifier())
VStack(alignment: .trailing, spacing: 2) {
PlayingIndicatorView(video: video, height: 10)
.frame(width: 12, alignment: .trailing)
.padding(.trailing, 3)
if let timeLabel {
Text(timeLabel)
.font(.caption2.weight(.semibold).monospacedDigit())
.allowsTightening(true)
.padding(2)
.modifier(ControlBackgroundModifier())
}
}
}

View File

@@ -418,14 +418,19 @@ struct VideoCell: View {
Spacer()
HStack {
Spacer()
VStack(alignment: .trailing, spacing: 4) {
PlayingIndicatorView(video: video, height: 20)
.frame(width: 15, alignment: .trailing)
.padding(.trailing, 3)
HStack {
Spacer()
if timeOnThumbnail,
!video.live,
let time
{
DetailBadge(text: time, style: .prominent)
if timeOnThumbnail,
!video.live,
let time
{
DetailBadge(text: time, style: .prominent)
}
}
}
#if os(tvOS)