mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Minor controls improvements
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import CoreMedia
|
||||
import AVFAudio
|
||||
import CoreMedia
|
||||
import Defaults
|
||||
import Foundation
|
||||
|
||||
@@ -34,7 +34,6 @@ extension PlayerModel {
|
||||
if let duration = playerItemDuration, segment.endTime.seconds >= duration.seconds - 3 {
|
||||
logger.error("segment end time is: \(segment.end) when player item duration is: \(duration.seconds)")
|
||||
|
||||
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
guard let self = self else {
|
||||
return
|
||||
|
@@ -164,6 +164,22 @@ class Stream: Equatable, Hashable, Identifiable {
|
||||
return kind == .hls ? "adaptive (HLS)" : "\(resolution.name)\(kind == .stream ? " (\(kind.rawValue))" : "")"
|
||||
}
|
||||
|
||||
var shortQuality: String {
|
||||
if resolution == .hd4320p60 || resolution == .hd4320p {
|
||||
return "8K"
|
||||
} else if resolution == .hd2160p60 ||
|
||||
resolution == .hd2160p50 ||
|
||||
resolution == .hd2160p48 ||
|
||||
resolution == .hd2160p
|
||||
{
|
||||
return "4K"
|
||||
} else if kind == .hls {
|
||||
return "HLS"
|
||||
} else {
|
||||
return resolution.name
|
||||
}
|
||||
}
|
||||
|
||||
var description: String {
|
||||
let formatString = format == .unknown ? "" : " (\(format.rawValue))"
|
||||
return "\(quality)\(formatString) - \(instance?.description ?? "")"
|
||||
|
Reference in New Issue
Block a user