mirror of
https://github.com/yattee/yattee.git
synced 2026-07-20 14:22:02 +00:00
Reset player aspect ratio to 16:9 for audio-only playback
Audio-only streams never report a video size, so the aspect ratio of the last played video stuck to the player area indefinitely once audio mode was enabled. Reset it in play() when the selected stream is audio-only, and let the macOS player window fall back to 16:9 instead of keeping the previous lock.
This commit is contained in:
@@ -347,6 +347,13 @@ final class PlayerService {
|
||||
}
|
||||
}
|
||||
|
||||
// Audio-only streams never report a video size, so the previous
|
||||
// video's aspect ratio would stick to the player area forever.
|
||||
// Reset it so the UI falls back to the standard 16:9.
|
||||
if selectedStream.isAudioOnly {
|
||||
state.videoAspectRatio = nil
|
||||
}
|
||||
|
||||
// Check for cancellation before loading stream
|
||||
try Task.checkCancellation()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user