mirror of
https://github.com/yattee/yattee.git
synced 2026-08-05 23:01:28 +00:00
Label local-file video quality from mpv track info instead of Unknown
Streams built for local folder files carry no resolution/codec/fps metadata (unknowable before demux), so the quality selector labeled them "Unknown". Use the video track mpv reports (demux-w/h/fps, codec) to fill those fields into a display-only copy of the stream — the Video row and summary now show e.g. "720p · 30fps" with a codec badge. Selection and tap handling keep using the original stream.
This commit is contained in:
@@ -96,6 +96,7 @@ struct PlayerControlsView: View {
|
||||
var embeddedSubtitleTracks: [MPVTrack] = []
|
||||
var currentEmbeddedAudioTrackID: Int? = nil
|
||||
var currentEmbeddedSubtitleTrackID: Int? = nil
|
||||
var embeddedVideoTrack: MPVTrack? = nil
|
||||
/// Callback when an embedded audio track is selected
|
||||
var onEmbeddedAudioTrackSelected: ((Int) -> Void)? = nil
|
||||
/// Callback when an embedded subtitle track is selected (nil = off)
|
||||
@@ -315,6 +316,7 @@ struct PlayerControlsView: View {
|
||||
currentAudioStream: currentAudioStream,
|
||||
initialTab: .video,
|
||||
showTabPicker: false,
|
||||
embeddedVideoTrack: embeddedVideoTrack,
|
||||
onStreamSelected: { stream, audioStream in
|
||||
onStreamSelected?(stream, audioStream)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user