Video playback progress and restoring time for previously played

This commit is contained in:
Arkadiusz Fal
2021-10-22 22:49:31 +02:00
parent bc065e282a
commit 4307da57c5
13 changed files with 219 additions and 89 deletions

View File

@@ -104,13 +104,13 @@ struct VideoCell: View {
.frame(minHeight: 180)
#if os(tvOS)
if video.playTime != nil || video.live || video.upcoming {
if let time = video.length.formattedAsPlaybackTime() || video.live || video.upcoming {
Spacer()
VStack(alignment: .center) {
Spacer()
if let time = video.playTime {
if let time = video.length.formattedAsPlaybackTime() {
HStack(spacing: 4) {
Image(systemName: "clock")
Text(time)
@@ -204,7 +204,7 @@ struct VideoCell: View {
HStack(alignment: .top) {
Spacer()
if let time = video.playTime {
if let time = video.length.formattedAsPlaybackTime() {
DetailBadge(text: time, style: .prominent)
}
}