mirror of
https://github.com/yattee/yattee.git
synced 2025-10-11 01:48:12 +00:00
Playback rate
This commit is contained in:
@@ -88,6 +88,14 @@ final class Video: Identifiable, ObservableObject {
|
||||
selectableStreams.min { $0.resolution > $1.resolution }
|
||||
}
|
||||
|
||||
func streamWithResolution(_ resolution: StreamResolution) -> Stream? {
|
||||
selectableStreams.first { $0.resolution == resolution }
|
||||
}
|
||||
|
||||
func defaultStreamForProfile(_ profile: Profile) -> Stream? {
|
||||
streamWithResolution(profile.defaultStreamResolution.value)
|
||||
}
|
||||
|
||||
private func extractThumbnailURL(from details: JSON) -> URL? {
|
||||
if details["videoThumbnails"].arrayValue.isEmpty {
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user