mirror of
https://github.com/yattee/yattee.git
synced 2025-08-08 11:44:06 +00:00
Improved thumbnail handling
- ThumbnailsModel optionally returns the quality - Have constants for 4:3 and 16:9 aspect ratio - Add high quality options for thumbnails - Rename Highest quality to Best quality - make 4:3 thumbnails fill the VideoCell - use .maxes instead of .maxresdefault (the latter sometimes returns white images) Signed-off-by: Toni Förster <toni.foerster@gmail.com>
This commit is contained in:
@@ -265,7 +265,7 @@ struct PlayerControls: View {
|
||||
|
||||
var controlsBackgroundURL: URL? {
|
||||
if let video = player.videoForDisplay,
|
||||
let url = thumbnails.best(video)
|
||||
let url = thumbnails.best(video).url
|
||||
{
|
||||
return url
|
||||
}
|
||||
|
@@ -65,7 +65,7 @@ import SwiftUI
|
||||
}
|
||||
|
||||
static var thumbnailHeight: Double {
|
||||
thumbnailWidth / (16 / 9)
|
||||
thumbnailWidth / Constants.aspectRatio16x9
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ import SwiftUI
|
||||
}
|
||||
|
||||
static var thumbnailHeight: Double {
|
||||
thumbnailWidth / 1.7777
|
||||
thumbnailWidth / Constants.aspectRatio16x9
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@@ -19,7 +19,7 @@ struct VideoPlayerView: View {
|
||||
static let hiddenOffset = 0.0
|
||||
#endif
|
||||
|
||||
static let defaultAspectRatio = 16 / 9.0
|
||||
static let defaultAspectRatio = Constants.aspectRatio16x9
|
||||
static var defaultMinimumHeightLeft: Double {
|
||||
#if os(macOS)
|
||||
335
|
||||
|
Reference in New Issue
Block a user