mirror of
https://github.com/yattee/yattee.git
synced 2025-08-08 11:44:06 +00:00
Improved Captions handling
New options for captions in `Settings-Player`: - Always show captions - Default language User can now select whether they want to show captions automatically when the video starts, and select the language. Captions selector now shows proper name -> `English (en)` instead of only `en`
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import Combine
|
||||
import Defaults
|
||||
import SwiftUI
|
||||
|
||||
@@ -393,8 +394,10 @@ struct PlaybackSettings: View {
|
||||
} label: {
|
||||
HStack(spacing: 4) {
|
||||
Image(systemName: "text.bubble")
|
||||
if let captions = player.captions {
|
||||
Text(captions.code)
|
||||
if let captions = player.captions,
|
||||
let language = LanguageCodes(rawValue: captions.code)
|
||||
{
|
||||
Text("\(language.description.capitalized) (\(language.rawValue))")
|
||||
.foregroundColor(.accentColor)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user