mirror of
https://github.com/yattee/yattee.git
synced 2025-08-06 10:44:06 +00:00
Changes to defaults
- Don’t use System Controls with AVPlayer by default - Changed default order of the formats - no default AVPlayer profiles except for tvOS - new constants isIOS, isTvOS, isMacOS - ArtWork for nowPlaying is .medium on iPhone .maxres on all other platforms - changes to the player bar defaults Signed-off-by: Toni Förster <toni.foerster@gmail.com>
This commit is contained in:
@@ -1057,7 +1057,7 @@ final class PlayerModel: ObservableObject {
|
||||
|
||||
func updateCurrentArtwork() {
|
||||
guard let video = currentVideo,
|
||||
let thumbnailURL = video.thumbnailURL(quality: .medium)
|
||||
let thumbnailURL = video.thumbnailURL(quality: Constants.isIPhone ? .medium : .maxres)
|
||||
else {
|
||||
return
|
||||
}
|
||||
|
@@ -6,12 +6,12 @@ struct QualityProfile: Hashable, Identifiable, Defaults.Serializable {
|
||||
static var defaultProfile = Self(id: "default", backend: .mpv, resolution: .hd720p60, formats: [.stream], order: Array(Format.allCases.indices))
|
||||
|
||||
enum Format: String, CaseIterable, Identifiable, Defaults.Serializable {
|
||||
case hls
|
||||
case stream
|
||||
case avc1
|
||||
case mp4
|
||||
case stream
|
||||
case av1
|
||||
case webm
|
||||
case hls
|
||||
|
||||
var id: String {
|
||||
rawValue
|
||||
@@ -30,18 +30,18 @@ struct QualityProfile: Hashable, Identifiable, Defaults.Serializable {
|
||||
|
||||
var streamFormat: Stream.Format? {
|
||||
switch self {
|
||||
case .hls:
|
||||
return nil
|
||||
case .av1:
|
||||
return .av1
|
||||
case .mp4:
|
||||
return .mp4
|
||||
case .stream:
|
||||
return nil
|
||||
case .avc1:
|
||||
return .avc1
|
||||
case .mp4:
|
||||
return .mp4
|
||||
case .av1:
|
||||
return .av1
|
||||
case .webm:
|
||||
return .webm
|
||||
case .hls:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -59,14 +59,16 @@ struct QualityProfile: Hashable, Identifiable, Defaults.Serializable {
|
||||
}
|
||||
|
||||
var formatsDescription: String {
|
||||
if formats.count == Format.allCases.count {
|
||||
switch formats.count {
|
||||
case Format.allCases.count:
|
||||
return "Any format".localized()
|
||||
}
|
||||
if formats.count <= 3 {
|
||||
case 0:
|
||||
return "No format selected".localized()
|
||||
case 1 ... 3:
|
||||
return formats.map(\.description).joined(separator: ", ")
|
||||
default:
|
||||
return String(format: "%@ formats".localized(), String(formats.count))
|
||||
}
|
||||
|
||||
return String(format: "%@ formats".localized(), String(formats.count))
|
||||
}
|
||||
|
||||
func isPreferred(_ stream: Stream) -> Bool {
|
||||
|
Reference in New Issue
Block a user